texts: Closest Facility routes do not align with network dataset

texts:
I am running both Service Area analysis and Closest Facility analysis using the same network dataset, StreetMap Premium 2017R3. The service area lines exactly line up with the underlying street network, but the closest facility routes do not - they appear to be more generalized. I need these to line up as I'm trying to combine these outputs into a single linear feature. I'm running these using a geoprocessing tool in Python 3.x so it should be using my install of ArcGIS Pro 2.1.2.

Code to create routes in the closest facility analysis:

# create layer
result_object_cf = arcpy.na.MakeClosestFacilityAnalysisLayer(pathtoroadnetwork, nameofnalayer, line_shape="ALONG_NETWORK")

#Get the layer object from the result object. The closest facility layer can
#now be referenced using the layer object.
layer_object_cf = result_object_cf.getOutput(0)

# load locations
arcpy.na.AddLocations(layer_object_cf, facilities_layer_name_cf,
                        facilities_cf, "", "", append="CLEAR")
arcpy.na.AddLocations(layer_object_cf, incidents_layer_name_cf, incidents_cf,
                      field_mappings_cf, "", append="CLEAR")

# solve
arcpy.na.Solve(layer_object_cf)
print(arcpy.GetMessages())

# export output
routes_layer_name_cf = sublayer_names_cf["CFRoutes"]
out_cfroutes = "name_of_output_routes"
arcpy.management.CopyFeatures(routes_layer_name_cf, out_cfroutes)

I receive no errors during this processing.

According to the documentation for Closest Facility, the setting I'm using (line_shape="ALONG_NETWORK") should produce lines that match the underlying network.

  No matter which output shape type is chosen, the best route is always
  determined by the network impedance, never Euclidean distance. This
  means only the route shapes are different, not the underlying
  traversal of the network.

  ALONG_NETWORK —The output routes will have the exact shape of the
  underlying network sources. Furthermore, the output includes route
  measurements for linear referencing. The measurements increase from
  the first stop and record the cumulative impedance to reach a given
  position.

An example of the issue is found below. The underlying thin line is the Routing_ND, the orange line is from the service area, and the magenta line is from the closest facility routes.

I've tried recreating the dataset, and have also tried copying the traversed edges instead of just the output lines.

traversedEdges = arcpy.na.CopyTraversedSourceFeatures(layer_object_cf, "in_memory", "TraversedEdges", "TraversedJunctions", "TraversedTurns").getOutput(0)
outEdges = "nameofedgeoutput"
arcpy.management.CopyFeatures(traversedEdges, outEdges)

It looks like I may be able to force these closer to each other using the Integrate tool (possibly not, due to export restrictions on the roads) but ideally I want to follow the actual road network, not arbitrarily move both the accurate (service area lines) and inaccurate (closest facility routes) closer to each other. My next thoughts are to 1) try to extract out the paired start and closest facility location and use the Route Analysis Layer or 2) use the ArcGIS Desktop 10.5.1 version of this tool, which has a parameter of output_path_shape instead of line_shape, and try output_path_shape ="TRUE_LINES_WITH_MEASURES".

Do you have any other suggestions or something I might have overlooked?


texts: ArcGIS Pro cannot read SQL Server databases with "-" in their name

texts:
I am using the latest ArcGIS Pro 2.2.1 and trying to use a geospatial database that is hosted in an Azure SQL Server. The issue is that ArcGIS Pro fails to query databases that have "-" in their name.

I tried with a test database and a spatial table that I called, for example, test-geo-dataset. I could successfully connect to the database server, select this database and see the different tables from the catalog panel. However I am unable to move data to the map. It also fails exporting data to a local geodatabase with the following error:

  ERROR 999999: Something unexpected caused the tool to fail. Please refer to the error help for potential solutions, or contact Esri Technical Support http://esriurl.com/support.
   Underlying DBMS error[[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near '-'.]
   Failed to execute (TableToTable).

If I rename the same database to, for example, test_geo_dataset, then I can drag tables to the map and export to a local geodatabase and all this works flawlessly.

I tried finding more information regarding this limitation but I cannot find if it is an ArcGIS Pro or SQL Server issue. All other SQL clients that I am using are capable of querying the test-geo-dataset (with "-") database. Is there a fix or a workaround for this issue?


texts:
I would like to merge two similarly constructed spatialite databases. I have tried to open a first database (1), add the second database (2) to the project and copy/paste the attribute table from (2) in the attribute table from (1)...it doesn't work (too simple I guess).
Similarly how can I merge two databases with very small differences (one created in QGIS Chugiak, the other in QGIS Nodebo)


texts: ArcGIS - separate/split shapefiles by attribute range and save

texts:
Problem:
I often have a shapefile that I classify into 3-5 classes based on the values of a specific field. Usually I am interested how many features are in each class and which area has each of the classes.
How I solve it: My workflow to solve it was to use the "Select by Attribute" to get one class, then make a layer from the selection and do the statistical calculations, then eventually save it as separate shapefile.
I have to redo these steps for each class.
Question how it could be solved more efficient:  I was wondering if ArcGIS provides a tool how this can be solved in a more efficient way. I know of the tool "Split by attributes" but the problem is, that my classes often are not given by a single field value, but include a range. Imagine a shapefile with rivers where I classify them into small (<5m), medium (5-20m) and large (>20m). I would need to set the field to the width, but to include a range and not making every single field value to split the shapefile. Maybe I would have to reclassify these values first, but is there a tool to reclassify based on a shapefile and not a raster?
I know that it could be easily solved by a small script, but I was thinking that many people could have this problem and maybe I overlooked the appropriate tool.


texts: Copy class in higher level in eCognition

texts:
I use eCognition to do classification. I do segmentation and I class it in level-1. Then I do segmentation in level-2. How to copy class from level-1 and paste the class in level-2 ?
There is 'Copy image level' algorithm. I succeed to use it and the class change in level-1. But when I turn to level-2, it is still no class. I don't know how to paste in level-2.

Is there anyone help me?


texts:
I have seen APIs and algorithms for calculating isochrones for a single point, e.g. https://openrouteservice.org/dev/#/api-docs/isochrones.
Is it possible to calculate the isochrone for a line segment, e.g. a route? The assumption is that a user can switch direction at any point in the route.


texts: How to plot geometry(MultiPolygon, 3044) QGIS based datatype in python


texts: How to programmatically determine whether a spatial reference factory code is valid?

texts:
I am using the following code segment to create a spatial reference.

    spatialReferance = arcpy.SpatialReference()
    spatialReferance.factoryCode = spatialReferanceFactoryCode
    spatialReferance.create()

But it gives the following error:

  Runtime error : ERROR 999999: Error executing function.
  the input string is not a geographic or projected coordinate system

How can I programmatically determine whether a factory code is valid or not?


texts: QGIS Templates don't save guides or page size

texts:
I have created a template to fit inside my companies report template which is 8.5x11" page size but with headers/footers. The template page size is 6.5x8.46" in order to fit perfectly inside the report page without scaling anything.
When I open a new composer with the same template the page size defaults to 8.5x11 and no guides come along for the title block.
Is there something I am missing, or is this how it is supposed to work?


texts:
Did an aerial drone survey and have generated a mosaic and .shp file with the elevation and contour data using Pix4D. However, some of the areas elevations are off because the elevations represent the top of the canary grass in those areas.

I would like to be able to subtract approx. 4 feet from the elevations in those areas. Is this possible. If it is, could you outline the steps as I am still learning QGIS.


texts: How to import code list from .mdb to domain model in Enterprise Architect?

texts:
I have built an UML model in domain model structure in Enterprise Architect.
Now I want to import a couple of code lists to this model.

The problem is that the tables are in .mdb ArcGis workspace. I try to export tables from .mdb to XML document and then to import XML to Enterprise Architect- but the particular fields are in ESRI format type and I need them in enumeration (if the values is fixed) or codeList (if the values may be extended) to fulfil the terms of interoperability (INSPIRE).


texts: Geoserver renders reprojected raster only as transparent images

texts:
Trying to reproject WMS layers in geoserver from the default of EPSG:4326 to EPSG:3574

Using the default projection works fine.
  url = /geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=ENSEMBLE:global_360x181.air_temp.ht_sfc,base_layers:coastlines&styles=,line&bbox=-180.5,-90.5,180.5,90.5&width=658&height=330&srs=EPSG:4326&format=application/openlayers
results in:

Changing only the SRS and BBOX only renders the vector data, not the raster data:
  url = /geoserver/wms?service=WMS&version=1.3.0&request=GetMap&layers=base_layers:coastlines,ENSEMBLE:global_360x181.air_temp.ht_sfc&styles=line,&bbox=-1054375,-105875,2584375,2596875&width=658&height=330&srs=EPSG:3574&format=application/openlayers

results in:

The raster layer is there - I can make a getFeatureInfo request, but geoserver styles it as completely transparent.  There is absolutely nothing in the geoserver log.  I have logging turned on at the 'INFO' level.

I tried editing the WCS Settings on the publishing tab for this layer and explicitly added EPSG:3574 to the Current Request and Response SRS List.  No effect. I also verified that in the WMS Settings Limited SRS List, EPSG:3574 is listed.

The GeoWebCache is disabled for this layer.

I am completely stumped.
Half-baked ideas welcome.

Update

I just recreated this behavior in both Geoserver 2.7.1 and 2.2.4, so either I am doing something completely wrong, or this behavior has been in geoserver for a long time, which seems remarkable.

Update #2

In an attempt to eliminate any configuration issues in my geoserver:

Downlaoded the latest stable geoserver.war, 2.7.1.1 and installed in Tomcat.
Request the nurc:Img_Sample in EPSG:4326, OK
Request the topp:states in EPSG:4326, OK
Request the nurc:Img_Sample in EPSG:32615, not OK
Request the topp:states in EPSG:32615. works fine.

I get the exact same results as originally described. Transparent image, responds to get feature info requests.

Img_Sample URL in UTM 15N projection:

http://localhost:8080/geoserver/nurc/wms?service=WMS&version=1.1.0&request=GetMap&layers=nurc:Img_Sample&styles=&bbox=166021.44,0.00,534994.66,9329005.18&width=768&height=372&srs=EPSG:32615&format=image/png

Update #3

There is one raster in the default data set in a non-EPSG:4326 projection.  The native projection for sfdem is EPSG:26713.  This layer renders in both EPSG:26713 and EPSG:4326.  Is it possible that geoserver will only reproject when the native SRS is a 'PROJCS'?  EPSG:4326 is a 'GEOGCS' - might this make a difference?


texts: Remove the last item from feature group in Leaflet

texts:
I just need to delete the last item in a featuregroup.
This code gives me that I have TWO objects in in the featureGroup featRouteL:
console.log("so many objects: "+featRouteL.getLayers().length);

Now, I just want to delete the LAST item. But how do I do that? I have tried so far but get error no matter what direction I go. I think I should get the id of the last layer item and then delete this layer id. Unfortunatly I get errors no matter what I do...
            var xlayers = featRouteL.getLayers();
            var xlength = xlayers.length;
            console.log("no of layers: "+xlength); //this gives me the correct no

            xlayers.forEach(function(layer) {
                //xlayers.removeLayer(layer); // -> xlayers.removeLayer is not a function
                //console.log(layer.get("name")); // -> layer.get is not a function
                //console.log(layer.getLayerId()); // -> Cannot read property '_leaflet_id' of undefined
            });

            console.log("layers: "+xlength);

            //for (var i = 0; i < xlength; i++) {
                //l = xlayers.item(i); //-> xlayers.item is not a function
            //}


texts: Guidance when to style your features in Tilemill vs. Leaflet?

texts:
I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine whether to:

use/style a base map in Tilemill/tilemill2; create a separate layer within TM of your unique data that you're intending to overlay the basemap; style the data within TM2.
use a base map in Tilemill/tilemill2, load it in leaflet, add the features from a geojson file in leaflet with the features' styles in the geojson file itself.
use a base map in Tilemill/tilemill2, load it in leaflet, add the features from a geojson file in leaflet and then style the features in the javascript on the page.

In cases where you're styling a lot of features (more than a few hundred?), I would add all of it within Tilemill since you're not dealing with the client side rendering..

In cases where your features are than 10 or so, I'd style them within the html file, I'd assume.

What other factors should I keep in mind when I'm weighing these approaches?

(I'm using TM and tm2 interchangeably here; I'm aware they're separate programs)


texts: Extracting Vector Extents of PDFs derived from QGIS 3 with PyQGIS

texts:
I'm interested to create a vector point layer representing the centroid of some 500-1000 PDF files exported from QGIS to find PDFs geographically rather than using file explorer. I would like to automate this using PyQGIS.

I tested with the algorithm 'Tile Index' to manually extract the extents of 3 PDFs into a single GeoPackage through a batch process. Setting the output to the same .gpkg successfully appends each tile index into one GeoPackage. Writing the PyQGIS to take the centroid would then be straight forward. It is the first part which is convoluted. Below is the end result of my test.

I have a filing system where all 500-1000 PDFs are stored in client folders structured as below. The PDFs outlined green below are always stored in a folder named "!pdf's". An example of the file path is below.

"V:/GIS - Files/1. Client Projects/A/Angus, A/ALN511253 - Lo/!pdf's/ALN511220-01.pdf"

I'd like to get the tile index of all 500-1000 PDFs in one swoop. Is it possible to target the "!pdf's" folder across all client folders using PyQGIS?

There are generic PDFs in the folder named 'Other' so I cannot search for all PDFs from the directory 'Client Projects'.


texts:
I found routing core smart file here but unfortunately is for version 1 of pgrouting...
and when i want to use it in pgrouting v2 i get a lot of errors ( because of functions that have been changed in postgis v2 eg. getsrid->st_srid)
Is there any compatible smart functions for pgrouting v2??


texts: Polygonizing LineString features to Polygon features and keeping Attribute table values using PyQGIS

texts:
I am trying to create a circular raster in Qgis3.8.3-Zanzibar with the Python console.
I am able to make it with LineStrings (combine of Polyline and Circular
String) and fill each feature with attributes (see picture).

Now I want to make each feature to a polygon. Therefore, I use the function polygonize (Processing Toolbox --> QGIS Geoalgorithms --> Polygonize).
I check the "Keep table structure of layer" option and run the process:
Processing algorithm…
Algorithm 'Polygonize' starting…
Input parameters:
{ 'INPUT' : 'LineString?crs=epsg:25832&field=id:integer&field=name:string(20)&field=WINKEL:integer&field=METER:integer&field=KILOMETER:Double&field=AREA_METER:Double&index=yes&uid={feb5e364-45f5-4e97-aeee-7ab4cd65bbf3}', 'KEEP_FIELDS' : True, 'OUTPUT' : 'TEMPORARY_OUTPUT' }
Processing lines…
Noding lines…
Polygonizing…
Saving polygons…
Execution completed in 0.98 seconds
Results:
{'OUTPUT': 'Polygons_from_lines_9dcc9791_d9e2_4399_b9ff_3bf1c61f6e1c'}
Loading resulting layers
Algorithm 'Polygonize' finished

Ok it works... all features are now polygon. But all the attribute table values are gone.

How do I keep the attribute values?
And why did the polygonize function give all the new polygon features random ids? It is impossible for me to give them new values because there are distributed random, not like before when I add the as LineStrings.


texts: Categories in Customize window in ArcGIS

texts: Could you tell me how to add new category of commands in Commands tab in Customize window in ArcGIS 10?


texts: How to seperate geometry surface shapefile to roof, wall and ground surface?

texts: The output of this is to visualize the roof, wall and ground shape file in 3D with a house like shape rather than just flat combined surface geometry. The data source is geometry.surface from a 3DCityDB that contains City GML model with buildings. I use QGIS in my project.


texts: How to modify the results of a geological dataset from vertical to horizontal?

texts:
I have a 3-D point shapefile of a geological fault dataset consisting of x,y, and z columns. I need to create a raster dataset from this point dataset. I have been trying to do this in ArcGIS; however, ArcGIS does not do this correctly as the dataset result is a vertical surface as opposed to a horizontal one. I.e. x, y does not change but z does.

For example:

x,            y,           z
358749        5997833      270
358749        5997833      280

Is there a way I could flip the data (to make x,y horizontal and re-flip back to vertical afterwards) so that it can be interpolated?

Thanks in advance


texts: Export NASA USDA HSL SMAP soil moisture TIFF from Google Earth Engine

texts:
I am trying to download soil moisture data from Google Earth Engine using the following code:
var dataset = ee.ImageCollection('NASA_USDA/HSL/SMAP_soil_moisture')
                  .filter(ee.Filter.date('2017-04-01', '2017-04-30'));
var soilMoisture = dataset.select('ssm');

// Create a geometry representing an export region.
var geometry = ee.Geometry.Rectangle([-76.5060023341, 3.67837906194, -75.9877703115, 3.53457543477]);

// Export the image, specifying scale and region.
Export.image.toDrive({
  image: dataset.select('ssm'),
  description: 'soilMoisture',
  scale: 250,
  folder: 'google_earth',
  region: geometry,
  fileFormat: 'GeoTIFF'
})

I am using the information of the data set from here
https://developers.google.com/earth-engine/datasets/catalog/NASA_USDA_HSL_SMAP_soil_moisture
However, I am getting the following error:
Error: Image.clipToBoundsAndScale, argument 'input': Invalid type. Expected type: Image<unknown bands>. Actual type: ImageCollection.

I am not sure the cause behind the error because I am selecting the band ssm.
Any idea to solve this issue?


texts: How to pass custom marker to polyline decorator

texts:
I am working with leaflet appliction, where user draw some shape.
A polyline added to that shape using leaflet.polyline.decorators.
I just want to know how to pass custom marker to L.Symbol.marker().

For example i am passing the custom marker but its not working.

Script

var myCustomMarker= L.icon({
                    iconUrl: 'assets/img/wallE.png',
                    iconSize: [30, 30], // size of the icon
                    iconAnchor: [5, 18], // point of the icon which will correspond to marker's location
                });
    new L.Marker(e.latlng, { icon: wallIcon, draggable: false }).addTo(curr);
        polylineWall.addLatLng([e.latlng.lat,e.latlng.lng]).addTo(curr);
        // Add coordinate to the polyline
        var decorator = L.polylineDecorator(polylineWall, {
        patterns: [
                { offset: 0, endOffset: 0, repeat: '10px', symbol: new L.Symbol.marker(myCustomMarker)}
                   ]
                   }).addTo(curr);

Console Error

  Uncaught Error: iconUrl not set in Icon options (see the docs).

If someone have knowledge about this problem please help.Thanks for your time.


texts: Changing layer extent to decimal degrees?

texts:
Using ArcMap or ArcGIS 10 ...

In the photo below, you can see my extent is in meters while my projected coordinate system is in decimal degrees. How can I convert my layer extent to decimal degrees?


texts: Google Earth Engine: Different calculations per region in feature collection

texts:
I have a mean SST value, which I have reduced per pergion.
var sstCollection = ee.ImageCollection('NASA/OCEANDATA/MODIS-Aqua/L3SMI').select('sst')
.filterDate(startDate, endDate)
.filterBounds(EEZ)
.map(function(image){return image.clip(EEZ)});

var sst_mean = sstCollection.mean();
var sstCount_region = sst_mean.reduceRegions({
  reducer: ee.Reducer.anyNonZero(),
  collection: reefsEdit,
  scale: 30});

I want to divide this number by ten and to do so I apply the following function
var sst_mean10 = sst_mean.expression(
    'sst/10.0',{
    'sst':EECCI_score.select('constant')
    });

However, is there anyway of applying different expressions to the different values for each regions. For example, rather than diving by ten then reducing by region, can I reduce by region then apply a different expression to each region, say divide region 1 by 10 but region 2 by 8?


texts:
I have read in some vector data with rgrass7 and produced some output Layers using Grass in R. Now I wanted to import one of the created layers back into R and convert it into an sf- object. When I try to run the follwing code I get the message that I need to provide either sf or sp. But I don' really know where I could do this in the readVECT-function(). Any hint would be super helpful.

Error in readVECT("streets") :
  either sp or sf must be chosen


texts: How to clip from a point layer using postgis?

texts:
I've loaded a LIDAR xyz file into a PostGIS2.0 database and created a 3D point geometry column ("tblCLOUD") from the data.

I've also loaded into the database a shapefile that contains six (non-overlapping) polygons ("tblZONES").

What I'm trying to do now is extract the points covered by each polygon to an individual table. So the end result would be six tables containing N points each.

I've hit my limits with PSQL!

Thanks!

EDIT:

My two tables - tblcloud & tblpoly are stuctured as follows:

CREATE TABLE tblcloud
(
  "pointID" integer NOT NULL DEFAULT nextval('"tblcloud_pointID_seq"'::regclass),
  x double precision,
  y double precision,
  z double precision,
  geom geometry(PointZ,2193),
  CONSTRAINT pk_point_id PRIMARY KEY ("pointID" )
)
WITH (
  OIDS=FALSE
);
ALTER TABLE tblcloud
  OWNER TO postgres;

-- Index: tblcloud_geom_gist

-- DROP INDEX tblcloud_geom_gist;

CREATE INDEX tblcloud_geom_gist
  ON tblcloud
  USING gist
  (geom );

CREATE TABLE tblpoly
(
  gid serial NOT NULL,
  minx numeric,
  miny numeric,
  maxx numeric,
  maxy numeric,
  cntx numeric,
  cnty numeric,
  area numeric,
  perim numeric,
  height numeric,
  width numeric,
  geom geometry(MultiPolygon,2193),
  CONSTRAINT tblpoly_pkey PRIMARY KEY (gid )
)
WITH (
  OIDS=FALSE
);
ALTER TABLE tblpoly
  OWNER TO tom;

-- Index: tblpoly_geom_gist

-- DROP INDEX tblpoly_geom_gist;

CREATE INDEX tblpoly_geom_gist
  ON tblpoly
  USING gist
  (geom );


texts: Improve washed out blurry composite Landsat 8 image in QGIS

texts:
I want to create a composite image using Landsat 8 bands. I followed the steps to do so (creation of virtual layer, high resolution, separate) and adjusted the bands' colors (red 4; green 3; blue 2) and I got a colored map.

However, the map seems washed out and not too sharp. I played with the contrast a bit and the load min/max values. This helped a bit but the image still does not seems as sharp as the one I produced with ArcMap.

Do you have any ideas or suggestions? Is QGIS limited in its image rendering options and I just need to accept it?

I am using QGIS 2.18.4 on a Windows 10 64 bit machine.


texts: Attributing a distance from a feature in attribute table

texts: I'm working on population data (point features), and I'd like to know their distance from the coast as shown in the image below. Would there be a way to create a field in the attribute table which would give for each point it's distance from the shore?


texts: Can ArcGIS Desktop render 15,000 Excel records without freezing up or getting too choppy?

texts: For any ArcGIS users, how large of a dataset (in terms of number of records) can ArcGIS comfortably render on the screen at once? For example, if I have an excel spreadsheet with 15k records, will ArcGIS Desktop be able to easily render 15k items with maps underneath (I don't have Arc, which is why I'm asking) without freezing up or getting too choppy? If yes, has anyone really hit a capacity where they've had problems with the data rendering?


texts: In Geoserver, how to give different colors of features within a single shapefile based on the value of a field?

texts: In arcgis, this can be easily done by using the Symbology tab in the properties.I need to achieve a similar effect in Geoserver. How can I do it?


texts: In the model below, I get an empty output if I run it from start to finish. It works though if I first individually run the project and create fishnet tools, then run the entire model. Something is happening around the create fish net tool and I can't figure out what. I've included the tool dialog box after it's been run.


texts: Debug ArcMap 10.3 start - process ends with 'Loading Document...' message

texts:
How can I debug the initial process of ArcMap 10.3.1 for Desktop?

The ARCMAP.exe process get's killed after hanging a while with the "Loading Document..." message.

What I have done so far:

Check and reset the Normal.mxt
Reset AppData\Roaming\ESRI\Desktop10.3
reinstall ArcGIS 10.3.1

It seams like something is blocking the initialing process. Interesting is that the process gets about ~100000 - 160000 K memory and then doesn't change anymore until it get killed.

Any ideas how to debug the start of ArcMap?

(sorry for cross posting, s. geonet.esri.com)


texts: QGIS - Holes added to a point shapefile in the attribute table not displaying

texts:
I have a point shapefile with ~300 points stored holding, x,y,z data and three other variables.

I needed to add another 20 points to the existing shapefile. To do this I conducted a join with a CSV that held the data for the additional 20 points. The data i.e. point ID's, x,y,z info for the new points now show up in the attribute table for my shapefile however the points themselves are not plotting on my workspace.

I have saved and re-imported the updated shapefile to no avail. I have also tried loading the shapefile in another 'blank' workspace to no result. The coordinate system for the shapefile is correct and there are no CRS conflicts within the workspace.


texts: Creating fly through video of 3D map in ArcScene?

texts:
I'm currently working on creating a 3D map in ArcScene of a watershed proximal to my college campus. I've had trouble saving the work but am capable of creating the map relatively quickly now, just not able to save it. My ultimate goal is to create a video of the map as it is flown through.

Does anyone know of a reputable program to download that can create a video of what ever is on the computer screen?


texts: Android WebView doesn't display OpenLayers 3 map

texts:
I'm trying to display an OpenLayers 3 map in an Android WebView. Only the zoom controls and the copyright hint are displayed, the map itself not. JavaScript is enabled for the WebView, right to access the internet is granted. I tested on a Nexus 5 with Android 7 (API 24).

If I load exactly the same JavaScript code in Chrome on Android, the map is displayed fine.

In the meantime I managed to display the map but I'm not happy about this solution, as the map is pretty blurry. It works only, if I set "pixelRatio:1" and call map.setSize and pass the half of width/height of the container div. If I pass just the full width/height, nothing is displayed. Here is my code:

   <meta charset="utf8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

   <link rel="stylesheet" href="ol.css" type="text/css">

On Android I use these settings for the WebView:

mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAllowFileAccessFromFileURLs(true);
mWebView.getSettings().setAllowUniversalAccessFromFileURLs(true);

[Update] I just loaded several example maps from here http://openlayers.org/en/v3.2.1/examples/ into my WebView. Not a single map was displayed. Additionally I loaded some of the examples in the official Android WebView Browser Tester with exactly the same result. So now I'm sure that it's not a problem of my specific map or WebView but a general problem displaying OpenLayers maps on an Android WebView.

[Update 2] I switched now to leaflet where the map is displayed without problems. Additionally leaflet seems to me much easier to use.


texts: Creating mean raster layer from set of raster layers in QGIS

texts:
I have 52 weekly raster layers in QGIS. How can I get a mean annual raster layer from these 52?
The Raster calculator will do this but as its operators are all basic maths ones it will be a little longwinded. Is there a better/simpler way?


texts: Unable to add shapefile. Receive an "Open Failed - Error Opening Feature Class" when trying to open in ArcMap

texts:
When I attempt to add a shapefile from a folder to my ArcMap document I receive this message.

Why am I unable to add this shapefile? I've looked around for a similar issue, however other posts deal with open error "Getting “Failed to open tool” message when trying to run geoprocessing tool from C# code" or Error opening feature class of geodatabase in ArcGIS for Desktop? Don't really deal with my same issue.

Here is the message I receive:

All of the files and folders are in the same format and accessible the same way.

All the extensions are available and don't appear to be corrupt in anyway.

Here my shapefile icon displays black question mark in a green box.

Here are all the files in ArcMap except for the "glpv1" shapefile

When I open the file using QGIS, it displays and works just fine.


texts: Getting dataProvider from vector layer outside QGIS

texts:
I'm using PyScripter to explore PyQGIS API because of it's very handy auto-completion function.

I've managed to get a handle on a PostGis vector layer by:

>>> from qgis.core import *
>>> uri = QgsDataSourceURI()
>>> uri.setConnection("<some URL>","5432","<DB name>","<user>","<password>")
>>> uri.setDataSource("public","<table name>","<geometry column name>")
>>> vLayer=QgsVectorLayer(uri.uri(),"<layer name>","postgres")
>>> vLayer
<qgis.core.QgsVectorLayer object at 0x052B4D68>

So far so good. My next step is to explore the layer's dataProvider.

>>> vLayer.dataProvider()
>>>

Why doesn't vLayer.dataProvider() yield anything, like in QGIS Python Console?

Do I need to initialize vLayer more?


texts:
I´ve read this article about geoservers pointStacker transformation:
http://suite.opengeo.org/opengeo-docs/cartography/rt/pointstacker.html

Is this function implemented in geoserver css? If so can one provide a simple example?


texts: Performing Intersect of polygon with raster, retaining ID of polygons?

texts:
I have a raster data set of land cover and a set of residential addresses (points).

I want to find out what percentage of each land cover type is within 1km of each address (i.e. in a 1km buffer around each point).

It is possible in Arc to use Intersect to do this, but only where both sets of data are polygons. My raster land cover data are too large to convert to polygons.

The table I need to output should contain the ID of the buffer and the areas covered by each land cover type within that buffer.

I am happiest to use ArcGIS Desktop or R to do this, if possible.


texts: How to avoid displaying a field when hovering over feature in QGIS cloud?

texts: I have uploaded data for a presentation into the QGIS cloud and noticed that in the browser when I hover over it (info button selected because I want to click on a certain feature), a field and its value is being shown. I don't want that and tried to change the display options in the layer properties but it doesn't go away. This is annoying when zoomed out because if there are many features at one location, all!! their values are listed. How can I get rid of this?


texts: How to create a web map which can't be traced back to yourself?

texts:
Hypothetically speaking (of course) say that you wanted to do a Wikileaks-style exposé of some spatial data, without it being traceable back to yourself.

The data could be points, line and polygons (with attributes) in any common spatial format (shapefile, geodatabase, GeoJSON, etc).

What would be the best way to host it anonymously in an interactive web map? Where would it be hosted, and what software would you use?

You would then anonymously contact a journalist and send them the URL to your webmap (so it needs to be something interactive which a journalist could use in an online article, not just a JSON dump that only a geek could decipher).


texts:
I am trying to select Zones that intersect the dataframe (polygon).
If there is only one return then I want to turn it into a sting.
If there is multiple I want to turn  it into a string with " ," (space then comma) in between each.

My code is as follow:

arcpy.MakeFeatureLayer_management(ZoneSHP, "ZoneLYR")
arcpy.SelectLayerByLocation_management("ZoneLYR", "INTERSECT", "polygon"):
with arcpy.da.SearchCursor(ZoneLYR, "Zone") as cursor:
    int(arcpy.GetCount_management(ZoneLYR).getOutput(0))
    if getOutput == 1:
            Zone = row[]
    else:
        for row in curser:
            zone1 = ", " + row[]
        Zone = zone1[3:]


texts: Is there a way to hide the zoom-in/zoom-out buttons in ArcGIS javascript API? I have external zoom buttons elsewhere on the page, so these are no longer needed.


texts: How to have a popup anchored at the clicked position?

texts:
I have a vector layer overlaid above a base layer. Basically I want to have a popup anchored at the clicked position when clicking anywhere on the vector geometries. So I have the code:

     var selectCtrl = new OpenLayers.Control.SelectFeature(activeLayer, {
            clickout: true,
            onSelect: open_infowin,
            onUnselect: close_infowin
        });

    function open_infowin(event) {

        var mousePos = this.events.getMousePosition(event);

        infowin = new OpenLayers.Popup.FramedCloud(
                     "popup",
                     map.getLonLatFromViewPortPx(mousePos),
                     new OpenLayers.Size(300,150),
                     "Updating<br/>information...",
                     null,
                     true,
                     null
                   );
        map.addPopup(infowin);
    }

But the OnSelect function passes an event object with no mouse position. If I register mouse events with the Map, no event will be fired when the mouse moves on the vector layer.

Any suggestion?


texts:
I wanted to make a simple plot of four sf-objects which don't contain much more than the sfc-column and some postal-code information.

The sf-objects have the names level 1-4 and plz. What I would like to have is a simple legend next to my map just showing the names of the objects (level 1-4) and plz and their matching colours.

It seems like a task which would be so easy in any desktop-gis, but I'd really like to do it in R. My code so far looks like this and produced the follwing figure.

ggplot() +
  geom_sf(data = level3, fill = fil.a) +
  geom_sf(data = level2, fill = fil.b) +
  geom_sf(data = level1, fill = fil.c) +
  geom_sf(data = plz, fill = "red") +
  coord_sf()


texts: MapServer: How can I exclude Default Spatial Filter added in WFS Filter added with internal PostGIS query?

texts:
My query is regarding FILTER applied on MapServer WFS.

I'm new in this area and exploring some features of MapServer. I want to use GetFeature request of WFS to get features applied on any location on map. I'm using "MapServer version 7.0.4 (MS4W 3.2.1)" and trying to apply filter "Contains" for it.

I can see two problems when it applies Filter query on PostGIS:

It looks it adds an extra default geospatial filter in it while making a query to PostGIS. This default spatial filter is not stopping to return any result from PostGIS. Is there any way to exclude this default filter?
It seems Contains coordinates are not transformed properly according to SRS of data in PostGIS.

I've tries with different projection in map file and request message with no success.

Supporting data to give your input on my queries:

WFS request

Formatted Version:

http://localhost/cgi-bin/mapserv.exe?
service=WFS&
map=C:/Data/MapServerWFSSample.map&
request=GetFeature&
version=2.0.0&
typeName=SampleLayer&
FILTER=<Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml" xmlns:ms="http://mapserver.gis.umn.edu/mapserver">
  <Contains>
    <PropertyName>wkb_Geometry</PropertyName>
    <gml:Point srsName="urn:ogc:def:crs:EPSG::4326">
      <gml:coordinates>0.112034,53.567972</gml:coordinates>
    </gml:Point>
  </Contains>
</Filter>

Internal PostGIS query [Could see in log file]:

msPostGISLayerWhichShapes query: select "Attribute1","Attribute2","Attribute3",encode(ST_AsBinary(ST_Force2D("wkb_geometry"),'NDR'),'hex') as geom
from SampleGeoDataTable
where wkb_geometry && ST_GeomFromText('POLYGON((-0.999462804873474 -1.00102606014116,-0.999462804873474 -1.00102606014116,-0.999462804873474 -1.00102606014116,-0.999462804873474 -1.00102606014116,-0.999462804873474 -1.00102606014116))',find_srid('','SampleGeoDataTable','wkb_geometry'))
and (st_contains(wkb_geometry,ST_GeomFromText('POINT (7853690.3631838141000000 -5506204.5232773330000000)')) = TRUE)

Similar WFS query to GeoServer works perfectly.

Map File looks like:

MAP
  NAME "Sample_WMS"
  CONFIG "PROJ_LIB" "C:\ms4w\proj\nad"
  CONFIG "MS_ERRORFILE" "C:/Data/ms_tmp/ms_error.txt"
  CONFIG "CPL_DEBUG" "ON"
  CONFIG "PROJ_DEBUG" "ON"
  STATUS ON
  PROJECTION
    "init=epsg:27700"
  END

  WEB
   IMAGEPATH "C:/Data/ms_tmp/"
   IMAGEURL "/ms_tmp/"
   METADATA
    "wfs_enable_request" "*"
    "wfs_title"         "My Global Map WFS Server"
    "wfs_srs"           "EPSG:4326 EPSG:900913 EPSG:27700"
    "wfs_boundingbox"    "EPSG:27700 749.099975585938 -90036.5 660460.875 1227306.5"
   END
  END

  LAYER
   NAME "SampleLayer"
   STATUS DEFAULT
   TYPE POLYGON
   PROJECTION
    "init=epsg:27700"
   END
   CONNECTIONTYPE POSTGIS
   CONNECTION "host=localhost port=5432 dbname=SampleGeoDataTable user=postgres password=hahaha"
   DATA "wkb_geometry from SampleLayer"
   CLASS
     STYLE
      COLOR      0 100 255
      OUTLINECOLOR 0 0 0
     END
   END

   METADATA
    "wfs_enable_request" "*"
    "wfs_title"         "Sample WFS"
    "wfs_srs"           "EPSG:27700 EPSG:4326 EPSG:900913"
    "wfs_boundingbox"    "EPSG:27700 749.099975585938 -90036.5 660460.875 1227306.5"
    "gml_include_items" "all"
   END
  END
END


texts:
I have just seriously broken my geoserver installation.

We were fiddling around trying to create a new style, and didn't realize we have overriden the default raster.xml style.
I renamed the style back to raster.xml and regenerated and forgot about the issue.

But I just restarted geoserver this morning, and now all of my services are broken, for all layers that used the raster style.

Checking the style page, I see the raster style duplicated:

I cannot remove them from the GUI, because It is prevented "can't remove default style".

I have also tried to remove the files in the data folder, as well as clear the cache, without being able to correct the problem so far.

Now, the main issue is that I cannot assign/unassign styles to my layers any more, because I get a nullpointerexception trying to get in the window.

Is there any way I can recover from this?


texts:
I am trying to set the visibility of a layer in Openlayers map according to a checkbox status with a class ".layercheck" and value is the name of the Openlayers layer.

So here is my HTML:

<input type="checkbox" class="layercheck" value="layer134431245">text

And here is JS:

   var layer134431245 = new OpenLayers.Layer.WMS(...);
   $(".layercheck").on( "click", function() {
    var layer = $(this).val();
    if ($(this).is(":checked")) {
        $("#"+layer).setVisibility(true);
    } else {
        $("#"+layer).setVisibility(false);
        }
   });

This function and HTML does completely nothing. It also does not give an error in the js console.

So how do I make this work, and switch the layer visibility with any of the checkboxes which have the class "layercheck" and value is the layer ID?

I also understand that the $("#"+layer) is not the layer, but a jQuery object which maybe does not have the properties setVisibility. So then how do I convert a value (string) into a Openlayers layer name?


texts: Good projection for covering most of the world

texts:
I'm writing an application for building navigation routes thru the city streets, and not quite sure what projection would be best.

I tried EPSG:3587, however, the tools I'm using - GeoTools and PostGIS - seem to disagree on how to interpret this one ( GeoTools and PostGIS with ESPG:3857 )

Could someone recommend a similar projection that would cover most of the world, and be appropriate for looking at the data at the street level only? The data I'm working with is OSM for maps and a lot of WGS84 lat,lon coordinates for way points.


texts: Python geoJSON module create a FeatureCollection with CRS, QGIS doesn't recognize CRS

texts:
I am curious if my geoJSON created with the geoJSON python module has a valid CRS.

The manual on github specifies a feature collection like so:

from geojson import Feature, Point, FeatureCollection
my_feature = Feature(geometry=Point((1.6432, -19.123)))
my_other_feature = Feature(geometry=Point((-80.234, -22.532)))
FeatureCollection([my_feature, my_other_feature])

When I try and specify a crs and dump to json, the crs is at the beginning of the geojson string:

myFeat=FeatureCollection([my_feature, my_other_feature],crs="EPSG:3857")
dump = geojson.dumps(myFeat)
dump
'{"crs": "EPSG:3857", "type": "FeatureCollection", "features": [{"geometry": {"type": "Point", "coordinates": [1.6432, -19.123]}, "type": "Feature", "properties": {}, "id": null}, {"geometry": {"type": "Point", "coordinates": [-80.234, -22.532]}, "type": "Feature", "properties": {}, "id": null}]}'

The geojson validates with geoJSONlint:

import requests
val = 'http://geojsonlint.com/validate'
req = requests.post(val, data=dump)
req.json()
{u'status': u'ok'}

But when inserted into QGIS the CRS is not recognized:

Is this a problem with QGIS or with the geoJSON Python module?


texts: Finding long, lat coordinates of points on building pictured by drone

texts:
How do I get the formula for calculating lat, long coordinates on the attached picture?

Here is the EXIF file. The problem is that we don't know the horizontal distance from the building to a drone.

EXIF

Exif Image Size 4,864 × 3,648
Image Description   DCIM\101MEDIA\DJI_0812.JPG
Orientation Horizontal (normal)
Software    v01.07.1641
Y Cb Cr Positioning Centered
Exposure Time   1/400
F Number    5.60
Exposure Program    Program AE
ISO 100
Exif Version    0230
Date/Time Original  2019:05:12 12:55:01
    9 months, 7 days, 21 hours, 25 minutes, 11 seconds ago
Components Configuration    -, Cr, Cb, Y
Compressed Bits Per Pixel   3.132420252
Shutter Speed Value 1/400
Aperture Value  5.60
Exposure Compensation   0
Max Aperture Value  2.8
Subject Distance    0 m
Metering Mode   Center-weighted average
Light Source    Fine Weather
Flash   No flash function
Focal Length    8.8 mm
Maker Note DJI  (562 bytes binary data)
Flashpix Version    0010
Color Space sRGB
Interoperability Index  R98 - DCF basic file (sRGB)
Interoperability Version    0100
Exposure Index  undef
File Source Digital Camera
Scene Type  Directly photographed
Custom Rendered Normal
Exposure Mode   Auto
White Balance   Auto
Digital Zoom Ratio  undef
Focal Length In 35mm Format 24 mm
Scene Capture Type  Standard
Gain Control    None
Contrast    Normal
Saturation  Normal
Sharpness   Hard
Subject Distance Range  Unknown
Serial Number   4d31b8d1e1acffb45e2be9dfdbd70276
GPS Version ID  2.3.0.0
GPS Latitude Ref    North
GPS Latitude    45.429768 degrees
GPS Longitude Ref   West
GPS Longitude   73.137033 degrees
GPS Altitude Ref    Above Sea Level
GPS Altitude    69.234 m
XP Comment  Type=N, Mode=P, DE=None
XP Keywords v01.07.1641;1.2.0;v1.0.0
Compression JPEG (old-style)
Thumbnail Length    10,463
Modify Date 2019:05:12 12:55:02
    9 months, 7 days, 21 hours, 25 minutes, 10 seconds ago
Create Date 2019:05:12 12:55:01
    9 months, 7 days, 21 hours, 25 minutes, 11 seconds ago
Make    DJI
Camera Model Name   FC6310
Resolution  72 pixels/inch
Thumbnail Image (10,463 bytes binary data)


texts:
I have a list of stations in rivers. I want Earth Engine to return me a list of stations whose upstream area overlaps with at least one other country in addition to the country the station is in. This is more or less the code for one station in Brazil using the hydro package by gena. The station should be in the list because its upstream area crosses into Colombia and Venzuela. How can I run a code over all stations and return a list with the property 'GEMS_Stati' for stations with an international upstream area?

var stations = ee.FeatureCollection('users/basins/stations');
var countries = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');
var hydro = require('users/gena/packages:hydro');

var filter = ee.Filter.inList('GEMS_Stati', ['BRA00020']);
var FilteredStation = stations.filter(filter);

var catchmentsSelected = hydro.getCatchments({outlet: FilteredStation, level: 6})

var union = catchmentsSelected.union();
Map.addLayer(union);

var spatial_filter = ee.Filter.intersects({
  leftField: '.geo',
  rightField: '.geo',
  maxError: 10
});

var saveAllJoin = ee.Join.saveAll({
  matchesKey: 'scenes',
});

var join_output = saveAllJoin.apply(union, countries, spatial_filter);
print(join_output);


texts: How to cluster/group points based on their frequency and event time without overlapping them?

texts:
I am trying to group around 100 points based on their frequency and occurred month (similar to   https://i.stack.imgur.com/i7Mzi.png) but I haven't found a solution yet.
Tried many tools in QGIS but till now didn't work.

How should I approach this?

Here is my dataset: https://i.stack.imgur.com/B3c14.png


texts: Compare two lists of field names, and remove unique fields

texts:
I have 5 shapefiles in which certain fields need removing. I have a csv file with the correct shapefile name and which fields that need deleting.

I am trying to do a simple comparison of fields, and want to remove the ones not listed in the CSV.

However the print statement at the end does not tell me which fields are being deleted. This should theoretically tell me before i go ahead and delete the fields.

shapefiles = arcpy.ListFeatureClasses()

scursor = arcpy.da.SearchCursor(csv, ["FMEextracts", "NewField"])

for fc in shapefiles:
    newfieldlist = []
    oldfieldlist = []
    fields = arcpy.ListFields(fc)
    for field in fields:
        oldfieldlist.append(field.name)
        print "old fields", fc, oldfieldlist
        for srow in scursor:
            if fc == srow[0]:
                newfieldlist.append(srow[1])
                print "new fields", fc, newfieldlist

                if field.name not in newfieldlist:
                    if not field.required:
                        print "deleting", field.name,"from", fc
                        #arcpy.DeleteField_management(fc, field.name)

FMEextracts     NewField
NGC_CABLE.shp   ACTION_DTT
NGC_CABLE.shp   CABLE_ROUT
NGC_CABLE.shp   CABLE_SET
NGC_CABLE.shp   CABLE_TY00
NGC_CABLE.shp   CABLE_TYPE
NGC_CABLE.shp   COMMENTS
NGC_CABLE.shp   FID
NGC_CABLE.shp   GDO_GID
NGC_CABLE.shp   OPERATING_
NGC_CABLE.shp   OWNED
NGC_CABLE.shp   Shape
NGC_CABLE.shp   STATUS
NGC_CABLE.shp   TUNNEL
NGC_CABLE.shp   YEAR_OF_IN
NGC_GAS_PIPE_FEEDER.shp FID
NGC_GAS_PIPE_FEEDER.shp ABANDONED
NGC_GAS_PIPE_FEEDER.shp BPD
NGC_GAS_PIPE_FEEDER.shp DIAMETER
NGC_GAS_PIPE_FEEDER.shp GDO_GID


texts: How to have a fixed filled pattern of dots in a shape and export it as a pdf file in QGIS?

texts: I have a small problem in QGIS layout view that I couldn't find any answers or solutions. I have a polygon shapefile that I used simple fill with dotted fill style as in the screenshot. In map view it shows great, but when I export to pdf from layout view it looks so dense that I cant even see the dots without zooming in. How can I change the scale of dots in fill color in layout view?


texts: How is the record count of a multipoint shapefile dbf file determined?

texts:
I'm writing a program to create a multipoint shapefile (.shp .shx .dbf), and I'm not sure how the format of the .dbf file should look. The .dbf starts off with a record header, followed by field subrecord structures, which are then followed by the actual records. The records start with a deletion flag followed by data.

With the consideration that this is a multipoint shapefile, how would the records be written? Is each point in the multipoint file a record or are all of the points considered to be one record?


texts: Using spatial index to intersect points with polygon, when points and polygon have same minimum bounding box?

texts:
I have a MultiPolygon representing the city boundary of Houston and it has an extremely complicated boundary. I also have a set of ~900,000 points (that has the same minimum bounding box as that Houston polygon). About ~400,000 of these points are within the polygon but the others lie outside it. Using python, geopandas, and shapely I tried intersecting this polygon with my points using r-tree. But because the points and polygon have the same minimum bounding box, r-tree offers no speed-up. The process currently takes 30+ minutes.

Which (if any) type of spatial index can I use to accelerate my intersection query when the polygon and points have the same minimum bounding box?

Edit to add code snippet here:

sindex = gdf['geometry'].sindex
possible_matches_index = list(sindex.intersection(polygon.bounds))
possible_matches = gdf.iloc[possible_matches_index]
points_in_polygon = possible_matches[possible_matches.intersects(polygon)]


texts: Hillshade is not showing relief in ArcMap

texts:
When I use the hillshade tool this is what the map looks like. The shaded relief is not showing what it should.

How do I fix this?


texts: What is the efficient way to find the top-most images of a Landsat-8 mosaic with latest data on top?

texts: I'm building a simple mosaic of Landsat-8 for a region of interest (a bounding box) for a time period, so that the latest data would be put on top of the mosaic. I've found 100 scenes with cloud cover from 0 to 5% that intersect with the ROI, so I have a list of 100 unique geometries, sorted by an acquisition date. Now I want to determine which scenes are "on top" of the mosaic in order not to download the scenes that won't be visible. I wonder what is the most efficient way to find the top-most geometries with the least number of intersections? The difficulty is that I've sorted images by cloud cover, so now some images in strips are missing


texts:
I use quite often QGIS expressions and I am wondering how performant they are compared with other possibilities. In many cases, the same problem can be resolved using different approaches like using either expressions, or a combination of GUI tools, or a query in a virtual layer, or a python script (and others, like PostGIS).
Apart from the situation when certain goals cannot be realized by using expressions, I'm interested in the limitations regarding performance (an example below, update 2). So the question is: are there any clear criteria when expressions hit a performance limitation and turn to be less performant than virtual layers or python scripts?
Regarding some more complex expressions, I realized that they can quite take some time to update when used for "realtime" rendering as in these expamples here:
Re-locating points randomly at certain distance in QGIS
Create road network from points
Update 2: One limitation in the kind that I am asking for is mentioned by Ujaval Gandhi in a recent tutorial:

aggregate expressions are not yet optimized with spatial indexing

see QGIS with Ujaval Gandhi, at 1:02:21 to 1:02:53, https://youtu.be/IraiAF4s5Tg?t=3741
Update 1, to be more precise: I am primarily intersted in the performance of the algorithms that run in the background when using expressions (compared to virtual layers, python etc.). Of course, using expressions for symbol layers with geometry generator is nice, but with a a lot of features and complex calculations, this dynamic approach of permanent redrawing and calculating the map canvas can be sow. But this is not primarily a limitation of expressions, but of their use for "on the fly" creation of geometries and affects virtual layers as well. Using expressions with the geometry by expression tool (see documentation) does not have this limitation - however the question of performance is still relevant there.


texts: Reverse Proxy for WFS queries breakdown and consolidation with body processing

texts:
I am reviewing options on how to break down and consolidate WFS requests across multiple backend servers. The client would connect to a single endpoint, but then depending on their Query or POST parameters (mainly Layer/Table name), these would be processed by different endpoints on different backend machines. Sometimes the incoming request would have to be processed in parallel on a couple of backend machines (many layer names in one request). From what I understand I am looking for some sort of a Reverse-Proxy.
Because the WFS Feature (and other Operations) Requests need multiple formats, such as XML/GML or GeoJSON, I need to be able to nicely stitch together responses from underlying services into a single response body. From each such backend response, I need to extract part of the XML or JSON that I am interested in and merge/consolidate into the response body. So I am not interested in plain response concatenation, but also a bit of on-the-fly processing too. This is so that for the end-user all looks like a seamless WFS Endpoint.
I want this so that I can get granular control over resources/servers dedicated for processing of particular Layers/Tables.
What solution would roughly suit the above? Is nginx the right choice for such custom breakdown/consolidation? Or should that be a nodejs app? This component should be very scalable to handle a high throughput of requests. I did wonder if Azure Function could do the work, but I read it might be better for smaller loads.


texts: Adding National Grid Reference data from spreadsheet into QGIS

texts:
I have been given some point data and loaded it against the relevant open street map. I'm looking to create a point shapefile based on the National Grid References (NGR) found within a spreadsheet.
If memory serves correctly, if I have the spreadsheet incorporated into my QGIS 3.12 project, I can access the relevant column containing the NGR to produce a points layer.
I'm not sure how to do either and struggling for the correct search terms to find the answer.


texts: Converting gml to geojson using Python and ogr with geometry transformation?

texts:
Does anyone have an idea how to convert gml to geojson (with attributes) using Python with ogr bindings?

It should be possible to transform geometries to different coordinate system.

I can not use external ogr2ogr, but pure Python (no fiona).


texts:
I downloaded multiple areas in AW3D30, but each time, the DSM file is 32 bit (instead of 16 as indicated in the specs), and the 32 bits are grayscale with the alpha channel always to 255. (I'll be using red, green, blue and alpha to talk about each of the 4 bytes)

This is very weird, as elevation from 0m to 3000m is indicated by the red, green and blue channel going from 0 to 11.

Also, it seems that voids in the data are set to white (255) as opposed to -9999 (as indicated in the specs).

Can someone used to AW3D30 help me out?

I used the official website : https://www.eorc.jaxa.jp/ALOS/en/aw3d30/data/index.htm


texts: Sum of numeric field is not displaying as a real number in QGIS

texts:
I have calculated the area of polygons in my map in the Attribute Table with the Field calculator

This command gives me a new column with the area for each polygon

Then I go to the "Basic Statistics for numeric fields" option in the Analysis Tools at the vector toolbar.

Unfortunately the statistics is displayed with the "e" coefficient

How can I have it as a full number and not in this short version?


texts: Examples of ArcGIS Server 10.x REST map service layers with OpenLayers 3?

texts: I am looking around, but so far I have only seen examples for OpenLayers 2 that use ArcGIS REST map services (dynamic, not cached). Is there a way I can add an ArcGIS 10.x REST map service to OpenLayers 3?


texts: How are people using Python data structures and classes in ArcPy?

texts:
This question may expose my ignorance on programming but I'm curious about how people are using different python data structures within ArcPy.

This page lists the data structures in Python.  I understand how lists can be implemented in GIS (list of feature classes, list of feature types, list of data frames, etc).  I understand how sets can be used as well (to remove duplicates).  How are people implementing tuples, dictionaries, and other data structures within ArcPy?  Also, are there other examples of lists and sets which I haven't listed?

Furthermore, no doubt, people are creating custom classes in ArcPy.  Under what circumstances and situations do you require these?  Can you provide examples?  Is anyone creating custom classes which inherit from the built-in arcpy classes?

I don't require answers to all of these questions, I'm just curious how people are using Python in GIS and what workflows require these customizations.


texts: Cannot assign custom projection to raster file in QGIS

texts:
I have a LiDAR data tile (raster file in GeoTIFF format) that is currently in WGS 84 (lat/long) geographic coordinate system. However, the data was collected in New Arc 1950 / UTM Zone 36 South projection / Clarke 1880 spheroid. This system does not exist in QGIS, but I tried adding it as a custom CRS in QGIS 3.0.0 using the proj4 reference:

+proj=utm +zone=36 +south +a=6378249.145 +b=6356514.966398753 +towgs84=-143,-90,-294,0,0,0,0 +units=m +no_defs.

I found the proj4 reference here: https://epsg.io/20936

When I then use the 'Assign Projection' tool, setting the desired CRS as the custom one I just created, I get the following error:
Failed to process SRS definition: USER:100026

The full log message is:

  Processing algorithm…
  AlgorithmDialog
  Input parameters:
  { 'INPUT' : 'C:/Users/hp/Desktop/COOPI/GIS_Data/REFINED_DATABASE/Elevation/Lower_Shire_LiDAR/DTM Data Sample Tile/731500_8170000_class_DTM/731500_8170000_class_DTM.tif', 'CRS' : 'USER:100026' }

  GDAL command:
  cmd.exe /C gdal_edit.bat -a_srs USER:100026 "C:/Users/hp/Desktop/COOPI/GIS_Data/REFINED_DATABASE/Elevation/Lower_Shire_LiDAR/DTM Data Sample Tile/731500_8170000_class_DTM/731500_8170000_class_DTM.tif"
  GDAL command output:
  Failed to process SRS definition: USER:100026
  Execution completed in 0.37 seconds
  Results:
  {'OUTPUT': 'C:/Users/hp/Desktop/COOPI/GIS_Data/REFINED_DATABASE/Elevation/Lower_Shire_LiDAR/DTM ' 'Data Sample ' 'Tile/731500_8170000_class_DTM/731500_8170000_class_DTM.tif'}

  Loading resulting layers
  Algorithm 'Assign projection' finished


texts:
I have a list of 565 parcel numbers in a dBase table, I also have a shapefile containing all addresses/parcel numbers in a given area. I would like to create a new layer from the shapefile based on the corresponding parcel values in the dBase table. PLease note that the shapefile may have multiple instances of the same parcel number, where the dBase table does not. This, in a sense, is like a 1 to M relationship, except I want to create a layer with all the related values for all the parcel numbers.

The only way I can think of doing this is to define a relate based on parcel number, select all features in the current table (dBase) and view related table for all values, then export the related table. However with the dBase table containing 565 values and the shapefile containing over a million values, this is a slow inefficient process. Anyone know a better way?


texts: Command Line FGDC/ISO 19115 Metadata Editor

texts:
Are there any metadata editors compliant with ISO 19115 and/or FGDC metadata standards which can work with XML formatted metadata and run solely on the command line?  Often times I'm working remotely or otherwise desire a headless environment and would like to do editing of metadata from the shell.

Most of the metadata editors I've seen either run in a GUI (i.e. CatMDEdit) or are web based like GeoNetwork.  I've looked at this list of editors for now, and haven't really found anything that fits the bill.

http://www.fgdc.gov/metadata/geospatial-metadata-tools

Although I know the 'mp' program can validate metadata, I haven't come across an actual command line metadata editor yet.  Any suggestions would be appreciated.


texts:
Does anyone know of consumer-level tools that can write Enhanced Compressed Raster Graphics (ECRG - MIL-PRF-32283) files, based on some other raster format (e.g. GeoTIFF, or some image plus world file). Open Source would be preferred, but I'm interested in identifying any potential sources to help test a reader.

There are several readers (GDAL, FalconView, ESRI and Intergraph products), but I'm specifically looking for writers.


texts: Pass elements of list as function arguments to ee.Image.cat in Google Earth Engine

texts:
I would like to pass a list of images as arguments to the function ee.Image.cat.
Just like in this example, except not calling each element of list seperately with .get:
var list = ee.List([]);
var image1 = ee.Image(1)
var image2 = ee.Image(2)
list = list.add(image1);
list = list.add(image2)
var img = ee.Image.cat(list.get(0), list.get(1))
print(img) //Output: Image (2 bands)

I have tried .getInfo, .map, .apply and spread(...) without success and cannot find hints on any other way of doing it. I have read in the documentation for GEE that ES6 functionality is not supported currently, which explains why spread(...) does not work.
.getInfo() returns an error:
var img = ee.Image.cat(list.getInfo())
print(img) //Output: Unrecognized argument type to convert to an Image: [object Object]

.map returns (as expected) a list of the images:
var img = ee.Image.cat.map(list);
print (img) //Output: List (2 elements)

.apply returns an empty image:
var img = ee.Image.cat.apply(null, list);
print(img) //Output: Image (0 bands)

spread(...) returns an error:
var img = ee.Image.cat(...list);
print(img) //Output: SyntaxError: Unexpected token

Does anyone know how to do this?


texts: Adjusting transparency of layer in certain areas of map using QGIS

texts:
In the following map, I'd like to adjust the transparency of the Delaware River so that it is more opaque in the area directly adjacent to Philadelphia county, and more transparent in the areas outside of Phila Co., i.e. in the areas highlighted in yellow.

I've done this in ArcGIS using the Effects toolbar and am wondering if there is a QGIS equivalent.


texts: Creating feature layer using local json file in arcgis API for javascript 4?

texts:
i'm new to using arcgis javascript api and to data visualization in general . my supposed use case is the following ::

I have a database of employees information that's stored in JSON format like this ::

[

   {
      "name":"lorem ipsum",
      "role":"software engineer",
      "location":"london, uk"
   } ,,,,,,,

]

how can i represent this data on an arcgis map ?

i've been drowning in the sample code section of the docs but really didn't get my answer.


texts: Gaps in Mosaic Dataset made in ArcMap 10.0 SP5

texts:
I have created a mosaic dataset and then filled it with a set of georeferenced ECW images using the "Add Rasters to Mosaic Dataset" tool. The problem is that when I export the map to PDF at a large scale (1/1000) everything seems to be fine but when I export the map to PDF at a smaller scale (1/5000) small rectangular gaps appear like in the following example.
The weird thing is that  that in both maps (large scale and small scale) the printed area of both pages are the same size.

At the following photo you can view the settings that I used with the Add Rasters to Mosaic Dataset tool. I tried once more using maximimum levels set to 3 instead to null but without success. While exporting I use the default settings.

Has this problem happened to anybody else?


texts:
Does anyone have any suggestions for burning a road network into a DEM?  I have a Python script written up for this executing this in ArcMap, but I would love to hear if anyone knows of any freely available toolboxes that might have more complicated options/settings (such as removing a greater amount of elevation or a wider path due to the road type - i.e. different "burning options for small country roads versus wide city boulevards).

I'm planning on using this national Tiger/Line dataset: https://www.census.gov/geo/maps-data/data/tiger-line.html

If anyone has any general comments on using this dataset, or whether there may be a better one, I'm all ears. For instance, roads in this dataset appear like they are are broken down into different degrees of resolution - all roads at the county level shapefiles, Primary and Secondary Roads at the state level shapefiles, and Primary Roads at the national level shapefile.  I'm thinking to get the coverage I want I would have to merge all that county level data together for the whole US.


texts: Exporting Selected By Attribute To Shapefile In ModelBuilder?

texts:
we can do a selection by "select by Attribute" and using RtClick on layer --> Data-->Export Data-->Export Selected Features output the selected as .shp format file. Now I am trying to do this in ModelBuilder (Using the NEW_SELECTION type of selection) like :

But I couldn't figure it out what tool I should use to export ONLY the selected part in ModelBuilder.

Can you please let me know what should I use here?


texts: Is there a way to hillshade vector polygons with a DEM in QGIS?

texts:
I have a layer of cadastral polygons that I'd like to display as hillshaded. For the elevation model I can use either an SRTM geotiff or use a set of 20m contour vectors.

While I could make a jpeg of the cadastral regions and drape that (never done it in QGIS, but I think you can call GRASS to do it), is there a way to directly drape and hillshade the vectors?

UPDATE 1: SOLUTION BY MAKING POLYGONS TRANSPARENT.

In my first try, I have opted for this method: Basic white hillshaded SRTM DEM, with 10m contour vectors added and coloured cadastral polygons made 60% transparent. Not too bad for minimal effort, but a bit dull.

UPDATE 2: USING BLEND MODES FOR LAYERS IS REALLY EASY

It turns out that the suggestions to use layer blending modes does not require any great delving into the inner workings of QGIS, but is right there in the layer properties, and is as easy as changing a line width or a fill colour. See screenshot below. Also I found some nice examples and discussion of it from the developer, Nyall Dawson  nyalldawson.net: Blend modes for layers.

UPDATE 3: LAYER BLENDING MODE "BURN" GIVES THE RIGHT RESULT. JOB DONE.

The screenshot below provides me with a solution to my initial question, "is there a way to hillshade vector polygons with a DEM in QGIS". I would now say yes, or at least the illusion of it is practically perfect.

The Screenshot actually shows two blending modes compared. The one above the thick red line is "multiply" applied to a 60% transparent green polygons, while below is "burn", also to a 60% green polygon. Burn gave a brighter, more '3D' result.

Two points to note: I still found the contour lines necessary to promote the effect; without them the DEM lacked visual form. The contours are above the polygon layer this time (looks better), whereas my old screenshot had them under (looks worse). Secondly, when using Burn, I had to put the cadastral boundaries as a separate layer over the green fill layer, because otherwise 'burn' burned the lines out.


texts: PostGIS - How to extract polygons in a rectangle by their centroid?

texts:
I'm new to PostGIS and I'm amazed what can be done with it!
Currently I'm running a query from a large database where I need to split the extracts into smaller chunks so that I'm not bouncing at the ~2GB limit for DBF files with the extract.

pgsql2shp -f temp1.shp -h localhost -u postgres -P password gb "SELECT waterext.geom FROM waterext WHERE waterext.geom && ST_ENVELOPE(0,0,1,1)"
pgsql2shp -f temp2.shp -h localhost -u postgres -P password gb "SELECT waterext.geom FROM waterext WHERE waterext.geom && ST_ENVELOPE(1,0,2,1)"
...

While this works fine with points, it doesn't work so well with polygons. Polygon features that overlap the envelope partially, will show in in the neighboring envelope as well, which creates unwanted duplicates.

My idea is to run the centroid of each polygon feature against the envelope to see if it lies within. Would something like that be possible or are there easier solutions?


texts: Importing DXF to QGIS results in all lines being same colour?

texts:
I am using QGIS 2.4.

I need to import a map I have been given into QGIS to add some ecological survey data.

I was sent a DWG file, which consists of a base map and some overlay data, like land ownership boundaries etc. I opened this using TurboCad, and saved it as a DXF file.  I can open the DXF file in TurboCad with no problem, and all looks like it did when I was using the supplied DWG.

To import the DXF file into QGIS, I tried Layer>Add Vector Layer...Source type: file... Encoding: System.  When I do this (having selected all three vector layers I'm offered, and the correct CRS) the file opens, but all of the lines are now the same colour and all the overlay information has disappeared.

What is going on, and how might I address it?


texts: I am resampling Modis and Sentinel 2 rasters in QGIS. I am working with surface reflectance values and I am having trouble obtaining the results that I am looking for. I have isolated my rasters down to their red band surface reflectance values. I am trying to threshold these reflectance values to >0.45, while at the same time retaining the pixel value. Every method of thresholding I have attempted results in all pixels having a value of either 0.0 or 1.0. How do I retain my original reflectance values while still thresholding?


texts: Can exporting geodata to OSM data format with less precision cause self-intersections? How to address it?

texts:
I have my geodata layers processed in GRASS GIS. Its internal tools report that the topology has no problems, such as self- and mutual intersections.

Then I export the data to a GML file which then is converted to an OSM XML format, the last step preserving all coordinates intact. This OSM file is then opened in JOSM and validated, at which point quite a lot of self-intersections, duplicate nodes etc are found.

It was very confusing for me to understand where these problems come from until I noticed that they happen mostly on vertical (north-south) or horizontal segments of polygons.

Upon closer inspection I noticed that GRASS operates with floating point coordinates having 11 digits after the dot, and the GML and OSM files have 11 digits. The JOSM editor then shows only 7 digits after the dot in UI. Data exports from the existing OSM database has 7 digits. However if I re-save my own OSM file opened in JOSM as a new OSM file it retains 11 digits.

Can this reduction of precision lead to the types of topology problems I observe? If so, what is the best approach to avoid/fix them?

I can use GRASS to discover/fix topology problems, but native OSM tools/editors cannot do that, so my best bet is to somehow tell GRASS to use reduced precision.


texts:
I have a sld style:

<se:FeatureTypeStyle>
    <se:Rule>
      <se:Name> 0 - 100 </se:Name>
      <se:Description>
        <se:Title> >101 </se:Title>
      </se:Description>
      <ogc:Filter>
        <ogc:PropertyIsGreaterThanOrEqualTo>
            <ogc:PropertyName>count</ogc:PropertyName>
            <ogc:Literal>101</ogc:Literal>
          </ogc:PropertyIsGreaterThanOrEqualTo>
      </ogc:Filter>
      <se:PolygonSymbolizer>
        <se:Fill>
          <se:SvgParameter name="fill">#ff0000</se:SvgParameter>
        </se:Fill>
      </se:PolygonSymbolizer>
    </se:Rule>
    <se:Rule>
      <se:Name> 51- 100 </se:Name>
      <se:Description>
        <se:Title> 51- 100</se:Title>
      </se:Description>
      <ogc:Filter>
        <ogc:And>
          <ogc:PropertyIsGreaterThanOrEqualTo>
            <ogc:PropertyName>count</ogc:PropertyName>
            <ogc:Literal>51</ogc:Literal>
          </ogc:PropertyIsGreaterThanOrEqualTo>
          <ogc:PropertyIsLessThan>
            <ogc:PropertyName>count</ogc:PropertyName>
            <ogc:Literal>100</ogc:Literal>
          </ogc:PropertyIsLessThan>
        </ogc:And>
      </ogc:Filter>
      <se:PolygonSymbolizer>
        <se:Fill>
          <se:SvgParameter name="fill">#00ff00</se:SvgParameter>
        </se:Fill>
      </se:PolygonSymbolizer>
    </se:Rule>
    <se:Rule>
      <se:Name> 0- 50 </se:Name>
      <se:Description>
        <se:Title> 0- 50 </se:Title>
      </se:Description>
      <ogc:Filter>
        <ogc:And>
          <ogc:PropertyIsLessThan>
            <ogc:PropertyName>count</ogc:PropertyName>
            <ogc:Literal>50</ogc:Literal>
          </ogc:PropertyIsLessThan>
        </ogc:And>
      </ogc:Filter>
      <se:PolygonSymbolizer>
        <se:Fill>
          <se:SvgParameter name="fill">#0000ff</se:SvgParameter>
        </se:Fill>
      </se:PolygonSymbolizer>
    </se:Rule>
  </se:FeatureTypeStyle>

So depended on field count i got:

>=101  Red polygon
51-100 Green polygon
<=50   Blue polygon

Now i add CQL filter into wms request to show features with count <=100:

CQL_FILTER=count%3C%3D100

So i got Green and Blue polygons only.
And here my question.
Can i modifi my SLD to it dynamicaly change filters values? For example above, after adding CQL filter i got features with count <=100. And i want to filters changed like:

51-100 Red polygon
<=50   Green polygon

It possible make something like this?


texts: How to convert from Navit to PostGIS or shapefile?

texts:
I have a Navit BIN file which I want to use in PostGIS or QGIS, so I need to import it to PostGIS or convert it to a shapefile.  I have found a lot of information on how to convert data TO the Navit format, but nothing on how to do the reverse.

Is this possible?  Is there an exporter?


texts:
The Geospatial Information Authority of Japan (GSI) started to provide national tiled maps in 2012. Initially we could not use the tiled maps with GDAL TMS minidriver because the tile URL naming system was special.

Almost one year later, GSI adopted a common tile map system known as slippy map or XYZ tile, which is used by major web map services such as Google Maps and OSM, and released GSI Tiles officially. Since then we can access the tiled maps via GDAL TMS minidriver, but I am not satisfied with some points - incorrect displayed image (I'm not sure it's because of mixed image format. This problem might have been resolved now), image quality and no reaction with high CPU usage while fetching data. So I shared TileLayerPlugin in the QGIS plugin repository.

Last May, GSI started to provide WMTS metadata for the tiled maps experimentally. The quality of image data from the QGIS core WMTS provider is high on both map canvas and print, and there are many rendering options in the raster properties dialog. I can do what I want to do without the plugin.

If there is a similar WMTS service (metadata) for OpenStreetMap, we can use the maps via the WMTS provider. Does anyone know if there is an OSM WMTS service?


texts:
I am a new user of SAGA GIS software.
I need to interface the Civil 3D 2015 and Hec Ras software in order to create a flooding map.
In order to put in communication the two softwares, I have to use the SAGA 2.1.0.
From the Civil 3D, I create a geotiff file (*.tif) and I've tried to import it into SAGA (with the command GDAL/OGR - GDAL:Import Raster).
Unfortunately, SAGA doesn't import the file and shows this error message:

"Parameters file could not be imported"
"XML parsing error:'syntax error' at line 1.

Can someone help please?


texts: Why the projection system and units are showing differ in ArcGIS and Autodesk AutoCAD Civil3D?

texts:
I have converted a bunch of shapefiles to .dwg through Model Builder in ArcGIS. The units and projection system is showing correctly in ArcGIS properties but in Autodesk Civil3D units are showing in feet and the projection system is showing no values for the same files.

What is the reason and how can I make it correct?


texts: is there a way to handle an error within the ArcGIS ModelBuilder? I have a model which iterates over hundreds of raster files. some of them may be corrupt. i`m looking for a way in which the ModelBuilder skips any corrupt raster files and proceeds with the next file.


texts: What can I use for Territory Management in Canada?

texts:
For our Canadian organization, I would like to map out the Postal Codes for each sales rep on a map.  I've so far used R to pretty good success, but it completely lacks the interactivity I need to make updates and analysis easy.  I've toyed with RMaps and almost had a good solution there, but then my shapefile rendered WACKY.

I've recently tried out TileMill and figured "HERE IT IS!", but, alas, now loading Tiles into the map seems to be a MASSIVE headache.  I can't seem to find a hosted tile server, and I cannot host my own PostGIS server on my work laptop (nevermind the fact that it seems crazy to do...)

What do people ACTUALLY use to map things out?  It can be desktop or web based, but my worry about web based is that I'll be playing with very sensitive information and security would be a risk...


texts: Filtering a loaded kml file in OpenLayers

texts:
I'm trying to create an interactive search engine (for finding event tickets) of which one of its features is a visual map that shows related venues using OpenLayers.  I have a plethora of venues (3000+) in a kml file that I would like to selectively show a filtered subsection of.  Below is the code I have but when I try to run it has a JavaScript error.  Running firebug and chrome developer tools makes me think that it is not getting passed the parameters I give because it says that the variables are null.  However, I cannot figure out why they are not getting passed.  Any insight is greatly appreciated.

var map, drawControls, selectControl, selectedFeature, select;
$('#kml').load('venuesComplete.kml');
kml=$('#kml').html();
function showVenues(state, city, venue){
    filterStrategy = new OpenLayers.Strategy.Filter({});
    var kmllayer = new OpenLayers.Layer.Vector("KML", {
    strategies: [filterStrategy,
        new OpenLayers.Strategy.Fixed()],
    protocol: new OpenLayers.Protocol.HTTP({
        url: "venuesComplete.kml",
        format: new OpenLayers.Format.KML({
        extractStyles: true,
        extractAttributes: true
        })
    })
    });
    select = new OpenLayers.Control.SelectFeature(kmllayer);
    kmllayer.events.on({
        "featureselected": onFeatureSelect,
        "featureunselected": onFeatureUnselect
    });
    map.addControl(select);
    select.activate();
    filter = new OpenLayers.Filter.Comparison({
        type: OpenLayers.Filter.Comparison.LIKE,
        property: "",
        value: ""
    });
    function clearFilter(){
        filterStrategy.setFilter(null);
    }
    function setFilter(property, value){
        filter.value = value;
        filter.property = property;
        filterStrategy.setFilter(filter);
    }
    var vector_style = new OpenLayers.Style();
    if(venue!=""){
        setFilter('name', venue);
    }else if(city!=""){
        setFilter('description', city);
    }else if(state!=""){
        setFilter('description', state);
    }
    map.addLayer(kmllayer);
    function onPopupClose(evt) {
        select.unselectAll();
    }
    function onFeatureSelect(event) {
        var feature = event.feature;
        var selectedFeature = feature;
        var popup = new OpenLayers.Popup.FramedCloud("chicken",
            feature.geometry.getBounds().getCenterLonLat(),
            new OpenLayers.Size(100,100),
            "
"+feature.attributes.name + "
" + feature.attributes.description +'
'+feature.attributes,
            null,
            true,
            onPopupClose
        );
        document.getElementById('venueName').value=feature.attributes.name;
        document.getElementById("output").innerHTML=event.feature.id;
        feature.popup = popup;
        map.addPopup(popup);
    }
    function onFeatureUnselect(event) {
        var feature = event.feature;
        if(feature.popup) {
            map.removePopup(feature.popup);
            feature.popup.destroy();
            delete feature.popup;
        }
    }
}
function init() {
    map = new OpenLayers.Map('map');
    var google_map_layer = new OpenLayers.Layer.Google(
        'Google Map Layer',
        {type: google.maps.MapTypeId.HYBRID}
    );
    map.addLayer(google_map_layer);
    state="";
    state+=document.getElementById('stateProvDesc').value;
    city="";
    city+=document.getElementById('cityZip').value;
    venue="";
    venue+=document.getElementById('venueName').value;
    showVenues(state,city,'Michie Stadium');
    map.addControl(new OpenLayers.Control.LayerSwitcher({}));
    map.zoomToMaxExtent();

}


texts: Post data from excel spreadsheet-arcampdesktop- arccollector

texts: I recently created a excel spreadsheet with different webcams that have lat long, name and hyperlink for each angle on every camera. I am able to import that data from excel to arcmap desktop no problem, but when I transfer the data from the desktop to arccollector or AGOL all the attributes on the table are blank and does not show the symbol I created on the desktop.


texts: Unable to edit PostgreSQL/PostGIS layers in ArcMap using query layers?

texts:
I am connected to the database, have added a layer, started edit session, but I am unable to edit the attributeeo table of said layer.  ArcMap 10.2.2 tells me that it is not an editable layer.  When attempting the same procedure in QGIS, I am able to make any edits I need to.

Does the database need to be modified to allow specific users read/write ability?


texts: Vectorize a raster TIFF based on its different class colors

texts:
I am using QGIS 3.16 and I have an int ratser tiff file, which shows classified land covers obtained from Sentinel-2. I need to create polygons over each class to classify and visualize each group in a vector format. As shown in the image attached, the areas corresponding to each class are so scattered and there is not just this one image so I cannot draw polygons manually. I thought of using an specific field in the attribute table to separate a class, but it does not have an attribute table! Any ideas on how I can vectorize a raster based on its different class colors?

The zoomed in result from using polygonize tool under GDAL>raster conversion is like below over the same area. For example, all the light green area which is just one class, shows many many polygons instead of just one big polygon over the light green area

The ratser is classified as below:

I wrote this classification table and I got this result which only has to values of 0 and 13 instead of 1 to 5 that I was expecting:


texts: Adding Hyphen between text in Python Parser of ArcGIS Field Calculator

texts: I have list of numbers like this (S20170146) and I want to turn them to this format(S2017-01-46).Basically, I need to add "-" between the numbers.  I am using Arcmap I know how to use feild calculator. But I don't know to write python code to do this?


texts: How can I compute global triangulation from longitude/latitude coordinates?

texts:
I want to calculate an approximate location based on these inputs:

3 locations identified by latitude and longitude anywhere on a planet
3 angles, indicating the approximate direction from each of the 3 locations. For example, 0 degrees would be north, 90 degrees would be east, and so on.

The 3 angles will have some margin of error, so the 3 lines are unlikely to intersect exactly, and are likely to form a triangle, from which we can calculate some estimated area of interest. For example, we might calculate the center of the triangle, then draw a circle from that center that has the same areas as the triangle.

I would like to implement this in a computer program, where I can input the 3 locations, the 3 angles, and have it output a single location and radius.


texts: Export multiple FC's to cad in arcobjects C#

texts:
I am currently trying to export multiple feature classes to a single .dxf via the QuickExport function in the DataInteroperability extension. However this function only converts one FC to one .dxf, ie. One in, one out.

Can someone point me to another function that allows multiple files to be converted to a single output format?

I have tried using a list as an input but to no avail. I know of the ExportToCAD function in python. Is there something similar in C#?.

[EDIT]
Here is some code I have been playing around with. I decided to simply use the ExportCAD function in the ESRI.ArcGIS.ConversionTools namespace.

        try
        {
            IMxDocument mxdoc = ArcMap.Application.Document as IMxDocument;
            IMap map = mxdoc.FocusMap as IMap;

            ITrackCancel tc = new TrackCancel();

            for (int i = 0; i < map.LayerCount; i++)
            {
                List<string> layerInputList = new List<string>();
                ILayer pLayer = map.Layer[i];
                if (!(pLayer is IGroupLayer))
                {
                    for (int j = 0; j < map.LayerCount; j++)
                    {
                        ILayer layer = map.Layer[j];
                        if (layer is IGroupLayer)
                        {
                            IGroupLayer groupLayer = layer as IGroupLayer;
                            ICompositeLayer compGroupLayer = groupLayer as ICompositeLayer;

                            for (int k = 0; k < compGroupLayer.Count; k++)
                            {
                                ILayer featLayer = compGroupLayer.Layer[k];
                                layerInputList.Add("C:\\Users\\jhansen\\Documents\\LGA_GDBs\\" + pLayer.Name + ".gdb\\" + featLayer.Name);
                            }
                        }
                    }
                    Geoprocessor gp = new Geoprocessor();
                    ExportCAD exportCAD = new ExportCAD();

                    exportCAD.in_features = layerInputList;
                    exportCAD.Output_File = "C:\\Users\\jhansen\\Documents\\LGA_GDBs\\" + pLayer.Name + "_CAD.dxf";
                    exportCAD.Output_Type = "DXF_R14";

                    gp.Execute(exportCAD, tc);
                }
            }
        }
        catch (Exception ex)
        {
            MessageBox.Show(ex.Message + "\n\n" + ex.Source + "\n\n" + ex.StackTrace);
        }

And here is the error I get

suggesting that it falls over at the gp.execute() line

I suspect this has something to do with the list variable I am using at exportCAD.inputfeatures.


texts: Converting Layer off/on python code to script tool?

texts:
I have a python script that turns off all layers in an ArcGIS Pro project and then turns back on the Basemap layer. However, I need to convert this into a script tool so that it can be used in ModelBuilder. Either as individual script tools, one that turns all layers off and one that turns the Basemap layer back on; or as one script tool that does both.

Here is the script I have at the moment.

Turns all layers off

p = arcpy.mp.ArcGISProject("Current")
m = p.listMaps("*")[0]
lyrList = m.listLayers()
for lyr in lyrList:
   lyr.visible = False

Turns Basemap layer on

p = arcpy.mp.ArcGISProject("Current")
m = p.listMaps("*")[0]
lyrList = m.listLayers('Topographic')
for lyr in lyrList:
   lyr.visible = True


texts: Drawing circle of specified radius in meters using ArcGIS API for JavaScript?

texts:
I am trying to add a circle of a specified radius (let's say 200 meters) to a map. My thought is to create a SimpleMarkerSymbol object.  The constructor asks for a size of the symbol in pixels, but I don't know what functions are available to convert distance to pixels.

E.g.,

var sizeInPixels = //how do convert 200 meters to pixels???
var circleSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE,
  sizeInPixels,
  new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
  new dojo.Color("#0"), 1),
  new dojo.Color("#fff"));

Any insight?


texts: Do I need to do Radiometric Normalization for time series analysis, if I'm using L2_Landsat8_SR data?

texts:
I'm doing some forest change detection across several years using L2_Landsat8 Surface Reflectance data. And I am implementing the method available in R (landsat::relnorm) for relative radiometric normalization of the images, so they can be compared between dates. But someone mentioned that the SR_Landsat8 images are already normalized, although I haven't managed to find any information confirming this. Not sure if he was referring to something else.

Could someone clarify whether I need to normalize all the images of the time series using a master image or whether Level 2 Surface Reflectance data are ready to be compared between dates?


texts: Leaflet Drag and drop to change existing markers

texts:
I'm working on a project where the user should be able to drag an image to a pre-existing marker and have the marker update color if the value of the marker (a value w/in the geojson) and image (a value w/in the img attributes) are the same. I was thinking I'd use jQuery ui's drag and drop to handle the dragging, but I can't figure out how I'd isolate the specific marker as the droppable area and check the value of that marker.

When I inspect the markers in chrome, all I see is the div for marker pane, not any of the individual markers. So I'm lost as to how I'd access the markers w/ jQuery? Any ideas?

Basically, I'm trying to replicate this functionality, but with geojson generated markers instead of the card slots.


texts: How to increase distance between time bins on Z axis?

texts:
I have 19 time bins from 1993-2013 on vertical axis. I want to place them further away from each other along Z axis. Currently they're stacked on to each other like it looks now in the image attached.

Is there any way to increase the inter-bin distance at vertical scale?


texts: Lightning Data Analysis in ArcGIS ModelBuilder?

texts:
I am new to ModelBuilder in ArcGIS Desktop. I have two shapefiles, one is a polygon shapefile of all lightning caused fire in Alaska sine 1939 (~1500 polygons) and the second is a point shapefile with all recorded lightning strikes since 1986 in Alaska (~10000 points).

What I want to do is create a data/attribute table that outputs the following for varying time scale (1 day through 16 weeks):

If the fire had a lightning strike within it on the time scale specified and latitude/longitude of strike
If not what is the nearest strike and its distance (point (lightning) to centroid (fire polygon)or point to nearest edge)
Polarity of strike
Multiplicity of strike

The attribute table I have for the lightning data has all strike Lat/Long, polarity, multiplicity. This is a flow chart of the analysis I want to do:

Select lightning and fire that falls in specified time (I have dates of both strikes and fire)

--> determine if a strike was in the fire

--> if yes then put the specified value from the lightning table into the new table along with fire ID

--> If no find the nearest strike to the fire and its distance to the fire

--> add specified values for this strike to same table

What would the basic outline for a model that performs this flow look like?

Are there any alternate methods to achieve this with such a large data set?


texts: Intersect a line considering the topological direction

texts: I have a set of lines in postgis, and  I want to intersects those lines which only go from point A to point B. And I don't want those lines which go from point B to point A. So, my question is : how I set in my query the topological direction ?


texts: AutoDesk Infrastructure Studio cannot access Map Server (Windows + IIS)

texts:
After restarting the entire server I continue to get this error when accessing any mapagent service (e.g. http://myserver/mapserver2013/mapagent/mapagent.fcgi?SERVICE=WFS&request=getcapabilities).  Although the error does a good job at suggesting the problem there is no help for how to actually fix the problem.  I suspect Map Server is not running...but how do I confirm and fix that?

  Problem: Cannot establish connection to the Infrastructure Map Server.

  Possible Causes:
  -Your session has been idle for too long;
  -Infrastructure Map Server is no longer responding;
  -Internet connection problems.

  Solution: Restart your application / session, restart the
  Infrastructure Map Server service, or contact with the server
  administrator.

Also, when I perform Site Authentication in Audodesk Infrastructure Studio I get an error saying:

  Unable to connect to Map Server.  Please ensure that the server
  process is running and firewall rules have been set correctly.

I don't know what the server process is called.  I see nothing related to autodesk/mapserver/mapguide under services.


texts: Determine if mapped points are related geographically

texts:
Hoping you can help. I'm a clinician trying to determine if some mapped points are related.
I basically have a data set of certain long/latitudes.
Each lat/long is associated with a positive Sputum Culture for a certain bacteria. Say pathogen A.
I have another 'control' dataset with Sputum cultures of a more predominant normal pathogen with associated lat longs. Pathogen B.

Is there an easy way to determine if there's a geographic relation to these points. For example, if you live in this geographical area are you more likely to get said pathogen.

I have plotted the points in R using ggmap and was hoping to visually determine a link, however there's a lot of noise.

Can somebody guide me to where I can learn how to go about doing this.
Happy to try to figure this out on my own, just not sure where to start.


texts:
I have a GeoCSV file which stores the geometry in a WKT formatted cell following this recommendation:

"identifier","date","geom","value"
"Dgf01","15.04.2013","POINT (52.404869 13.147457)","285"
"Erp06","19.07.2012","POINT (52.455153 13.603216)","170"
"Gbs02","06.08.2013","POINT (52.476737 13.215827)","305"
[...]

But it does not recognize the geometry field, it always says Geometry: None.

 $ ogrinfo -ro -geomfield "geom" geo.csv -al
INFO: Open of `geo.csv'
      using driver `CSV' successful.

Layer name: geo
Geometry: None
Feature Count: 3
Layer SRS WKT:
(unknown)
identifier: String (0.0)
date: String (0.0)
geom: String (0.0)
value: String (0.0)
OGRFeature(geo):1
  identifier (String) = Dgf01
  date (String) = 15.04.2013
  geom (String) = POINT (13.147457 52.404869)
  value (String) = 285

[...]

I tried different formats but it does not work at all. How to read GeoCSV with OGR correctly?


texts: Determine all places where I can place a basketball court sized rectangle in a polygon file

texts:
I have a polygon file:
and I need to find all those places where I can fit a 30 m by 15 m rectangle, without overlapping, (not necessarily those larger than 450 square meters, which may be 10 m by 45 m). How can I achieve this, in any of the tagged softwares?


texts: GDAL processing output to memory in Pyqgis

texts:
How do I save GDAL processing output rasters to a temporary layer? Using 'memory:' for vector processes works fine, but I couldn't get it to work for GDAL processes.

output_rast = self.parameterAsOutputLayer(parameters,self.OUTPUTR,context)

if True:
    magnitude_rast = processing.run("gdal:rasterize", {
        'INPUT':buffer_extent,
        'BURN': magnitude,
        'UNITS': 1,
        'WIDTH': 1.0,
        'HEIGHT': 1.0,
        'EXTENT': buffer_extent,
        'OUTPUT': 'memory:'
    }, context=context, feedback=feedback)['OUTPUT']

if True:
    source_rast = processing.run("gdal:rasterize", {
        'INPUT':parameters['SOURCE'],
        'BURN': 100,
        'UNITS': 1,
        'WIDTH': 1.0,
        'HEIGHT': 1.0,
        'EXTENT': buffer_extent,
        'OUTPUT': 'memory:'
    }, context=context, feedback=feedback)['OUTPUT']

if True:
    proximity_rast = processing.run("gdal:proximity", {
        'INPUT':source_rast,
        'BAND': 1,
        'VALUES': 100,
        'UNITS': 0,
        'DATA_TYPE': 5,
        'OUTPUT': output_rast
    }, context=context, feedback=feedback)['OUTPUT']
return {self.OUTPUTR: output_rast}

I've also tried using None for the output parameter as recommended here but I get an incorrect parameter value error.


texts: Getting Error 000151 from ArcGIS Projection?

texts:
I'm having big problems with arctoolbox  of ArcMap 10.3.1 to project almost all my layers from TM65 - Irish Grid to IRENET95 - Irish Tranverse Mercator.I always get the error 000151 and the Help is not very helpful.
It looks like I can't choose the Geographic Transformation so "New Geographic Transformation" is the selected one.

Any idea??

You can try with "All Ireland" dataset here http://gis.teagasc.ie/soils/downloads.php.