texts: Creating custom geostamp in TerraGo toolbar?

texts:
The blurb for the new 6.0 tool bar says it supports custom geostamps, but I can't find any info on how to create one.

Can anyone point me to the method for creating a custom geostamp that the toolbar will recognize?

So far, this is what I've figured out:

The geostamp files on Windows are in C:\Program Files\Common Files\TerraGo\GeoStamps

Each collection of stamps in the Geostamps menu corresponds to a pdf file in that directory.
Each file begins with a sequential letter of the alphabet. The installation has A thru E.
The name of the collection corresponds to the document name (which in the default files is the file name minus the first letter).
If you copy one of the existing collection files, rename the document (in Acrobat), rename the file to start with the next letter of the alphabet (F), you will see a new collection in the GeoStamps menu in Acrobat Reader.
The pdf file consists of one 8.5x11 page (apparently blank), plus a series of pages each .65" square containing a single symbol, which is a glyph from a font whose name essentially matches the collection name.
If you delete one (or more) of these pages, the file still works, but the corresponding stamp is missing.

And here's where it breaks down -
8. If you add a page to this file, it does NOT appear as a symbol available to the Geostamp function in the toolbar. Interestingly, the added page does not break the collection, even if placed before the original pages. If you add markup to a symbol from the original document (like an arrow, for example), the markup appears in the symbol preview, but no in the symbol "stamped" onto the document.

I've checked all the document properties and can't find anything that seems out of the ordinary. But there must be something magic on the page to make it work.


texts: How to create multipoygon in Openlayers 4?

texts:
I want to create a separate layer in Openlayers 4 with multipolygon geometry. I thought, it's enough to know a few coordinates, put it in an array and create the geometry. After reading documentations, I've no idea to create a multipolygon in Version 4.

Any ideas? Examples?
Please let me know.

I solved the Problem myself. Here are some Details:
I wanted to Show a polygon with hole. So i need a multipolygon.
First, I draw a rectangle as polygon with coordinates and show them in the map. Second, I edit the polygon to multipolygon and added a second polygon as hole. I didn't find a simple examples, how to do this. Here it is...

//area from database in ESPG:4258
var gebiet = '10.59 53.36, 10.73 53.42, 11.07 53.14, 12.11 52.87, 11.90 53.24, 12.04 53.37, 12.33 53.31, 12.51 53.95, 11.92 53.98, 11.47 53.75, 10.77 53.78, 10.95 53.64, 10.59 53.36';
var style=
                new ol.style.Style({
                  stroke: new ol.style.Stroke({
                    color: 'gray',
                    width: 1
                  }),
                  fill: new ol.style.Fill({
                    color: 'rgba(80, 80, 80, 0.2)'
                  })
                });

//import data and parse to array
            function parseData(inputData, rowSeparator, colSeparator){
                var outputData = inputData.split(rowSeparator);
                parsedData =  new Array(outputData.length);
                for (var i = 0; i < parsedData.length; ++i) {
                    parsedData[i] = outputData[i].split(colSeparator);
                }

                return parsedData;
            }

//create layer
            function createLayer(features, id, style){
            //console.log('in func createLinestringLayer');
                return new ol.layer.Vector({
                    source: new ol.source.Vector({
                        features: [new ol.Feature({
                            geometry: features,
                            id: id,
                            name: 'Line'
                        })]
                    }),
                    style: style
                })
            }

//set features
            function setFeatures(inputData, simplify){
                var parsedData = parseData(inputData, ', ', ' ');
                var lineString = new ol.geom.LineString();

                for (var i = 0; i < parsedData.length; ++i) {
                    var coordinates = ol.proj.fromLonLat([parseFloat(parsedData[i][0]), parseFloat(parsedData[i][1])]);
                    lineString.appendCoordinate(coordinates);
                }

                if(simplify > 0){
                    lineString = lineString.simplify(simplify);
                }

                return lineString;
            }

var  geomPoly = new ol.geom.MultiPolygon([
                [
                    setFeatures(gebiet, 500).getCoordinates(),
                    [[0.5e6, 7.52e6], [2e6, 7.52e6], [2e6, 6.5e6], [0.5e6, 6.5e6], [0.5e6, 7.52e6]]
                ]
            ]);

map.addLayer(createLayer(geomPoly, 123, style));


texts: Converted timezone does not display properly in ArcMap

texts:
(Oracle 12c geodatabase)
I have a view that converts a UTC timestamp to Eastern Time using the from_tz function:
create or replace view test_vw as (
select
    cast(rownum as number(38,0)) as rownum_,
    from_tz(
         cast(to_date('2019/11/02 05:00:00', 'yyyy/mm/dd HH24:MI:SS') as timestamp)
    , 'UTC') at time zone 'US/Eastern' as my_timestamp
from
    dual
);

   ROWNUM_ MY_TIMESTAMP
---------- -----------------------------------
         1 11/02/2019 1:00:00.000000 AM -04:00

In Toad, the SQL converts 5:00 am UTC to 1:00 am Eastern Time.
That is the expected result.

However, when I use the view in ArcMap 10.7.1, the timestamp does not display the correct time:

It displays 5:00 am UTC, instead of 1:00 am Eastern Time.
Is there a way to display the converted time correctly in ArcMap?


texts: ArcGIS Desktop 10 ModelBuilder iterations

texts:
I have some home range estimates for fish that I made using the adehabitat pkg in R. However, a lot of them overlap land, so I need to subtract the area where they overlap with land ("BaseMap") from the total area to get the "water" estimate. I tried with one file, and I think if I use the intersect tool, then the calculate area tool in ArcMap, I can get the area of intersection(overlap), and eventually subtract that from the total values I got from R. The problem is, I have a bunch of fish, and want to automate the process, or else I'll be stuck clicking my life away.

I've tried to build a model using the iterate feature classes option in ModelBuilder, but I don't think it's actually iterating. Plus, I get an error for Calculate areas: "000641 : Too few records for analysis. This tool requires at least  feature(s) to compute results", which I don't understand because I've run it with only feature and it works fine. I'll attach my model attempt here. My goal was to calculate the total area of my KUD shapefiles, and then the area of intersection with the basemap, which I will eventually subtract.

Any advice would be greatly appreciated.


texts: Show or hide bands in GeoTIFF rasters (using QGIS)

texts:
I have a bunch of GeoTIFF images that show aerial photos of various fields. Bands 1-3 in these images contain the R/G/B components of the original photo. Bands 4-6 contain additional information about the pixels / raster cells in that image.

Now since I am a complete noob when it comes to GIS and GeoTIFF data, I am not sure how to handle these bands, how to show or hide them on top of the original RGB image. So I installed QGIS (I am working on Linux) and openend one of these TIFF raster images. The RGB photo is being shown correctly, but how can I show or hide the data from the additional bands 4-6?

Also maybe QGIS might be an overkill for me, as I am just looking for a (Linux) application, which I can use to view the GeoTIFF iamges and these  information in those additional bands. Do you have a recommendation for me?


texts: Storing printed values at Python Console of QGIS as variable?

texts:
Based in this answer to Getting features in order they are selected using PyQGIS?, I ran following code at Python Console of QGIS 3 for getting features id in order they were selected.

def onSelectionChanged():
    try:
        id = iface.activeLayer().selectedFeatures()[0].id()
        print (id)
    except IndexError:
        print ("no feature selected")

iface.activeLayer().selectionChanged.connect( onSelectionChanged )

I tried above code out with shapefile visualized at following image, where docked attributes table was used to corroborate that printed values at Python Console had correct order.

How can I modify my function for storing printed id values at Python Console of QGIS, as a list variable, without using a file written on disk drive?


texts: Get rid of extra empty category in QGIS categorized style?

texts:
I want to style my Data in a Categorized Style, with a Color Ramp according to a "Year".
But when I categorize my Data, QGIS creates a Categorie without a Value.
Thats a problem for my work, becuase my color ramp is starting and ending at a specific color.
So in my map there is the wrong color for the latest year.
So in my example picture 2017 must get the darkest green, and the other years would be a little bit darker then.
Is there an opportunity to tell QGIS ist should not create a categorie without a Value?


texts: Take URL Parameters including corner Coords in ArcGIS webmap and display polygon on launch

texts:
I have a list of corner coords for study areas in a sharepoint list. I used 'calculated field' to generate a url that launches our internal webmap in a new window and sets the extents as the coordinate corners. Client has asked for a bounding box to be drawn on launch.

As I understand it there would need to be some Javascript written in custom webmap/app that will decode the corner coords from the url parameter, create a markerfillobject and display it on the map. I am not a Javascripter.

I can change the structure of the url if required, but here is the current one - just using default parameters - http://www.arcgis.com/home/webmap/viewer.html?extent=121,-25,122,-24&mapOnly=true

The extent values are what should be shown as the polygon.

Can anyone assist?

We are not able to integrate the ESRI Maps for Sharepoint Web Part, (which I believe only does points anyway) - so please view sharepoint as only the method of generating the concatenated URL - not as the platform for development.

So it looks like a combination of a URL constructed to apply specific parameters for each corner point,

then,

use ESRI urlToObject to extract the values

then,

create polygon graphic using the values  from above

??


texts: Call marker color in Geojson to apply to leaflet.js in php

texts:
I have a geojson file which has marker-color properties in it.
In this case I want to call the marker color contained in the GeoJSON file, to change the marker color.
how to do this?
GeoJSON data:
    {
        "type":"FeatureCollection",
        "features":[
            {
                "type":"Feature",
                "properties":{"markercolor":"#1e7e7e","marker-size":"medium","marker-symbol":"","title":"Indonesia"},
                "geometry":{"type":"Point","coordinates":[107.9296875,-6.664607562172573]}
            },
            {
                "type":"Feature",
                "properties":{},
                "geometry":{"type":"Point","coordinates":[114.873046875,4.565473550710278]}
            },

Leaflet php code:
L.geoJSON(data,{
   pointToLayer: function (feature, latlng) {
        return new L.circleMarker(latlng, {
            radius: 8,
            fillColor: "#7e7e7e",
            weight: 1,
            opacity: 1,
            fillOpacity: 0.8,

        });
    },

    onEachFeature:onEachFeature
    }).addTo(mymap);
});


texts: arcgis map address table with mobility data

texts:
I have an excel table with mobility data from a few households....the columns are something along the lines of PersonID, HomeAddress, PurposeOfWay, WayNumber, StartTime, EndTime, DestinationAddress... Each person has a few ways associated with them. I would like to display this data somehow but I'm stuck. 1. person - 1. way - 2. way / 2. person - 1. way - 2. way - 3. way... and so on. I'm not sure how I should go about it? I used ArcGIS to geocode the home addresses...but what now?
Maybe someone has already done something similar and can point me in a direction?


texts: Mouse click on map not acurrately selecting feature for InfoTemplate popup

texts:
I have a web application that incorporate an infoTemplate (esriPopup) when the user clicks on a road feature in the map.  This works fine in the main map, but I have additional maps that compare 2 preloaded scenario maps. When the user zooms in to one of the scenario compare maps, they should be able to click one of the road features and the infoTemplate is displayed. What I am noticing is there is a slight offset of where the user has to click in order to get the infoTemplate to display properly. In other words, the user has to click slightly above the feature layer in order to select it and trigger the infoTemplate to display correctly. If the user click directly on the road feature, it displays "No information available".

It's a .NET application with most of the client side functionality in an AMD-style main.js file.  There is an esri.css and Style.css that controls most of the styling. I am refactoring the application and am having trouble even determining where the issue originates from (is it the cursor, the infoTemplate, or the roadsLayer settings?)

The infoTemplate for the scenario compare maps looks like this:

it = new InfoTemplate("Feature Info");
it.setContent(lang.hitch(map,generateInfoContent));
its = {};
its[idx] = { infoTemplate: it, layerUrl: null }
map.getLayersVisibleAtScale()[1].setInfoTemplates(its);

The method .getLayersVisibleAtScale() seems to be an esri method of class map but I have no clue why this would produce a slick offset in selecting the layer. Any ideas as to how to resolve this?


texts: Extracting wall information using LIDAR data?

texts:
I'm trying to extract wall using the LIDAR. I have tried Fusion, Whitebox, Lastools in Arcgis, Saga and Envi. Those are tools that I can use. The walls I am interested are mainly 1 meter high. Some of them locate in woodland and farmland. The most problem blocked me was shrub.  For example, I used 'Bare ground' tool of the softwares I mentioned above. All the wall and shrub were removed. If I worked by other workflow, the shrub will remain and  complicate walls.
Attached is one of my result:

How to remove shrub and remain wall?

How to convert information of wall into vector data such as polyline?


texts: Opening OpenStreetMap *.obf or *.pbf files in ArcGIS Desktop?

texts:
*.obf and *.pbf are compressed binary file extensions of OSM data.

I want to open these in GIS software like ArcGIS.

How is the conversion possible?

Is there any automated tool?


texts: Getting PyScripter to recognize Python installed with ArcGIS Pro

texts:
I am trying to get PyScripter 3.3 64-bit to run on my desktop computer.  I was successful in getting PyScripter 32-bit to run, but I require the 64-bit version.

It seems that it is unable to recognize the Python (3.6.2) engine that was installed with ArcGIS Pro 2.1, when I attempt to launch PyScripter I receive the following error:

What steps should I take to get PyScripter to recognize my installed version of Python?

*Note: I also currently have ArcGIS Desktop software installed on my computer with its version of Python (2.7.14).


texts: Counting number of vertices of polygons and lines in QGIS?

texts:
In QGIS, is there a way to count the number of vertices of polygons and lines in a given layer, and create a separate field containing these values?

I suspect it's a function somewhere in the field calculator but I can't find it.


texts: How to add georeferenced TIFF to AutoCAD 2010

texts:
I have a ~6GB georeferenced (from ArcGIS) .TIFF satellite image that a colleague wishes to add to AutoCAD 2010. He wants it as a base layer for digitising features from. I have searched forums but everyone seems to be talking about AutoCAD Map 3D when discussing adding a georeferenced .TIFF. I have used the 'add World File' tool for the .TIFF. It seems that the normal route of adding a layer attachment does not work. Does anyone know if it is even possible for AutoCAD 2010 to understand a georeferenced .TIFF created in ArcGIS?

Originally it was a raster catalog which I exported to a .TIFF. I would ultimately like to make a WMS for this, but don't have the requried ArcGIS extensions.


texts: How to detect undisturbed forest plot in Mudumalai National Park?

texts: I am looking for undisturbed forest plot (without logging for at least 50 years) in Mudumalai National Park (India) or around it. How to detect it using GIS or remote sensing?


texts: How to use a Geojson layer as a background mask?

texts:
I have some Geojson neighborhood shapes that I am using to create a small multiples chart.

They are like this:

I want to give them backgrounds for the area they represent. I want the streets and buildings to appear but only within the shapes.

What is the best way to try and achieve this?


texts: I seem to recall to have read about Thiessen polygons which, instead of having straight boundaries, had some irregularly shaped sides. That was since those polygons were actually taking into account the terrain's slope. Did anyone come across something like that?


texts: Is it possible to extract many municipalities out of a state map at once? I mean not to have to do the QUERY for each and one of them?


texts: Average polygon values for each ZIP code

texts:
I have a vector polygon feature class that I created from a raster (I did convert raster to polygon). I would like to output a table that averages the polygon values over the entire area of each zip code. For example:

ZIP     Amount
90210     16
90211     14

etc....

Each polygon is about 4km x 4km. I am using ArcGIS for Desktop 10.4.


texts: Creating square grid polygons from shapefile using ArcGIS Desktop and machine learning to predict wildfires

texts:
I'm currently working on a data science project where I would like to predict the probability of a wildfire in Washington state for a given location using machine learning.

I have latitude/longitude observations for historical wildfires. However, I need the negative class as well.

I am considering taking a Washington state shape file and breaking it down into small grid polygons to serve as my unit of observation. If a wildfire falls into that grid, then that grid is labelled as the positive class. I plan on layering other features such as topography, ecosystem, biomass counts, etc.

I'm struggling on how to create these small grids. I've been playing with ArcGIS Desktop for a few days now.

Could anyone point me in the right direction or provide a sanity check on whether this is a good approach?


texts: QGIS UTM zones - TIN interpolation plugin

texts: I am trying to add a Z-variable to a vector in order to eventually calculate the volume or the zone using TIN. I was told I first need to set my UTM in order for my Z-variable to be recognized in meters. If my vector spans accross various UTM zones, which ones do I use?


texts: Legend of CORINE land cover in ArcGIS 10.x layer file

texts:
I am looking for the legend of Land Cover (Corine Land Cover) for ArcsGIS 10.x. as a layer (.lyr) file.

I want to symbolize the classes without setting the RGB color values one by one; especially for level 2 and 3.


texts: Why aren't my integer columns available for graduated styling?

texts:
I have a layer with graduated styling based on an integer column. When I duplicate the layer to make a similar styling based on another integer column, none of the columns are available for graduated styling of the duplicate layer.

The layer is a shapefile and all the fields of all the integer columns have a value.
The same problem occurs when I save as a new shapefile, add it and try to apply graduated styling.

Why isn't it showing up in the list?


texts: Using shapely to scatter points in an equidistant manner around a MultiPolygon in a Box?

texts:
I have a box bounded by min_x, min_y, max_x, max_y, I also have a multipolygon = poly contained in that box. I'm trying to equidistantly scatter points throughout that box, outside of that multipolygon, for the eventual purpose of using a modified A* algorithm to find a route between two points.
Right now, I can generate points as such:
from shapely.geometry import Point
x_range = np.linspace(min_y,max_y,round((max_y - min_y)*2.5),False)
y_range = np.linspace(min_x,max_x,round((max_x - min_x)*2.5),False)
points = []
point_dict = dict()
i = 0
for x in x_range:
    j = 0
    for y in y_range:
        p = Point(y,x)
        if not poly.contains(p):
            points.append(p)
            point_dict[i,j] = p
        j+=1
    i+=1

They're in an x-y grid along the map, but I think a more efficient way to generate points for a path would be to create this grid then add a repulsion factor so they're all pushed away from each other inversely proportional to their distance from one another AND from the multipolygon and the bounding box. Eventually I imagine this would end up in some solid state equilibrium.
Right now I maintain a list of reference for each of the 8 nearest points to each point as follows:
edge_list = []
for point in point_dict:
    for i in [point[0]-1, point[0], point[0]+1,point[0]+2,point[0]-2]:
        for j in [point[1]-1, point[1], point[1]+1,point[1]+2,point[1]-2]:
            try: #we already excluded points s.t. poly.contains(point)
                if not point_dict[point].distance(point_dict[i,j]) == 0:
                    edge_list.append([point, (i,j), point_dict[point].distance(point_dict[i,j])])
            except:
                pass
            j+=1
        i+=1

Right now I use this edge list so that I can construct a graph and run djikstra's algorithm on it. By constraining it to the <= 8 nearest points, I reduce the number of edges that need to be checked foreach point.
My problem here is two-fold:

I have little idea how I would accomplish this repulsion addition computationally
I don't know how I would maintain a reference for the n-nearest points to each point after the equilibrium is reached.


texts: Qgis plugin: Qgis2threejs - 3D Object size/scale incorrect?

texts:
I've created a 3d map with objects (speheres, ashlar/extruded and cylinders) with Qgis2threejs. I noticed that the objects don't seem to fit in size. The sphere and the ashlar/extruded (made from polygon) should have the same height (meaning the object height), but they don't. The ashlar definitely looks higher/bigger than the sphere although they should have the same height/size.

A bit weird is that a few days ago both objects seemed to have the same height if I remember correctly.

I have read somewhere that the scale/size of 3d objects created with Qgis2threejs are not shown correctly. Is that correct?

Is there any way to solve this issue within Qgis2threejs?

Could the value for vertical exaggeration do something? It is currently on 1.5 default value. Playing with the value so far hasn't brought any improvement.

Edit: So below are my settings for the objects.

Currently it looks like this:

So my problem is that the red ashlar should start with its bottom at height 87 and be from there on 156 high. The sphere should be also up to 156 high (2 x 78), it should just fit in the ashlar. but in the 3d view it doesn't look like this.

Edit2: Used 156 for the sphere assuming that radius is not radius, but diameter.


texts: How to select the cross streets in postgis spatial table?

texts:
I've used ST_Intersects and ST_Crosses but between two different tables.
I have a table of streets and intersections want to know them.
For example select all streets that cross the Street A.
Can anyone give me an example?

Edited for karpfen**

This is my table of streets, each street segment is a geometry table.
The image of the QGIS layer can better understand, analyze and think it would be appropriate to use ST_Touches and select geometry that touches the other at its end.
But how do it in the same table?? I can not do a join.


texts: Intersect in QGIS returns empty shapefile

texts:
I've seen this asked and occasionally answered on the site, but none of the solutions applied. I am attempting to intersect points (i.e. NYC Motor Vehicle Collisions) to a polygon (i.e. a shapefile of the Bronx). When I do this, QGIS returns an empty shapefile. I have done this exact operation in arcmap without issue.

The CRS are different for both files, but I have one projected visibly over the other.  This should be a simple intersect w/2 files? What am I missing?


texts: QGIS - Clip: Differences between processing commands and built-in Python console

texts:
Two geometries can be clipped in various ways. I have expected the same result, but I got two different results. The following method I used.

I have selected the clip function and added two layers. The green feature is the correct result. The geometry has been clipped by the blue layer. Then I get the following result:

All processing commands are available from the QGIS built-in Python console. I used the function 'qgis: clip'.

processing.runandload('qgis:clip', layer1, layer2, None)

Then I get the following incorrect result:

It seems to me as if the blue layer is empty or is ignored.

What am I doing wrong?

Update:

The Feature (orange frame, layer1) should be cut at the blue layer (layer2).

What I do not understand is why the clip function of QGIS works. To find under: Vector -> Geoprocessing Tools -> Clip.

When I run the following code, I get an incorrect result:

processing.runandload('qgis:clip', layer1, layer2, None)

Even if I reverse the two layers, I get the same result:

Why I do not get the same result? Take the tools not the same clip function?


texts:
I have a simple WebGIS with Mapserver, Tilecache and Openlayers. This project has something like 12 zoom levels.

The problem is when I zoom for several layers (say 8 lavels), it becomes very slow, since it tries to load images for all the previous 8 zoom levels.

Has nay body have any idea how to overcome this problem?


texts: qgis 2.8.1 - processing gdal 1.11.2 error (mac, 10.10.2)

texts:
i've just recently installed qgis 2.8.1 on my mac.
including all relevant packages from kyngchaos - i.e. GDAL Complete 1.11 framework package, Matplotlib Python module, numpy - and updated python to 2.7.9

did some testing and was pretty happy with the new 2.8.1

when i tried to run gdal/ogr geoalgorithms from processing toolbox qgis returned the following  error:
"GDAL command output: /bin/sh: xxx: command not found"
... where xxx is the name of the command.

same problem with any tested command !

i've already been searching for that kind of issue for a while but didn't find anything that could solve the problem. most promising was an article about inserting /Library/Python/2.7/site-packages - path into sys.path ... but nothing changed.


texts: How to interpolate polyline or line from points?

texts:
We have a lot of points, but with no timestamps to create ways. For now, I've created a sample of the way the points traverse. It's in here, this way can be compared with a Google one.

I haven't found a proper function in PostGIS or a tool in Python to do so. Does anyone have any hints for how I can accomplish this? Remember the points have no timestamps or another way to be ordered, and we do not have a way to follow, just the points and from those we want to generate the polyline.

We have about 500,000 points in the country to work with, and we want to trace some new ways where there are not still in OSM.

The first task we want to address is to interpolate the ways.

Preferably we would work with PostGIS or libs in python. The hard thing is to "isolate" in some way the points that could conform a way.


texts:
We are planing a geo caching game, where we want to use QR Codes. Each time a player scans a QR Code, he will be redirect to a specific landing page.

To each QR Code we want to add geo information like an address or lng/lat. So we can find out, where and how often the QR Codes have been scanned, without asking the mobile device to send its location to us. Is there a service, that provides tagging a QR Code with a geo location?


texts: Using CURRENT_DATE function on ArcSDE SQL Server Database?

texts:
I am writing a script to access data from each day.  I would like to select by attribute and send these features to a local file geodatabase.  After reading some documenation, CURRENT_DATE is the function which reads data for today.

This is an example of my data '2015-02-02 00:00:00'.  I don't have the time for any features, so in reality it is only YYYY-MM-DD.  In a local file geodatabase, the query

PlannedDate = CURRENT_DATE works.  However in my ArcSDE SQL Server connection it does not.


texts:
I load a set of JSON points from my server, the points are stored in EPSG:32720, which is UTM 20S, and also for testing the same points are stored in EPSG:4326 coordinates.

Using OpenLayers 3.8.2, I load the two files and can see how the points of EPSG:32720 are reprojected and perfect match drawing one circle inside the EPSG:4326 points.

But when use OpenLayers 4 the reprojection fails, the points are displayed in another country.  The documentation of version 4 is little different to version 3.
OL version 4 apidoc.

openlayers.org-en-latest-apidoc-ol.format.GeoJSON.html

OL version 3.8.2 apidoc.

openlayers.org-en-v3.8.2-apidoc-ol.format.GeoJSON.html

The problem is that I try 4 options:

     proj4.defs("EPSG:32720","+proj=utm +zone=20 +south +datum=WGS84 +units=m +no_defs");
    var sourceProj = ol.proj.get('EPSG:32720');

    1) var UTMFormat = new ol.format.GeoJSON({defaultDataProjection: sourceProj});
    2) var UTMFormat = new ol.format.GeoJSON({defaultDataProjection: 'EPSG:32720'});

    3)var UTMFormat = new ol.format.GeoJSON({featureProjection: 'EPSG:32720'});
    4)var UTMFormat = new ol.format.GeoJSON({defaultDataProjection:'EPSG:32720', featureProjection: 'EPSG:32720'});

     var vectorLayer32720 = new ol.layer.Vector({
            source: new ol.source.Vector({
                url: '/static/centroids32720.geojson',
                format: UTMFormat
            }),
        style: stylePointsBlue
       });

Only the 1 and 2 work with OL 3.8.2, but can figure what is wrong? I make two plunker samples one with 3.8.2 and the other with version 4.

Version 3.8.2 https://plnkr.co/edit/RNE48KkEKqiAnAd0Ssu2?p=preview

Version 4 https://plnkr.co/edit/DvwImnvi8looJRZYOjB6?p=preview

Someone can tell me what is wrong in the version 4?


texts: How to set QGIS map canvas size programmatically

texts:
I need my map canvas to be exactly 1920x1080. So the Save as image would save a png exactly this size.
I've tried setting it with

iface.mapCanvas.resize(QSize(1920,1080))

But no luck, resize() seems to be deprecated.
I'm using QGIS 2.16.0.

I'd also like to set map extent programmatically, if that's related.
Unfortunately, using composer is not an option here.


texts: How to use python to export ArcGIS Server Map Service Properties?

texts: What arcpy module can I use to write a python script to mine for fields of my map service properties and export them to a .tx file? I assume we need to tap into GIS Servers within the ArcCatalog interface?


texts:
The .asc LiDAR files provided by the environment agency have height values provided to a precision of the level used to measure atoms. How to quickly lose a few of the pointless digits on the end to get from attometers to centimetres?

There must be a simple solution but I can't see it.

I have tried raster calculator but the results of the calculation below are still in attometers.

(ToInt("DSM@1"*10))/10


texts: Editing touching polygons simultaneously?

texts:
Is there any way - in ArcGIS - to edit touching polygons simultaneously?

More precisely - when I  split one polygon I would like to automatically add a  vertex in the other polygon that shares the edge where the split happened.

Any way to do that?


texts: Laz LiDAR files displaying extremely long thin line of points

texts:
I am having difficulty properly visualizing aerial LIDAR data from the csc.noaa.gov source.

Taking any of the .laz files, the point cloud displays as an extremely long thin line of points. Zoomed in, there are cyclic perturbations in the points along that line, which leads me to believe that some sort of transform is necessary to properly visualize the data. For comparison sake, the aerial LIDAR data set found in opentopo.sdsc.edu visualizes as one would expect.

Both claim to use NAD83 as the horizontal coordinate system. From what I can tell, the only major difference is one is las 1.0 and one is las 1.2. That being said, I don't really know what I'm doing.

A little bit of background to help guide an answer. I do not come from a GIS background, but rather am interested in comparing my LIDAR point clouds against a geographically accurate model, say a quality aerial LIDAR collect. For now, while learning, I have been using the free applications LAStools and CloudCompare.


texts: How to pass a variable in VB codeblock in ArcPy to calculate a field?

texts:
How do I pass a variable name - as the variable, not its name as a string - in a VB codeblock when calculating a field in ArcPy?
I am using field calculator in a tool I built with Model Builder to replace null values in one field of a feature class with 0,  using a VB code block. It works as expected when I run the tool.
The field name is a string variable: Count_DATE where I update DATE in the field name daily.
When I export and run the tool from a Python script, there's an issue with the variable of the field name in the VB codeblock.
Count_DATE = "Count_DATE"
fc = Count_by_area
arcpy.CalculateField_management(fc, "%Count_DATE%", "Output", "VB", "If IsNull([%Count_DATE%]) Then   Output = 0 Else   Output = [%Count_DATE%] End If  ")

I tried removing the % and [] but am not sure how to deal with the entire code block being within quotation marks.


texts: arcpy.Select_analysis choosing only a fraction of the record

texts:
I'm trying to divide up a feature class into a number of smaller sets. I have been using Select_analysis with objectid to divide up the featureclass so far but know that this is not the best method.

So for example, currently I have something like:

query = "objectid > 0 +  AND objectid <= 1000"

arcpy.Select_analysis(r"C:\Users\CHOK\Desktop\mulithreading\multiprocessing.gdb\Contours",r"C:\Users\CHOK\Desktop\mulithreading\multiprocessing.gdb\Contours_Mereged",query_statement)

What I want to know is if I can use the number of rows in the feature class to generate the query rather than relying on the objectid? So say I get the number of rows of the feature class using arcpy.GetCount_management(featureclass) and it outputs 1.9 million, is there a way I can divide that 1.9 million into 10 parts based on the count rather than objectid?


texts: How to provide transform information to openlayers on Image layer

texts:
I would like to include an overlay raster layer into my OpenLayers map.  I've pre-transformed the image into the correct projection (EPSG:900913) and saved as a png using the gdal_translate command:

gdal_translate -a_srs "EPSG:900913" -of "PNG" $RASTERFILEDIR/$x ../data/$x.png

When the file converts it includes an .xml file with transform information as follows:

<GeoTransform>
  7.0153687766181468e+05,
  2.9999999999999904e+01,
  0.0000000000000000e+00,
  9.5377345182658464e+05,
  0.0000000000000000e+00,
  -2.9999999999999904e+01
</GeoTransform>

In OpenLayers I'm loading the image like this:

var imageLayer = new OpenLayers.Layer.Image(source.label, source.src,
  new OpenLayers.Bounds(source.bounds[0],source.bounds[1],source.bounds[2],source.bounds[3]),
  new OpenLayers.Size(source.size[0], source.size[1]),
  {
     isBaseLayer: false,
     alwaysInRange: true,
     projection: new OpenLayers.Projection("EPSG:900913")
  });
mapObj.map.addLayers([imageLayer]);

Where the bounds and size are calculated correctly.  I end up seeing my image hovering over Africa instead of Columbia.  It looks very much like there needs to be a translation included, but I'm not doing it correctly.

How do I know where to look for the translation amount, and how do I provide that information to OpenLayers?

The application I'm working on is here:  http://www.stanford.edu/~rpsharp/map-overlay-annotation-test/inseam_explorer.html

Thanks for any help!


texts: Send an automatic email when modifying attributes (a specific field) in a service/ feature class (Portal ArcGIS Enterprise / ArcGIS Online)

texts:
I would like to create a Python script (or find any other way) to send an automatic email when information in one field of my feature class (service) is being modified in either ArcGIS Online or Portal.
I am not looking for sending an email when a feature is added, but rather when it's been modified.


texts: How to define pycharm to understand PYQGIS and GDAL

texts:
I use pyqgis in standalone apps and I have defined paths in Windows and Python paths to take python API from outside QGIS.
I have created some simple tools using pygis and GDAL in standalone script using Python editor and all work fine without error qgis.core and GDAL work nice.

Now I want to use pycharm editor and I have big problems.

First, it shows me two interpreter python.exe and bin/python.exe
but have some paths.

Now in pycharm if I use python.exe, it shows me dll error in GDAL and qgis.core.  If i use python from QGIS then I have imports error in other packages i need.

Why does it do that?  In python, IDLE works fine.

Here the windows define paths :

pythonpath

C:\OSGeo4W64\apps\qgis-ltr\python
C:\OSGeo4W64\apps\qgis-ltr\plugins
C:\OSGeo4W64\apps\Python27\Lib\site-packages

path

C:\OSGeo4W64\bin
C:\OSGeo4W64\apps\qgis-ltr\bin
C:\OSGeo4W64\share\gdal
C:\Python27\
C:\Python27\Scripts

I think so the problems is the paths.

Any idea how to fix that?

UPDATE :

My quest is simple i think, but i don#t know how to fix it. I have installed python version 2.7.13 QGIS have his python... if in the define paths QGIS python path is below from PYTHON path then QGIS python API don't work, if I change order and is above then work but recognizes site-packages from QGIS PYTHON ONLY...that I think is error


texts: How to write a command in shell script to install GRASS extension?

texts:
I have a script shell (UBUNTU 14.4) installing an environment for batch processing in PYTHON.
It installs GRASS like this :

echo '     installing PYTHON-GDAL    '
echo '-------------------------------'
apt-get install python-gdal
echo '-------------------------------'
echo '     installing GRASS          '
echo '-------------------------------'
apt-get install grass
apt-get install grass-dev

Next, how can I code the installation of  GRASS extension (exple : v.centerpoint) in that shell?


texts: Compute annual mean of overlapping cells using daily rasters

texts:
I am stuck at somewhat simple looking calculation. I have daily temperature rasters from 2001 to 2014 with following name format:

`2001001`
`2001002`
 |
 |
 `2014365`

I want to compute annual mean rasters using overlapping cells of same years. How do I insert all rasters from same year as a list of rasters into the numpy.mean at the end of following? Any suggestions to get annual mean rasters would be appreciative.

import arcpy
import numpy as np
import datetime

# Define time duration to handle leap years
#**************************************************
time = []
start_date = datetime.datetime(2001,1,1)
end_date = datetime.datetime(2012,12,31)
step = datetime.timedelta(days = 1)
while start_date < end_date:
    time.append(start_date.strftime('%Y%j'))
    start_date += step

time = [int(i) for i in time]

# Convert rasters to numpy array and compute mean
#**************************************************
annual = numpy.zeros((1200,1200))
for ii in time:
    ras = arcpy.RasterToNumPyArray(file_path + str(ii))
    tt = time[ii]
    if ii == 0:
        year_old = tt[0:4]
        index_start = ii
    else:
        year = tt[0:4]
        if year != year_old:
            year_mean = np.mean([index_start:ii],axis=0)


texts: Get min/max of Lat and Long leaflet map getBounds

texts:
I have the bounding box of a map in leaflet with map.getBounds() which returns the NorthEast LatLng and SouthWest LatLng.
How do I get the minimum and maximum of bothLat and Lng from this bounding box. I needed to use this information to fetch all coordinates in my db that falls within these ranges.


texts: Stopping ArcGIS Desktop setting Gamma on raster load?

texts:
I often import raster files using GDAL utilities.  When those rasters are added to ArcGIS they seem to have a Gamma Stretch applied and a percent Clip stretch for RGB files.  Contrast ids also set to 10% by default.

Is there any way of creating an RGB geotif that ArcGIS will display with true RGB values instead of using default stretch values?


texts: Using FME to merge lines in multiple SHP layers

texts:
I have multiple layers of complex laine data that I need to flatten int a single layer of lines.

The issue is that some of the line data overlaps and intersects and is not end node to end node. How in FME can I take this data anf flatten it into a single set of joined lines?


texts: How to add a Data Frame to mxd in a c# stand-alone application?

texts:
I am writing a stand-alone application in c# (using vs2010). I have ArcGis Desktop license.
I only need to insert a new data frame in an mxd file and save this mxd.

So: I create MxDocument coclass. Then get IMxDocument interface from that. Then i use its "Maps" property which return me IMaps interface. From that I call its method Add() to add a new dataframe.

Code:

Dim pDocClassOut As MxDocumentClas = New MxDocumentClass()
Dim appl As IApplication = TryCast(pDocClassOut.Parent, IApplication)
Dim mxDoc As IMxDocument = TryCast(appl.Document, IMxDocument)
Dim maps As IMaps = CType(mxDoc.Maps, IMaps)
Dim pMap1 As IMap = New MapClass
pMap1.Name = "XYZ"
maps.Add(pMap1)

mxDoc.UpdateContents()
appl.SaveDocument()
appl.SaveAsDocument("E:\DEV EnGIS\Untitled.mxd")
appl.Shutdown()

Why this simple code doesn't work?
Thank you so much!


texts: Distance unit between line and point shapefile

texts:
I have two files:

A point shapefile containing latitudes and longitudes of points.
A .kml file that I am converting to a line shapefile.

Objective: To find the minimum perpendicular distance of the points from the lines. Suppose we have four points p1, p2, p3, p4 and two lines l1, l2. For point p1, I have to find the distance of the closest line. Same for other points.

I joined the line shapefile on point shapefile. As a result, I get an extra field in the point shapefile. The extra field denotes the required minimum distance. The problem is that I do not know the unit of this distance. I am using NAD 1983 geographical coordinate system (GCS) whose angular unit is degrees.

I tried changing the GCS of both point and line shapefiles to a projection coordinate system with distance units as meters. However, this displaces the points far away from the lines (virtually not displaced at all) in ArcMap. Consequently I get the distances in thousands of miles, which is erroneous.

Please suggest a way out.


texts: Cannot add Remote Service from a local GeoServer to Geonode

texts:
I am new to Geonode and I know this is a very basic question.
I am struggling a lot with adding a remote service in Geonode using a WMS from GeoServer.
Why do I get back this error?
Could not connect to the service at http://localhost:8888/geoserver/test/wms

I cannot get why this happens and how it can be solved.
If I open the link on the browser:


texts: I am trying to download some Landsat 5 images from EarthExplorer, but for the years 1990-2009 I get only 17 results. Does anyone know why is there such an incontinuity? The only filter that I use is the path row.


texts: How to convert an integer field to date field in ArcGIS

texts:
Basically my problem is the opposite of  Transforming ArcGIS date field to integer?

I have an integer field of year values (2005,2006,...)

I want to create a date field that has the value of that integer field as a year (I don't care if it is 1-1-2006). I just want the year correct.

How can I do it manually, and this shapefile has almost 7000 rows?

Is this possible?


texts: Accessing bands of a NetCDF by datetime in Python

texts:
I want to write each band as a separate file (after gdal.Translate operation). So I can directly address to each band by datetime, not by a number?

The second way, more sophisticated is to get all datetimes from file (by GetMetadata()['NAME_of_Metadata']) and then make a cycle by this range (indices of the array of dates) and corresponding band numbers - I already done it, but it seems too tricky.


texts:
I´ve built my own mapstyle and mapsource on Mapbox. After that I included the Directions Plugin in my HTML-Site. Works so far.

Problem is the Directions Plugin don´t use my own Line-Elements for the routes. I think the routign is based on the standard-map from Mapbox...

How can i change that?


texts:
I'm new in Python programming
If there are websites where developers can share their add-ins and scripts that will be great.
do you know any?
unfortunately, arcgis.com only provide very few


texts: Changing the selection color in the flexviewer 2.4?

texts:
I am under the impression that by changing the 4th color (in this case 0x000000) will change the Selection color.  However, when I go use the search tool, my results are still displayed in the old color.  You used to be able to set the color in the Identify tool.

<style>
<colors>0xFFFFFF,0x333333,0x101010,0x000000,0xFFD700</colors>
<alpha>0.8</alpha>


texts: Finding DEM/HIllshade sources California

texts: Creating watershed maps for schools. I want to color ramp the elevation to show low and high points. What kind of files do I need and where to find them?


texts: How to extract pixel values of a polygon shape, using R for annual (365 files per year), daily NetCDF raster files?

texts:
I am trying to extract a daily value from a study area (given polygon). The files are provided as annual NetCDF files (365 of them per year) for a daily value. However, with GIS programs it would be far too tidious, hence I am looking if R for example can perform an extraction of the needed values as a so to say, time series. I only need the values or the value within a pre-defined polygon (for example with long and lat of it e.g.).
Thus, I need a time series, I am not looking into processing one file at a time.
Preferably, I want all the Metadata can provide (long, lat, etc) as a Excel file or Txt file.
Is there a way to script it in R, that the files are processed and the respective values are extracted?
With my research I already found the package"raster" for R, however I have limited skills considering R.
Probably someone can help or give hints how to proceed with my problem.
add update:
install.packages("raster")
install.packages("sf")
install.packages("rgdal")
install.packages("exactextractr")
install.packages("ncdf4")
install.packages("ggplot2")

# load necessary libraries
library(raster)
library(sf)
library(rgdal)
library(exactextractr)
library(ncdf4)
library(ggplot2)

setwd('D:\\Studium\\Masterarbeit\\05_aris_sBarley_2018\\sBarley')

# read NetCDF raster files in given directory
files <- list.files('D:\\Studium\\Masterarbeit\\05_aris_sBarley_2018\\sBarley',pattern='*.nc',full.names=TRUE)
files

#generate raster stack
vname <-"RSS_TOP"
r <- stack(files)
r
newr <- brick(r, CRS=TRUE, values=TRUE)
newr
plot(r)
crs(r)<-("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")

#generate raster brick
crs(newr)<-("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
newr
plot(newr)

# load shapefile for area of interest
field <- read_sf(dsn = 'D:\\Studium\\Masterarbeit\\Ebod und Parrot', layer = "BOKU_Feld")
field
#change projection
fieldnew <- sf::st_transform(field, crs = "+proj=longlat +datum=WGS84 +no_defs") #same projection as raster stack
fieldnew
summary(fieldnew)
plot(fieldnew)

Unfortunately, my projections of the crs of either, the shapefile as well as the rasters dont match. The shapefile is centered in my raster instead of its actual location --> check picture.
Is there a way to change the crs of my shapefile to project correctly, or can I read the extent of it in order to project it as raster instead?[![Shapefile in wrong location][1]][1]
#plot a random rasterfile of the stack \\ plot the shapefile on top as preparation to crop and mask
plot(r[[50]])
plot(fieldnew, add=TRUE)

r.mask =mask(r, fieldnew)
r.mask

# mask areas other than area of interest
r.crop <- crop(r, fieldnew)
r.crop

# calculate mean over area of interest
r.mean <- calc(r.crop, mean)
r.mean

  [1]: https://i.stack.imgur.com/PKXfA.jpg


texts: How to write EXPRESSION for main contours in Mapfile?

texts:
I'm working with mapfile. I defined new layer "contours" and I want to render with maxscale = 100000 and minscale = 50000 contours with value distance of 50. That means that I want in that scale render only those countours with values of "height" attribute of 0, 50, 100, 150, 200, 250, 300, 350.. etc.

LAYER
 NAME "contours"
 TYPE line
 STATUS off
 DATA "contours.shp"

 CLASS
   NAME "all_contours"
   STYLE
     COLOR 176 226 255
   END

  #Is this CLASS I started creating correct?

   CLASS
       NAME "main_contours"
       MAXSCALE 99000
       MINSCALE 50000
       EXPRESSION #this is my question

   END
END


texts: Entity (point) is not show in 3D mode of Cesium?

texts:
I've added an entity:

var debris = cesiumViewer.entities.add({
  position : {
    value : Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883, 1000) ,
    referenceFrame : Cesium.ReferenceFrame.FIXED
  },
  point : {
    color : Cesium.Color.YELLOW,
    pixelSize : 6
  }
});

The point is shown in 2D and Columbus mode, but hidden in 3D mode. Also, in Columbus mode it looks like the altitude iz 0.

Added also cesiumViewer.scene.globe.depthTestAgainstTerrain = true;

Where is the issue?


texts: Is there a way to assign a feature from the majority of points to a polygon with *join attribute by location* QGIS 2.18

texts:
I am working on a map of ethnic groups and I am looking to do two closely-related things by joining attributes from points to polygon.

1) I would like to assign the mode of (string) values of points in a given polygon to that polygon.

2) I would like to weight each point by population to determine the majority point based on the string value with the most population in each polygon.

Example:

1) I'd like the location with more "red" than "green" dots to assign a "red" value to the polygon.

2) For a polygon in which "purple" is only one dot among many "red" and "green" dots, but the "purple" occupy a city of 10,000 and the others only occupy small villages, I would like the polygon to assign a "purple" value.


texts: How are ESRI WKT projections different from OGC WKT projections?

texts:
Does anyone know the precise list of differences between ESRI WKT and OGC WKT projection format strings?

I know there are various tools to help convert from ESRI WKT to OGC WKT, including GDAL utilities and various website services. But my question is not of a practical kind, I simply want to understand the formatting/syntax differences that these services make use of. Previous Stackexchange questions have only talked about the difference in specific examples or about the tools and services available.

Even if you just know one difference it would be great if you could just post it. From my own experience there should only be a small handful of differences. The differences i know of are:

most text items in esri definition uses underscore where ogc uses space.
the text defining the datum in esri wkt is same as ogc wkt except it starts with "D_".
sometimes the text identifiers for some predefined PROJCS, PROJECTION, GEOGCS, and DATUM are written differently (eg "NAD83" in one being "North_American_1983"). I guess the only way to know which identifiers are spelled differently would be to have a list or lookup table, so please name any that you know are different.
the various PARAMETER text values are all the same, except ogc has each word upper titlecase whereas esri has everything lowercase. However, i have seen cases where this rule hasnt been used, does anyone know if titlecase actually matters when it comes to software trying to load them?
the type of UNIT is spelled upper titlecase in ogc and lowercase in esri, eg "Degree" vs "degree". In some cases i have seen ogc being spelled as both "meter" and "m" for "Meter" and in other cases with french spelling "metre". Anyone know what the correct convention is for these or any other unit type for both formats?


texts: How to add Cross Origin Filter for Jetty in GeoServer on Mac

texts:
I want to add an Access-Control-Allow-Origin:* to the response from GeoServer because I need to download images from another domain. Instand of build a proxy, I prefer to use Cross Origin Filter of Jetty(GeoServer's Web Server) to achieve this. However, I don't know how to set it up in GeoServer.

My GeoServer's version is 2.1.3 so the Jetty's version is 6, which does not include the jetty-servlets.jar.
I downloaded the jetty-servlets-8.1.5.v20120716.jar from here and renamed it to jetty-servlets.jar, then put it into /Applications/GeoServer.app/Contents/Resources/Java/webapps/geoserver/WEB-INF/lib/
Then I add the following codes to the web.xml file at /Applications/GeoServer.app/Contents/Resources/Java/webapps/geoserver/WEB-INF/web.xml

    <filter>
        <filter-name>cross-origin</filter-name>
        <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>cross-origin</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

At last, I restarted GeoServer but the page at http://localhost:8080/geoserver/web showed me an error 404:

HTTP ERROR: 404
NOT_FOUND
RequestURI=/geoserver/web
Powered by jetty://

Is there anyone who can help me? Thank you!


texts: How to rotate the screen in ArcGIS-Online?

texts:
I need to print out my map in ArcGISOnline, however I'm using a grid system and need to rotate the screen so that I can print each map individually and have them line up.
Any thoughts on how to do this?
I will attach a screenshot to help better understand what I mean.


texts: Is there any way to empty, destroy, clean a layer in memory from an script?

texts:
I'm using very big memory layers:

Is there any way to empty (fast), destroy or clean a layer in memory from an script without exit from this script ?


texts: Applying mask to 40 Landsat images on ENVI?

texts:
I'm new to ENVI and am working on a time series for a section of the Santa Barbara Channel.

I have a mask I made from the ROI tool, but was wondering if there is an efficient way to mask all 40 of my images instead of doing it manually image by image?

Also, is there a particular term I should look for when searching for information on bulk processing on ENVI?

I'll be using L4-5 and L7, if that means anything.


texts: Python QGIS reliable intersection/overlap check between points and lines

texts: In my script I need to check, whether a point I created stored in a memory layer lies on a polyline, which is in another memory layer. I am certain, that the point does overlap/intersect the line, because I can see it on my canvas and have coordinates (CRS do match) printed by the script. I tried point.intersects(line) but to no great success - sometimes it works, sometimes it doesn't. What function/method would you recommend to check for overlap of point and line, which would return a boolean and not result in any output layers?


texts: How can I log the information which NTv2 grid was used by gdal/ogr

texts:
I am using gdal/ogr to transform my data from EPSG31467 to EPSG 25832.
I modified the epsg-string for EPSG 31467 so it uses a NTv2-grid ("BWTA2017.gsb").

<31467> +proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +datum=potsdam +nadgrids=@BWTA2017.gsb,@BETA2007.gsb,null +units=m +no_defs

Is it possible to log if gdal/ogr really used this NTV2-grid for transformations or if it used the two other options that were set as fallback-options ("Beta2007.gsb" or null)?

I want to be able to know for each transformed file if the provided NTv2-grid was used or less accurate parameters were used instead.

EDIT1: FME for example logs the objects that are outside the valid grid extent:

2018-03-01 13:35:35|  32.2|  7.1|WARN  |Coordinate (approx) 8E:47N outside grid file coverage; fallback used.
2018-03-01 13:36:00|  55.1| 22.9|WARN  |Coordinate (approx) 7E:47N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  3.7|WARN  |Coordinate (approx) 20E:60N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 23E:62N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 172E:10N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 63E:42N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 44E:70N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 51E:123N outside grid file coverage; fallback used.
2018-03-01 13:36:05|  58.8|  0.0|WARN  |Coordinate (approx) 96E:9999S outside grid file coverage; fallback used.


texts:
I have thousands of buildings blocks in ArcGIS. I want to select a half of this blocks randomly.

How can I do it?


texts: QGIS 3.00 crashes while QGIS 2.99 worked well

texts:
Using the standalone-installers 64bit  on a windows 10 64bit pro machine:
various 2.99 version including the latest 2.99 build #8 worked well with the project global_connections from the book QGIS Map Design written by Anita Grasser and Gretchen Peterson.

After deinstalling 2.99 and installing the version 3.00 build #3 standalone the same project crashes:

questions:
1) can anyone confirm this behaviour?
2) how is this possible?
addendum for underdark:
without the labels it works fine:


texts:
My goal is to make Zoom Control movable in a leaflet map.
For this I tested this code.

<!DOCTYPE html>

  <meta charset="UTF-8">
  <title>Creating Draggable DOM Elements</title>
  <link rel="stylesheet" href="../leaflet/leaflet.css" />

This one does not work for the zoom control.

I tested that later for attribution. Dragging works here.

What am I doing wrong with the zoom control?


texts: Adding domain to have dropdown box in Attribute Table using ArcGIS for Desktop?

texts:
http://resources.arcgis.com/en/help/main/10.1/index.html#/as_a_stand_alone_feature_class/002200000005000000/
Line 23 - To associate a domain with this field, click the field next to Domain, click the drop-down arrow to see a list of the domains that apply to this field type, then click the domain.

i am trying to get where, in the attribute table, I have a dropdown box.  I follow the instructions in here and I am getting knowhere.  What am I not doing, is there more to do then what this states?  I am using ArcView 10.1

I go to the FEATURE CLASS PROPERTIES, under FIELDS, I have the field name "STATUS" and text.  Then I go to SUBTYPES.  The subtype field shows , what do I need to add to that field?  I can't click anywhere in those boxes.

I am just looking to have the dropdown boxes under status  "producing", "leased" etc...


texts:
It is suggested to install mdenoise via :

wget http://www.cs.cf.ac.uk/meshfiltering/index_files/Doc/mdsource.zip
unzip mdsource.zip
cd mdenoise
g++ -o mdenoise mdenoise.cpp triangle.c
ln -s `pwd`/mdenoise /some/directory/on/the/$PATH

But it fails, returning :

g++ -o ./script/mdenoise/mdenoise ./script/mdenoise/mdenoise.cpp
./script/mdenoise/triangle.c
./script/mdenoise/mdenoise.cpp: In function ‘void ReadXYZ(FILE*)’:
./script/mdenoise/mdenoise.cpp:1418:44: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
         triangulate("zqBQ",&in,&out,&vorout);
                                            ^


texts:
Is there a difference between Data Driven Pages and Map Books in ArcMap 10.5 and, if so, did one replace the other?

Esri's web site is not clear about that which is confusing me.


texts: I have feature layer which needs to be updated with new attribute information. The text field I need to populate already has an established coded domain. I need to update hundreds of records and don't want to manually update. If I field calculate the selected values aren't I adding a new value not associated with my domain? What is the correct workflow for this type of mass edit?


texts:
How can I extract .osm file from PostGIS database? I've been trying Osmosis:

osmosis --rp database="gis" user="postgres" password="123" --wb

gives me an error:

org.openstreetmap.osmosis.core.OsmosisRuntimeException: Task 2-wb does not support data provided by default pipe stored at level 1 in the default pipe stack.

with osmosis --rp ... --wb option:

SEVERE: Thread for task 1-rd failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to create resultset


texts: How do you view your Python scripts in the processing toolbox in QGIS 3?

texts:
I have been stuck on this for a while and I'm not sure if it is a bug or me doing something wrong but I cannot work out how to add Scripts to the processing toolbox in QGIS 3 series.

When I click the Script icon and navigate to "Add script to toolbox" nothing happens. I have looked in my processing options and checked that the directory to the scripts is correct.


texts:
I didn't find any answer to this question. In this post it is said that labels are by default on top of everything else: How to place labels under a vector layer?. But it was for 2.2, and years went by since then so maybe now there is the possibility...

So I would like labels of a layer to appear under symbols of another layer. For now I get a result like you can see below.

The blue squares with blue content is a personnalized symbol (linked to a database), and this is the main information to be displayed. The greyish number is a cadastre reference, which need to appear, but not so prominently. I also have sometimes some other labels on the same space, which I also would like to appear under the blue box. Does anyone know a way to do so directly in QGIS ?


texts:
If I am using one extra large GeoTiff as datasource.
Does Mapnik take advantage of tiled structure of source file (its a GeoTiff with internal tile structure) when rendering tiles? Which driver/plugin I should use to ensure that?
Raster or Gdal?


texts: Obtaining feature extent while iterating using PyQGIS?

texts:
I have a polygon layer upon which i want to create a point layer (regular points) depending on each feature's extent of the polygon layer. So far i have to create a field containing the adequate string:
concat(x_min($geometry),',', x_max($geometry),',', y_min($geometry),',', y_max($geometry)

And then parse that field in a loop:

for feature in layer.getFeatures():
    attrs = feature.attributes()
processing.runalg("qgis:regularpoints",attrs[14],1000,0,False,True,outfile)

Since my approach appears to be rather bulky and inflexible i was wondering whether there are more direct ways to get the extends - something like layer.getFeaturesExt() or layer.getFeaturesBbox()?


texts: Identifying dwellings/homes from imagery using ArcGIS for Desktop?

texts:
I have a task where I need to identify dwellings/homes on property lots. The data that I have is an aerial image of the town, cadastre/property boundaries, land tenure information and land-use.

I was thinking using the land-use data to identify the residential areas and use those areas to select the cadastre/property boundaries (which may or may not have a dwelling/home on it).

What I am looking for is way to minimise residential properties that are vacant lots. Checking each lot manually will take forever so I am looking for some advice that could assist e.g. software that could detect a buildings from imagery or links to similar problems and solutions.

I am currently using ArcGIS 10.2.


texts: Rotating polygon in geometry generator based on feature attribute?

texts:
That's a bounding box generated with the geometry generator with variables from a table:

geom_from_wkt(
'POLYGON(('||
(x( $geometry ) + ("width"-"bleed")*"scale"/2)||' '||(y( $geometry ) + "height"*"scale"/2)||','||
(x( $geometry ) + ("width"-"bleed")*"scale"/2)||' '||(y( $geometry ) - "height"*"scale"/2)||','||
(x( $geometry ) - ("width"-"bleed")*"scale"/2)||' '||(y( $geometry ) - "height"*"scale"/2)||','||
(x( $geometry ) - ("width"-"bleed")*"scale"/2)||' '||(y( $geometry ) + "height"*"scale"/2)||','||
(x( $geometry ) + ("width"-"bleed")*"scale"/2)||' '||(y( $geometry ) + "height"*"scale"/2)||','||
'))')

Is it possible, to rotated such a geometry by value from attribute table?


texts: How does ArcMap calculate the rotation of polygon labels?

texts:
I am trying to duplicate some functionality in ArcMap,
ArcMap will rotate a label to fit inside a polygon. If you convert the labels to annotation this rotation value is available in the annotation table. How can I calculate a rotation for a label just using the polygon geometry and Python?


texts: How to download/enable missing predefined Coordinate Reference System QGIS 3.10 on MacBook

texts: I have downloaded QGIS 3.10 on MacBook Pro which uses MacOS Mojave. But the predefined CRS aren’t pre loaded. How do I load it?


texts: Map disappears when setCenter in openlayers 3

texts:
I have a problem centering the map in OpenLayers 3:

When i click the button to center the map, the map dissapears, this only happen with the version 3.19.1 of openlayers. The same code with vesion 3.17.1 works well.

Why is happenning this?

Fiddle 3.19.1 (Map dissapear)

Fiddle 3.17.1 (Works)


texts: ArcGIS Reclassify fails in Python Toolbox

texts:
I'm trying to build a Python Toolbox to analyze submarine landslides. Among other things I want to run the aspect tool and then reclassify the aspects into groups with a 45 degree interval. Therfore I do the following:
import arcpy
import arcpy.sa
arcpy.env.workspace = r'C:\FIP_Tools20191118\GIS_files\SBP_Toolbox.gdb'

arcpy.CheckOutExtension('Spatial')

aspect_ras = arcpy.sa.Aspect('Smooth_Bathymetry', 'PLANAR', 'METER')
aspect_ras.save('aspect_raster')

remap = RemapRange([[0, 45, 45], [45, 90, 90], [90, 135, 135], [135, 180, 180], [180, 225, 225], [225, 270, 270], [270, 315, 315], [315, 360, 360]])
reclass_ras = arcpy.sa.Reclassify('aspect_raster', 'Value', remap, 'NODATA')
arcpy.CopyRaster_management(reclass_ras, 'reclass_Ras')

The weird thing is that the above code works fine as long as I run it from Pycharm or the ArcGIS Python window, but when I try to put it into a python toolbox (.pyt) and run it, it throws the following errors:

ERROR 000864: Reclassification: The input is not within the defined domain.

ERROR 000893: An empty GP value or text is entered.

I really don't understand why it won't work in a toolbox. The fact that it works otherwise tells my that there isn't a fundamental problem within my code, which is why I'm expecting it to be some background stuff that I'm missing. I'm really at a loss here.
I'm using ArcGIS 10.6.1 on Windows 10


texts: Help embedding OpenLayers map in Eclipse BIRT report

texts:
I have this code, it displays the zoom buttons only but it doesn't display my map.

What could be the problem?


texts: How to export ArcGIS feature class to Waze?

texts:
I've got a geodatabase containing a local municipality road system.
I'm looking for a way to export it into Waze in order to improve Waze existing road system.

The only way I found so far is to edit Waze road system manually, which can take quite a long time.

Is there any way doing so in a more straightforward way?


texts: QGIS: georeferencer, resolution-dependent behaviour, why resolution is negative

texts:
I am trying to georeference sovet military maps from maps.vlasenko.net.
I have manage with one, but to my surprise I am failing badly with georeferencing a second file  (M33-3 map).  Let me go piece by piece.

I am using georeferencer plugin of QGIS. I have defined about 20 ground control points, and below I paste my settings: [image file below]

Now the problem when "targer resolution" tickbox is checked I am getting "failed to compute GCP transform:  transform is not solvable".  I am surprised to find that the parameters describing the resolution of the output file should determine whether the GCP problem can be solved on not.

When I set the resolution to 1 -1  i get an output file which is (2x3 pixels - TWO by THREE pixels, six in total, any other resolution results in the above error).

Additionally:

why the vertical resolution is negative? Setting it to a positive value is not possible (program does not accept any string which does not start with a minus sign)
edit: now, due to comments, I know that the resolution referes to "distance" between the two pixels in the real world but what is the exact definition? distance in "degrees" between two pixels meaning if I set resolution to -0.001 I will get 1000 points between 48N and 47N?
The output file if it is generated is  4416x2868, while the inupt file was 3640x3690. How do I prevent QGis from redusing the vertical resolution?

These are my points:

mapX,mapY,pixelX,pixelY,enable
12.5,49.6666666666666643,696.44124605543004236,-679.36131645390867106,1
13,49.6666666666666643,1258.51471519414258182,-684.41549413144286973,1
13,49.3333333333333357,1256.54119318181801646,-1269.91464359504129789,1
13,48.6666666666666643,1248.05952995867664868,-2436.66748450413160754,1
14.5,49.3333333333333357,2953.55126647356382819,-1261.53862463428208684,1
14.5,48.6666666666666643,2969.13251018327309794,-2429.89975814664012432,1
15,48,3564.46622379741438635,-3586.28640693407032813,1
12,48,76.4774047927286631,-3589.3263771639708466,1
12,50,145.94363378099018291,-86.07935175619095958,1
15,50,3494.49134769610191142,-85.47891450564263494,1
12,49,111.34988378099140505,-1837.0186596074308909,1
15,49,3530.48463326446426436,-1836.4230371900771388,1
13.5,48,1821.41237949674950869,-3604.3516086135855403,1
13.5,50,1820.503563331398027,-101.45661704556296456,1
13.5,49,1821.47190893987476557,-1852.47153220938480445,1
14,49.6666666666666643,2382.41388305881719134,-683.36089241037620923,1
12.5,48.3333333333333357,667.39443784955994943,-3013.91477973141627444,1
14,48.3333333333333357,2399.19324876641030642,-3018.47076644672188195,1
14.5,48.3333333333333357,2976.20023527521971118,-3012.75593990486959228,1
14,49.3333333333333357,2387.19608165803492739,-1267.08280010578459951,1
14.5,49.6666666666666643,2945.54654068545914924,-678.16992496819614189,1
14.5,50,2937.55372078595246421,-94.48770356814071647,1


texts:
I know it's possible to query products for Sentinel 2 via their SciHub, or using a tool like http://sentinelsat.readthedocs.io/en/master/

However, I need to somehow, given a product ID, get a URL to a specific band in JPEG200, like the following URL example:

https://scihub.copernicus.eu/apihub/odata/v1/Products('22e2fbfe-0aa7-423d-b0b5-df46527f03f5')/Nodes('S2A_MSIL1C_20170316T112101_N0204_R037_T29SNC_20170316T112658.SAFE')/Nodes('GRANULE')/Nodes('L1C_T29SNC_A009043_20170316T112658')/Nodes('IMG_DATA')/Nodes('T29SNC_20170316T112101_B04.jp2')/$value

This is the Band 4 of a given product.


texts: OpenCageData geocoder: automatically update place name on marker drag

texts:
I am using the combination of:

OpenStreetMaps
Leaflet.js
Leaflet Routing Machine + lrm-tomtom plugin (routing done using TomTom API)

and now I have decided to switch from Nominatim geocoder (which is default in LRM) to OpenCageData geocoder. They do have plugin for Leaflet, works fine except one minor thing:

  When I drag the marker to change the route, the geocoder input is updated in form of coordinates, like on the image below, whereas Nominatim updates the place name automatically.

Is there any way to implement same functionality for OpenCageData geocoder? I guess there should be but haven't figured that out yet.


texts: Optimal Voxel Database Schema in PostGIS

texts:
I have a database of point data in PostGIS that I'd like to work with as voxel data. For each voxel, the value would be the number of particles within its volume. Let's say for the sake of argument each cell is n degrees lat by n degrees long, m feet high, spanning the globe.

I'm wondering how to set up this database: the first thing that comes to mind is to use a raster where each grid cell is the base for the voxel at that area, then to store the voxel data for each altitude range in bands of the raster.

Another option I'd considered is to make a table of polygons representing all the voxels, then have another table of values and voxel ids.

Is there a standard method for working with 3-dimensional raster data in PostGIS?


texts: Applying value to buffer area using ArcGIS Desktop?

texts:
The aim of the investigation is to determine the range of pollution concentrations which the paths (purple) are exposed to from roads (the yellow bands represent concentrations at different distances)(Figure 1).
I am trying to give the bands the concentration value so that I can perform an intersect and obtain the values which the paths are exposed to.

How can I apply value to the buffer area?

I know I can convert to raster, I have tried this but the end result is rather sketchy (Figure 2).


texts: I'm trying to create a project that maps out bus routes in CartoDB, and a lot of the streets have a lot of curves and turns. Is there a way to snap the lines to the street grid?


texts: How to extract numbers from each vectors?

texts:
I'm trying to create custom legend for a layer where OpenLayers.Rule objects are created dynamically and added to a layer.

new OpenLayers.Rule({
                symbolizer: {
                    strokeColor : color,
                    fillColor: color
                },
                filter: new OpenLayers.Filter.Comparison({
                    type: OpenLayers.Filter.Comparison.BETWEEN,
                    property: p,
                    lowerBoundary: from,
                    upperBoundary: to
                })
            })); and so on ..

I need to extend functionality of legend where for each rule I need to extract how many vectors affected by the rule so that when user changes interval boundaries as above, drawn legend replaced by new numbers.

Is there any built-in functionality for this in OpenLayers ?


texts:
Given a GeoPandas's GeoDataFrame containing a series of polygons, I would like to get the area in km sq of each feature in my list.
This is a pretty common problem, and the usual suggested solution in the past has been to use shapely and pyproj directly (e.g. here and here).
Is there a way to do this in pure GeoPandas?


texts: Adding border style to country which has geometry type polygon?

texts: I have a drop down list and when I select a country name and the map goes to this country, I want to add a specific border style to this country (polygon geometry).


texts:
I want to print the map with operational layers, but it failed, i use cmv viewer, when i remove layers, printing works, is there a configuration which i must do in the server ?
Below is the part of widget's code

          print: {
            include: true,
            id: 'print',
            type: 'titlePane',
            canFloat: true,
            path: 'gis/dijit/Print',
            title: 'Imprimer la carte',
            open: false,
            position: 6,
            options: {
                map: true,
                printTaskURL: 'http://localhost:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task',
                copyrightText: 'sarl',
                authorText: 'fedwa',
                defaultTitle: 'Entrez un titre ',
                defaultFormat: 'PDF',
                defaultLayout: 'Letter ANSI A Landscape'
            }
        },

here


texts: Adding field and calculating expression with PyQGIS?

texts:
I want to use PyQGIS to add a new field and calculate the values for each feature. Similar to Field Calculator option.

My 'Field Calculator' expression is for example: y(start_point($geometry))

from PyQt4.QtCore import QVariant
from qgis.core import QgsField, QgsExpression, QgsFeature
vl = iface.activeLayer()

vl.startEditing()

#step 1
myField = QgsField( 'myNewColumn', QVariant.Float )
vl.addAttribute( myField )
idx = vl.fieldNameIndex( 'myNewColumn' )

#step 2
e = QgsExpression( 'y(start_point($geometry))' )
e.prepare( vl.pendingFields() )

for f in vl.getFeatures():
    f[idx] = e.evaluate( f )
    vl.updateFeature( f )

vl.commitChanges()

This is the error I get:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/var/folders/0r/q6nxg6w54fv4l7c8gksb2t500000gn/T/tmp9dosIe.py", line 30, in <module>
    f[idx] = e.evaluate( f )
KeyError: '-1'


texts: vegetation classification from only the panchromatic band

texts:
I am mapping mangroves over a period of several years using satellite imagery. I use QGIS semi automatic classification plug in. Supervised classification (maximum likelihood) as I can visually identify the trees.
For one year I have only the panchromatic band available. The problem is that the spectral difference of the mangroves not only to other vegetation but to everything except water does not seem to be enough to differentiate them.
I tried using a lot of training sites but still no success.
It would be great to have some advice/ideas as to how to approach the task.


texts: How to change SAGA path in QGIS 2.18 Standalone

texts:
I have installed QGIS 2.18 Standalone (64 Bit) with SAGA GIS (2.1.2) and GRASS GIS 7.
Afterwards I have installed the newest SAGA GIS 3.0.0.

I want to change the SAGA folder in the processing options, but there is no option there anymore (like in older versions and explained in this answer).

Is there another way to change the SAGA path in QGIS 2.18?

EDIT 1:

Is it right that QGIS 2.18 doesn't support the SAGA GIS 3.0.0 version?

In this answer it its explained which Saga Algorithm Provider can be used.

EDIT 2:

I checked the Advanced Options like in the answer from HDunn. There is no SAGA_FOLDER option as well.


texts: Using ArcGIS Tabulate Intersection to determine maximum land cover within polygon area

texts:
I have a shapefile (layer A) containing different polygons - each polygon representing an ecoregion. I have another layer of polygons (layer B) - each polygon representing a watershed boundary. I want to determine the ecoregion (layer A) with the greatest footprint within each watershed (layer B).

The Tabulate Intersection tool allows me to calculate the percent of each ecoregion in layer A in each watershed in layer B, and I can then join this table to layer B - but what if I only want the max value?

Meaning the ecoregion, and the associated percent, that is the largest ecoregion within the watershed.  Is there a simple way to direct the Tabulate Intersection tool to only produce a table with the largest ecoregion footprint in each watershed?

I can do this by hand when working with small datasets but would prefer it is automated for larger ones.


texts:
I'm using R/tmap in both view and plot mode (for slightly different purposes with the same underlying data) and trying to work out how I can overlay on top of an OpenStreetMap basemap but force that basemap to display in greyscale rather than colour. Preferably in view mode but otherwise interested in plot mode also. Main reason to do this is that when plotting polygons on top of a basemap, all colourblind-friendly quantitative palettes end in a pale yellow colour which can be difficult to pick out against the greens in OpenStreetMap. I don't mind if the base layer is less distinct in greyscale, it's just for orientation.
tmap_mode('view')
tm_basemap(server = "OpenStreetMap") +  # this is as far as I've got
  tm_shape(my.layer) + tm_polygons(col = 'my.continuous.variable')

Edit:
I also tried
tmap_mode('plot')
osmtiles <- tmaptools::read_osm(bb(my.layer), type="osm")
tmap_mode("plot") tm_shape(osmtiles) + tm_rgb(saturation = 0)

But even with saturation = 0 the basemap still gets displayed in colour. I even tried saving to png and still the same. Any clues as to what I'm doing wrong there?


texts: Overlay a Lat/Long CSV and NAD83 Shapefile in QGIS?

texts:
I have a shapefile/accompanying projection files etc:

CURRENT.prj
CURRENT.shx
CURRENT.shp
CURRENT.dbf
CURRENT.sbx
CURRENT.sbn

I also have a CSV of geocoded (lat/long) points.

I load up my lat long points using add delimited text layer save them using: use spatial index with X == longitude and y == latitude.  I set the CRS as WGS 84.  This loads up nicely and in the expected shape.

However, when I load my shapefile I no longer see my points and I only see the contents of my shapefile.  My CURRENT.prj file shows:

PROJCS["NAD_1983_StatePlane_New_Jersey_FIPS_2900_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",492125.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-74.5],PARAMETER["Scale_Factor",0.9999],PARAMETER["Latitude_Of_Origin",38.83333333333334],UNIT["Foot_US",0.3048006096012192]]

If I look at the layer properties it's using NAD83 as its CRS.

It's not clear to me if the points are no lining up with my shapefile or are simply scaled to a size that isn't visible.  I have tried several different CRS settings to no avail. How do I go about debugging this?

It actually just seems to depends what I load up first.  If I load up my lat/long points I see those, if I load up my shapefile I see that instead.  I never see the second thing I load.  "Zoom to Layer" has no effect either way, I can only zoom to the first thing I loaded.

If I go "set project CRS from layer" I can then switch between "zooming" to my points or shapefile.  Looks like they're just mapping to very different places (projecting isn't working)?

My shapefile's coordinates are in the 600k, 600k range, while my point coordinates are all in their lat/long (think -70, 40) so it definitely looks like it's not projecting correctly.

For reference I am new (as in a few hours of messing around) to GIS.


texts: How to include custom graphics layers in Esri ArcGIS print task

texts:
I have an Esri map, and a print task service, After loading the map, I have added custom graphics on my map, but when I tried to take the screenshot by using JavaScript Print Task (esri.tasks.PrintTask), it is only printing the default map same as it is ArcGIS Server, not printing the programmatically added custom graphics. Here is my code.

this.exportWebMap=function(url,map,width,height){

        var deferred = new Deferred();
        var printTask = new PrintTask(url);
        var attrs={};
        var template = new PrintTemplate();
        var mapWidth=map&&map.width?map.width:this.currentMap.width;
        var mapHeight=map&&map.height?map.height:this.currentMap.height;
        template.exportOptions = {
            width: mapWidth,
            height: mapHeight,
            dpi: 96
        };
        template.format = "JPG";
        template.layout = "MAP_ONLY",
        template.preserveScale = false;
        template.showLabels = true;
        template.showAttribution = false;

        template.layoutOptions = {
            "legendLayers": [], // empty array means no legend
            "scalebarUnit": "Miles",
            "copyrightText": "
xxx
",
        }
        var params = new PrintParameters();

        params.map = map||this.currentMap;
        params.template = template;

        printTask.execute(params, function(success){
            deferred.resolve(success);
        },
        function(error){
            deferred.resolve(error);
        });
        return deferred.promise;
    }

Print Task JSON

{
    "geometryType": "esriGeometryPolygon",
    "features": [{
        "geometry": {
            "rings": [
                [
                    [1394673.6791358888, 433055.85258604586],
                    [1394680.201104477, 433069.9998674691],
                    [1394686.46519956, 433083.3777934611],
                    [1394691.6935355663, 433094.899095878],
                    [1394704.8713307232, 433089.2193172127],
                    [1394716.3017540574, 433084.7445886284],
                    [1394727.1435958892, 433080.7009615451],
                    [1394739.709843725, 433076.03791312873],
                    [1394732.3896483928, 433060.93656538427],
                    [1394724.798128143, 433045.49433904886],
                    [1394720.2138197273, 433035.48615697026],
                    [1394708.6295253038, 433040.35196088254],
                    [1394698.9999513924, 433044.4631731361],
                    [1394688.3766130656, 433049.2423630506],
                    [1394677.6417263895, 433053.9851357192],
                    [1394673.6791358888, 433055.85258604586]
                ]
            ],
            "spatialReference": {
                "wkid": 102723,
                "latestWkid": 3735
            }
        },
        "symbol": {
            "color": [255, 26, 26, 255],
            "width": 1,
            "type": "esriSLS",
            "style": "esriSLSSolid"
        }
    }]
 }


texts: Creating migration flow map using MapInfo?

texts:
my first post on this forum :)
Being a beginner in Mapinfo, I didn't find any tutorial on creating a thematic map of migration flows, something like;

or

I tried Arrow40 extension but couldn't get nice results.

Any ideas/hints for Mapinfo? any alternative software that is specialized on that? or should I just create the map in Photoshop?


texts: Access CommandItems programmatically with ArcObjects in ArcGIS Engine application

texts:
I'd like to programmatically execute a command in my ArcGIS Engine application with ArcObjects. I know in Desktop I would do it like this:

ESRI.ArcGIS.Framework.ICommandBars commandBars = m_application.Document.CommandBars;
ESRI.ArcGIS.esriSystem.UID uid = new ESRI.ArcGIS.esriSystem.UIDClass();
uid.Value = cmdname; // Example: "esriFramework.HelpContentsCommand" or "{D74B2F25-AC90-11D2-87F8-0000F8751720}"
ESRI.ArcGIS.Framework.ICommandItem commandItem = commandBars.Find(uid, false, false);
commandItem.Execute();

but IApplication is not available in an Engine environment. Is there an alternative way for standalone (ArcGIS Engine) applications to do this?


texts: Where to put the sub dataset in a windows loop when running gdal translate on NetCDFdata?

texts:
I need to run below command and it works great (note the -sds).

for %A in ("C:\temp\*.nc") do gdal_translate -a_nodata 65535 -stats -ot Float32 -unscale -a_srs "+init=epsg:4326" -sds -co COMPRESS=DEFLATE -a_ullr -180 90 180 -90 "%A" "%A.tiff

but my NetCDF has 3 subdatasets and I only need it to run on one of them.
so I used (note the :sst in the next to last argument)

for %A in ("C:\temp\*.nc") do gdal_translate -a_nodata 65535 -stats -ot Float32 -unscale -a_srs "+init=epsg:4326"  -co COMPRESS=DEFLATE -a_ullr -180 90 180 -90 "%A:sst" "%A.tiff

The error is

  ERROR 4: `C:\temp\a.nc:sst' does not exist in the file system,

but it does not recognize the sub dataset Here is what GDALINFO returns

  SUBDATASET_3_NAME=HDF5:"a.nc"://sst   SUBDATASET_3_DESC=[4320x8640]
  //sst (16-bit unsigned integer)


texts: Transforming CAD File To shapefile (with Projection) Using FME Batch File

texts:
I want to convert files from within my application. I've tried a lot, but I can't find a solution.
I have a DXF file with which I know the projection system (EPSG:4326). And I want to transform it to a shapefile with projection.

Here are a few of my experiments;

fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" --_SOURCE_CSYS "EPSG:4326" --_DEST_CSYS "EPSG:3857"
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" --_SOURCE_CSYS EPSG:4326 --_DEST_CSYS EPSG:3857
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" --ACAD_COORDINATE_SYSTEM "EPSG:4326" --_DEST_CSYS "EPSG:3857"
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" --ACAD_COORDINATE_SYSTEM EPSG:4326 --ESRISHAPE_COORDINATE_SYSTEM EPSG:3857
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" COORDSYS, "EPSG:4326" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" COORDSYS, "EPSG:3857"
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" COORDSYS, EPSG:4326 ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" COORDSYS, EPSG:3857
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" --COORDSYS "EPSG:4326" ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" COORDSYS "EPSG:3857"
or
fme gentrans ACAD "C:\Users\User\Desktop\1360\File.dxf" --COORDSYS EPSG:4326 ESRISHAPE "C:\Users\User\Desktop\1360\SHP\" --COORDSYS EPSG:3857

This code will use in C# project.

When I use FME Desktop Translator then it output files has *.prj. (Total 4 files)

When i use FME Console App then it output files hasn't *.prj (Total 3 files - *.dbf, *.shp, *.shx)

How can i set projection system on converting process?


texts:
I have a problem with selection by location:

I need Arcgis to automatically count for each of my bus itinerary (see capture) how many times a" polygone " will be " within a distance of the source layer 100 meters" .

Is there any king of script or models that!can help me to automatize this selection

If not any ideas?


texts: ST_Union on Rasters in Geoalchemy2 using ORM

texts:
I am attempting to perform a union on two rasters I pick from my postgis database using GeoAlchemy2.
I have a Raster table defined:
from geoalchemy2 import Raster
from sqlalchemy.sql import func

Base = declarative_base()

class RasterData(Base):
'''
Raster class
'''
__tablename__ = 'images'
__table_args__ = {"schema": "public"}
raster = Column(Raster)

Then I attempt to use ORM to union two raster tiles using
engine = create_engine(db_str, echo=False)
Session = sessionmaker(bind=engine)
session = Session(expire_on_commit=False)

rasters = session.query(RasterData.raster).limit(2).all()
merged = session.query(func.ST_Union(rasters)).all()

This unfortunately errors out with:
psycopg2.ProgrammingError: can't adapt type 'RasterElement'

The above exception was the direct cause of the following exception:

It seems I might need to cast this as something else but I am unsure what. Any ideas what the code above is missing to complete the union?


texts: Choosing projection to make Arizona look "normal"?

texts:
I am having issues projecting my AZ state boundary from looking like this:

to looking like this:

I found that I could use the U.S. National Atlas Equal Area to get the shape I want, but when I try to project my Arizona Boundary Shapefile, a good geographic transformation doesn't show up.

What is a good coordinate system that I can use as a projection to get my desired shape? For the record, the first shape is GCS_NAD_1983. I'm not sure what the second shape is.

I am using ArcMap 10.3


texts: Overlapping LAS tiles and edge artifacts

texts:
I've read the Overlapping LAS tiles post, but it doesn't pertain to the following situation.
I'm trying to process a las catalog where I clip the catalog at specific plot locations with a 30 m radius.

As a result of the 30 m radius, the clipped tiles overlap and I see edge artifacts in the output (as indicated might happen in the readLAScatalog warning).

Is it possible to process these tiles as a catalog without edge artifacts?
Or will I need to read each file individually using readLAS?
I've tried processing the catalog sequentially, but the output still has edge effects.


texts: Do I need a Google Map API key for using GoogleMap in my project?

texts: Do I need a Google Map API key for using GoogleMap in my project where I am using OpenLAyers2.13?


texts: Filling a field in a layer using a spatial relation with another layer/shapefile?

texts:
I want to know how I can fill in a column of a layer based on a certain relation criteria to another layer. In my case I want the column "straat" in my "bomen" shapefile filled in with the value's of "Staatnaam" in the shapefile "straat". However, the value that will be filled in is linked to a certain criteria relation. In this case, since "Bomen" is a point shapefile, each point forms a circle of 36 meters in radius (so 36 meters in every direction). The name for the closest street that intersects/crosses the "circle", needs to be added into the "Bomen" shapefile in the "straat" column.

How do I do this? If you guys can still not understand this what I am asking, here is an illustration. The "Bomen" and Straat shapefiles are the PostGIS layers, but this part is not important.


texts: Join by attribute when unique identifier has multiple rows using ArcMap 10.2?

texts: I would like to join the attributes of one polygon layer to another polygon layer by their common ID. The problem is that in layer A, each ID has multiple rows, because each represent shapes from the layer B cut in multiple pieces (intersected with other information) and I need that information to be replicated each time within the boundaries of the layer B. Is there a way to join by attribute, so that the target layer B repeats rows of the adjoining Layer A, when the ID in Layer A occurs multiple times?


texts: Importing Excel spread sheet with desc, northing and easting into Google Earth to make KMZ

texts: I have a spreadsheet with three columns containing a Description, a Northing and an Easting in UTM. Instead of entering the points in by hand, I want to find a faster method.


texts: How to show a point on mouse over a hidden polygon?

texts:
Any suggestions on how to show a point on mouse over a hidden polygon?

A single kml file contains two polygons and two points as in the image, I've hidden these polygon and point by setting stylemap fill color, is there any way to show the points on mouse over the hidden polygon.

Any guidance and help is appreciated.

Thanks in advance.


texts: I want to insert a names or percent text into each category in a piechart. I have googled and cant find a way to do this in arcgis pro. Is there a solution to this problem?


texts: ArcGIS Operations Dashboard: Is there a way to create a widget which counts the occurrence of a text attribute?

texts:
I am using Operations Dashboard of ArcGIS and I would like to add a widget which count the occurrence of a text value "DAMAGED" in a field ("STATE"). I only found the way to access numeric attributes, but not text ones. I also tried with the widget "Interrogation" (I hope the traduction is right), but I am supposed to start an operation to find the desired number. Rather, I'd like to have a number showing wothout any action. I thought using a filter on that field would do the trick, but this seems only possible for numeric data as I said.

As my field "STATE" can only have two values ("WORKING" or "DAMAGED"), I am aware I can change to a numeric type of field (1 or 0), but this solution would not be as descriptive as the text way, and I would prefer not to change it. Does anyone know how to do this with the "standard" Operations Dashboard (not entering the "developer side")?

To give an overview of what I am doing: I created a point feature representing the public lights of a city (data are invented); I added the field "STATE" which has a domain to only allow the choice between the two attributes "WORKING" and "DAMAGED"; I published the feature to AGOL as feature service. At the end I would like to change the attribute of some lights from "WORKING" to "DAMAGED" with Collector, and see a sort of warming (a count actually) using a widget in Operations Dashboard.


texts:
I am using a simple ASCII raster file to test the rasterio.mask module

ncols 4
nrows 4
xllcorner 0
yllcorner 0
cellsize 0.5
nodata_value -9999
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16

I generated the following script which should extract all the diagonals

import rasterio
import shapely
from rasterio import mask

def extract_by_mask(raster_dataset, geometry):
    #outputs a numpy masked array with values within polygon geometry
    geometry = [shapely.geometry.mapping(geometry)]
    m = mask.mask(raster = raster_dataset, shapes = geometry)
    return m
r = rasterio.open('raster.asc')
p = shapely.geometry.Polygon([[0,0],[0.3,0.1],[1.58,1.5],[2,2],[1.56,1.8],[0.1,0.4]])
m = extract_by_mask(r, p)
print m

It does extract the diagonals, but I'm not comfortable with the resulting mask array:

(masked_array(
  data=[[[-9999, -9999, -9999, 4],
         [-9999, -9999, 7, -9999],
         [-9999, 10, -9999, -9999],
         [13, -9999, -9999, -9999]]],
  mask=[[[False, False, False, False],
         [False, False, False, False],
         [False, False, False, False],
         [False, False, False, False]]],
  fill_value=-9999), Affine(0.5, 0.0, 0.0,
       0.0, -0.5, 2.0))

It seems to consider that all the values are valid, such that when I take a mean it considers all the values including nodata:

>>> m[0].mean()
-7497.125

I have been playing around with some of the parameters in the mask method but no luck. I think the one I'm looking for in the docs is filled = False but when I do this I get an error:

Traceback (most recent call last):
  File "D:/Basis/common.py", line 114, in <module>
    m = extract_by_mask(r, p)
  File "D:/Basis/common.py", line 109, in extract_by_mask
    m = mask.mask(raster = raster_dataset, shapes = geometry, filled = False)
TypeError: mask() got an unexpected keyword argument 'filled'

It doesn't seem to recognize filled as a valid argument. I am using rasterio version 0.36.0 by anaconda.

I need that mask array to show True for the diagonal values so I can only consider those for calculations.

Could anyone help?