texts: Merge XYZ tilesets with different origins

texts:
So I have hit a snag. I wish to merge multiple XYZ tile sets together. Meaning I have multiple directories which contain tiles in the format /zoom/x/y.png.

I tried just copy and pasting them in to the same directory, but it appears that some of the tiles have clashing file names, and thus I lose some tiles with this approach. For instance, nearly all the sets will have the tile 1/1/1.png, and this will be overwritten every time.

I am taking this route because the tiles are being generated from multiple VRTs that span a wide area, each with large swathes of NODATA between them. So when I end up tiling them, 90% of the tiles it generates are empty bogus. Normally this wouldn't be a big issue, but at the scale I am at it ends up adding many hours to the processing time.

One solution I think would be to convert all the tile sets to use a single origin, determined by analyzing the VRT sources for the different tilesets. Then I would go through all the tiles in each of the tilesets and convert their /zoom/x/y.png path to use the new, recalculated origin.

The main function for converting the tile would look something like this:

getTilesNewXYZPath(
  originalTileOriginLat,  # Original tile's origin latitude
  originalTileOriginLon,  # Original tile's origin longitude
  originalTileX,          # Original tile's x coord at zoom level z
  originalTileY,          # Original tile's y coord at zoom level z
  originalTileZ,          # Original tile's zoom level (z)
  newTileOriginLat,       # Origin latitude to convert to
  newTileOriginLon,       # Origin longitude to convert to
)

How would I do this? Does anybody have some math they could point me towards, besides that on the OSGeo wiki? Or am I going about this the whole wrong way, and need to use a different strategy? Or even worse, is the overwriting behavior I am experiencing not caused by gdal2tiles.py?


texts:
I've installed GeoServer on my pc using the web archive and the OS of this pc is Ubuntu 18.04. I can use GeoServer without problem but I need to change the default data directory of GeoServer.
I've followed this official method modifying the context parameter to do this but withouth fortune.
What is the right way to change that folder?
I need to use /home/user-name/GeoServerDataFolder instead of /usr/local/tomcat9/webapps/geoserver/data.
Here the procedure that I've used to install GeoServer, I'm using Tomcat9.


texts: What purpose do intersection points serve when mapping?

texts: In this old map of California you will notice a ring of intersection points, all circling the focal land mass of the map. What are these intersections used for? I assume they are meant to guide the cartographer, but how do they work? What determines how the intersections of lines are placed?


texts: Change data source for multiple layers in ArcMap document?

texts:
I have a master copy of some data i'm working on on a remote server. Sometimes I make a copy on my local drive to speed up processing times, but data sources in my MXDs still point to the remote server.

I'm wondering whether there is a quick and easy trick to update the data source for all layers in ArcMap, without going into Python Scripting etc. I know I can update each individual data source through layer properties, and I have been using a workaround by 'breaking' the link to the remote server, then pointing one layer to the new source (when it has a red exclamation mark in the TOC), which then allows the other layers to find their relative sources. Is there a more elegant way of doing this?


texts: Locating project templates in ArcGIS Pro?

texts:
Does anyone know where the blank, global, scene and map aptx files in ArcGIS Pro are stored?

I notice that any project settings that you change, persist. I'm trying to get my blank.aptx to go back to what it looked like the first time I used it.


texts: Setting (above/under) priority order of layer in leaflet

texts:
When I add a layer in leaflet it stays automatically above all layers I want layers to be ordered wich one stays above the other in way that last added layer will not stays above and hide the other layers that may I have interaction with them (mouse :click,out,move...).
here my example order layers leaflet


texts: Problem with dialog boxes being too large for a small laptop screen

texts:
I'm relatively new to the GIS world having just started a course in QGIS.

I've been relatively successfully using QGIS for a couple of weeks on my desktop (large display), but have just switched to my laptop (standard TOSHIBA laptop) for a few weeks due to being on away work.

Since switching to the laptop I'm having problems with the display, in terms of the bottom of dialog boxes and menus not being visible (e.g. the layer properties box). Resultantly I've been unable select 'accept or 'run' etc and progress any further with projects.


texts: Error SAGA algorithms in Modeller QGIS 2.2

texts:
I am using QGIS Modeller and I try to use SAGA algorithms but it doesn't work. GRASS algorithms work just fine but SAGA doesn't.
I am not sure if I have to configurate something.

What is worng?


texts: Getting DEM data programmatically with libgdal?

texts:
I'm writing a specialized tool in C to work with DEM data (typically GeoTIFF files, but one of the reasons I'm using libgdal is to leverage its ability to read multiple formats).

I'm able to open a GeoTIFF file and get at some of the metadata, but how do I get at the elevation data (e.g., given a pixel location, get the height) programmatically?

Perhaps I need to index into the raw raster data myself.


texts: Checking snapping connection of polylines?

texts:
I would like to find a method using ArcMap that could check if all polyline are snapping and connected.

I tried to create road network, but I can see this information.

I have multiple polyline, and I would like to know if there is any ArcGIS tool that could help me to get information, if each polyline are snapping and connected.


texts:
I'm trying to reproject a vector layer using the 'qgis:reproject' algorithm in the processing/sextante module of QGIS, from Python.

This kind of works, but the .prj and .qpj files created after running the tool are empty, so when importing the resulting shapefile as a layer I get the specify CRS dialog.

When running the algorithm from the toolbox (Geoalgorithms->Vector->General tools->Reproject layer), both a .prj and a .qpj file is created and filled with data. According to processing_qgis.log, I am running the same exact processing algorithm. (Note: Not true, see my answer)

What is it the toolbox version does that I'm not doing? Should I manually create the .prj/.qpj files after reprojecting?

# Reprojecting - does not create proper projection files
processing.runalg("qgis:reprojectlayer", my_input_layer_object, "ESPG:102013",
    output_shapefile_path)

# Importing layer
output_layer = QgsVectorLayer(output_shapefile_path, "My Layer Name", "ogr")
QgsMapLayerRegistry.instance().addMapLayer(output_layer)


texts: Projecting attribute from one polygon layer to another in QGIS?

texts:
I have 2 polygon layers which can be found here.
The two layers are overlapping. The first contains a map of the German counties in 1928 and the second the counties how they are in 2014.

The 2014 layer contains information about the population (called Bev in the dataset). Is it possible to project the population attribute from the one polygon layer to the other?

To be a bit more specific:

Consider the situation where I have 2 counties in the layer with the population attribute but in the same area on the other layer there is only 1 county. Can QGIS aggregate the population of the two counties and write this information into the other layer?

If this works, is there also a way to do it when the layer with the information has in a specific area only 1 county but there are 2 counties in the other layer? In this case I would like to split the population proportional to the size of the county.


texts: Using Python in Arcmap to partition strings

texts:
I have a title "Text that remains Proposed Thing to replace"

  var_a = New Text

I want the output to be

  "Text that remains Proposed New text"

Currently outputs this

  "(u'Text that remains ', u'Proposed', u' Thing to replace')"

Trying to add the var_a

b = a.partition('Proposed') + var_a

But get this error

  : can only concatenate tuple (not "str")
  to tuple Failed to execute (LegendText).

# Loop through each text element in the map document
for textElement in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):

# Replace Title text
if textElement.name == "Title":

# With this text
a = textElement.text
b = a.partition('Proposed')
textElement.text = str(b)

Any ideas?


texts:
I have just exported a TIF DEM to XYZ format with SAGA GIS. When I check this with gdalinfo it states that the format is unsupported.
Seeing as I converted this with SAGA GIS which used gdal I find this rather strange.
Can anyone suggest what I did wrong?


texts: Overlapping topology layer issue on mapping crops QGIS

texts:
Trying to map cotton fields of CA using data from this site
https://nassgeodata.gmu.edu/CropScape/

Can not get my map to have a topographic underlayer without the other crops showing up as well other than cotton. How would I fill my layer with topology but only show cotton fields and not other crops??


texts: Should the import of local spatial vector files in different formats be handled Server side?

texts: I'm working on a Esri Silverlight Web API app and wondering the best way to handle the import of local spatial vector data files.  Sometimes these will be your standard shape file but often these will be in vendor specific proprietary file formats that will have to use special API's to parse out the data within them.  My question is whether it would likely be a better practice to handle the data conversion on the server side vs. attempting to do it on the client side?


texts: Converting output of crosstab() in R to raster; from classified raster images to show overall land cover change in different classes?

texts:
I have two classified landsat images from 2014 and 2018 both of them containing 6 classes including urban,forest,barren etc. In order to see how each pixel's class changed or remained same from earlier image i computed cross table taking both images like this :

contingencyTable <- raster::crosstab(landscape_2014, landscape_2018, long = TRUE)

This gave me the number of pixels in both images for each class but this has no latitude or longitude so this is where my question arises.
How can i convert this dataframe/table into a raster so that i am able to visualize that a specific area changed from forest to urban and so on?

I know how to convert dataframe to a raster using rasterFromXYZ(df) but that requires lat,long which is not there in the table.
The table looks something like this:

crosstab(r1,r2)
[r1]  [r2]  Count
0     0     3456
1     41    23456
0     41    768
1     42    21
0     42    6

I am following Creating Land Cover Change Classification in R? for detecting land cover change

** R Code **

library(raster)
f2014<- raster("landsat_2014.tif")
f2018<- raster("landsat_2018.tif")
output <- overlay(f2014,
                      f2018,
                      fun=function(r1, r2){return(r1-r2)})
plot(output)


texts: Ignoring ellipsoidal heights recorded from GPS when only interested in location?

texts:
I am not interested in converting ellipsoidal height into AHD heights, because I have a good DEM. However, this whole business about geocentric vs geodesic coordinate systems is thoroughly confusing me.

My points are recorded in WGS84, and included xyz information (latitude, longitude and ellipsoidal height). I am wondering whether there is some pre-processing I need to do to convert this xyz data into just xy, or whether just extracting xy information (latitude and longitude) will give me the accurate position for the GPS point recorded.

I am sorry if this question is v basic, but after having tried to research this myself, I have only become more confused.

Perhaps I can narrow it down further - I think the key is to reproject from ESPG:4978 to ESPG:4326 (the 3D and 2D forms of WGS84). Basically what I want is to use the xyz coordinate information to return accurate xy coordinates.

Is this necessary (I have a feeling it is) and if so, any tips for how one goes about this?


texts: Decimal places after converting from point to raster ArcMap

texts:
When using "Point to Raster"-Tool in ArcMap I noticed that my point with the elevation of e.g. 128.436m will be converted to a cell with a value of 128.435997.

Is it only a display problem with the identify-tool or was my point be actually edited?


texts: Any solution to mosaic Modis MOD13Q1 using batch file?

texts:
I have a Modis MOD13Q1 product for Pakistan, four tiles cover my complete area and I have data consisting of 14 years, after every 16-day interval.

I want to mosaic them using a batch file which will be most useful rather than manually processing one by one using MRT tool.

Kindly let me know some useful methods of mosaicing which automates my whole data by running just one script for the whole data or one script for one-year data.

I am new with programming so will be thankful if someone can provide some documents depicting how to run the script.


texts:
The following snippet works perfectly when appending one FC to another, with a slight schema difference (1 field):

target_layer = "blah blah blah.sde/yada.DBO.yada_yada"
append_layer = renamefgdb+'\some_fc'
fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(target_layer)
fieldmappings.addTable(append_layer)
field_to_map_index = fieldmappings.findFieldMapIndex("globalid")
field_to_map = fieldmappings.getFieldMap(field_to_map_index)
field_to_map.addInputField(append_layer, "PIC_ID")
fieldmappings.replaceFieldMap(field_to_map_index, field_to_map)
arcpy.Append_management(append_layer, target_layer, "NO_TEST", fieldmappings, "")

But I need for the objectid in the append layer to also migrate to the target layer, unchanged. Not sure if this is possible?

When I try

target_layer = "C:/blah blah blah.sde/blah.DBO.blah"
append_layer = renamefgdb+'\yada_yada_yada'
fieldmappings = arcpy.FieldMappings()

fieldmappings.addTable(target_layer)
fieldmappings.addTable(append_layer)
list_of_fields_we_will_map = []
list_of_fields_we_will_map.append(('PIC_ID', 'globalid'))
list_of_fields_we_will_map.append(('objectid', 'objectid'))
for field_map in list_of_fields_we_will_map:
field_to_map_index = fieldmappings.findFieldMapIndex(field_map[0])
field_to_map = fieldmappings.getFieldMap(field_to_map_index)
field_to_map.addInputField(append_layer, field_map[1])
fieldmappings.replaceFieldMap(field_to_map_index, field_to_map)

arcpy.Append_management(append_layer, target_layer, "NO_TEST", fieldmappings, "")

it fails with

Traceback (most recent call last):
 File "C:/ARCHIVE_AA_S123_TEST.py", line 67, in <module>
 field_to_map = fieldmappings.getFieldMap(field_to_map_index)
 File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\arcobjects\arcobjects.py", line 328, in getFieldMap
 return convertArcObjectToPythonObject(self._arc_object.GetFieldMap(*gp_fixargs(args)))
RuntimeError: FieldMappings: Error in getting field map from field mapping for GetFieldMap

and this fails with the same error:

target_layer = "C:/blah blah blah.sde/blah.DBO.blah"
append_layer = renamefgdb+'\yada_yada_yada'
fieldmappings.addTable(target_layer)
fieldmappings.addTable(append_layer)
field_to_map_index = fieldmappings.findFieldMapIndex("globalid")
field_to_map_index_2 = fieldmappings.findFieldMapIndex("objectid")
field_to_map = fieldmappings.getFieldMap(field_to_map_index)
field_to_map_2 = fieldmappings.getFieldMap(field_to_map_index_2)
field_to_map.addInputField(append_layer, "PIC_ID")
field_to_map_2.addInputField(append_layer, "objectid")
arcpy.Append_management(append_layer, target_layer, "NO_TEST", fieldmappings, "")

Is this not working because it's simply not possible to append the objectid? Unfortunately, this project requires that the objectid be maintained when moving the data.


texts: How can I clip all the images in a collection of MODIS NDVI in Google Earth Engine and export them separately?

texts:
I want to clip all the images in a collection separately and export them. I am new to scripting.

//Map.addLayer(table, {color: 'FF0000'} , 'geometry');

var NDVICollection=ee.ImageCollection('MODIS/006/MOD13Q1')
                         .filterDate('2000-01-01','2000-12-31')
                         .filterBounds(table).select('NDVI');

var list = NDVICollection.toList(3);
    for (var i=1;i<4;i++){
         var nam=ee.String('NDVI_img')
                    .cat(ee.String(ee.Number(i)))
                    .getInfo();
var NDVIClipped = NDVICollection.clip(table);

var reprojected = NDVIClipped
    .unitScale(-2000, 10000)
    .reproject('EPSG:4326', null, 500);
//Map.addLayer(reprojected, {min: 0.0, max: 1}, 'Reprojected');
     //print(nam);
     Export.image.toDrive({
           image: reprojected,
           description:nam,
           scale: 250,
           maxPixels:1e13
     });
}

I'm getting the error message:

  NDVICollection.clip() is not a function.


texts:
We have an issue where someone mistakenly uploaded Colorado State Plane (feet)coordinates into a Garmin eTrex 10 with the correct datum but position format degrees, minutes, seconds, instead of first converting to a format that Garmins can read.

How do I reconstruct which coordinates she actually visited in the field?

The points were a ballpark of about 150 m too far south from desired location, not the whopping 60 degrees off that you would expect it to be off if it read them as lat/long?  As an example, the uploaded file had point X as 478739, 448129 in state plane feet, vs. the GPS displays its coordinates as 105°15'05.0", 40°29'02.1"N.  I hope someone has some insight on how to figure out the actual coordinates for the waypoints the GPS actually took her to.


texts: Exporting more than 1 layer to GDB file type

texts:
Is there any way in QGIS to export more than 1 file layer/type to GDB?

The only way I can see is to right-click the particular layer and save as GDB file type, but that only allow individual layers to be exported instead of multiple layers in 1 single GDB file.

The only way I know is to install a spatial database and export it from that, but that isn't an option in my case.


texts: Disappearing polygons when zooming in QGIS 3.0

texts: I am using QGIS 3.0 and loaded a polygon layer from a shapefile containing more than 300,000 polygons. When zooming in some polygons are not drawn (not the entire layer).


texts: QGIS: No values in field after creating spatial index

texts:
I want to join a vectorlayer with a grid using the algorithm "join attributes by location (summary)". It took hours to execute, but it worked. Then I found This thread which told me I have to create a spatial index for the layer first.
So I did that for the vector layer, but after executing the algorithm "join attributes by location (summary)" again, all values in the desired field were zero? It took only 2 seconds to execute, but there were no values? What could be the reason for that?
Update:
I thought I found what was the issue: To speed up the process, I deleted all fields except my value field. There must be an ID-Field which acts as the spatial index though, so my fault was to delete this one as well. So I did it again, leaving this field there, and it worked! But it only worked once, all tries after that executed right away, but once again, I got no values, just zeros...


texts: How to create a polygon feature class from polylines in Python ArcGIS?

texts:
I am trying to create a polygon from polylines.  I've created this script but it gives errors of Arrays.

import arcpy
polyline=r'C:\temp\temp_lines.shp'
Output_polygon=r'C:\temp\temp_polygon.shp'
polygonArray = arcpy.Array()
polygonArray.add(polyline)
cursor = arcpy.InsertCursor(Output_polygon)
row = cursor.newRow()
polygon = arcpy.Polygon(polygonArray, "")
row.SHAPE = polygon
cursor.insertRow(row)
del row
del cursor


texts: How add vector style rule filter with different value in table

texts:
I have a simple wfs layer from geoserver, here is code:

  //wfs-t editable overlay
  var wfs_layer = new OpenLayers.Layer.Vector("Vector sample", {
  strategies: [new OpenLayers.Strategy.Fixed()],
  //projection: new OpenLayers.Projection("EPSG:4326"),
  protocol: new OpenLayers.Protocol.WFS({
  version: "1.1.0",
  // loading data through localhost url path
  url: ".....",
  featureNS :  ".....",
  extractAttributes: true,
  // layer name
  featureType: "....",
  geometryName: "geom",
  schema: "localhost:8080/geoserver......"
  })
  });

 //vector style:
var vector_style = new OpenLayers.Style({
'fillColor': '#669933',
'fillOpacity': .8,
'strokeColor': '#aaee77',
'strokeWidth': 3,
'pointRadius': 8
});

var vector_style_select = new OpenLayers.Style({
'fillColor': '#FF0000',
'fillOpacity': .10,
'graphicName': 'circle',
//'label': 'klik',
'pointRadius': 8,
'strokeColor': '#f86633',
'strokeDashstyle': 'solid',
'strokeWidth': 4
});

var vector_style_iz_table = new OpenLayers.Style({
'cursor': 'pointer',
'fillColor': '#669933',
'fillOpacity': .8,
'fontColor': '#343434',
'label': '${table1}',
'pointRadius': '8',
'strokeColor': '#aaee77',
'strokeWidth': 3,
'strokeDashstyle': 'solid',
'strokeWidth': '${4}'
});
var vector_style_map = new OpenLayers.StyleMap({
'default': vector_style_iz_table,
'select': vector_style_select
});
wfs_layer.styleMap = vector_style_map;

I have table from "table1" database, where is three different value: "yes", "no" and "null".

Everything works fine, in this style I can view vector layer with green fillcolor with label "yes" or "no" from my "table1".

I want 3 different style, for "yes"-> green fillcolor, for "no"-> red fillcolor and "null"-> black fillcolor.

Is that posible having 3 styles for one vector layer? I think that I must write rule filter for all three different value?

Thanks!


texts: Identify Census blocks inside urban areas (using pyshp or similar)

texts:
I am trying to find the Census blocks that are inside specific urban areas or urban clusters.

The Census Bureau provides a list of urban areas/urban clusters with the following information:

|  Column Name  |                         Column Description                        |
| ------------- | ----------------------------------------------------------------- |
| UACE          | Five digit code that uniquely identifies 2010 urban area entities |
| NAME          | 2010 urban area name                                              |
| POP           | 2010 population of the urban area                                 |
| HU            | 2010 housing unit count for the urban area                        |
| AREALAND      | Land area for the urban area in square meters                     |
| AREALANDSQMI  | Land area for the record converted to square miles                |
| AREAWATER     | Water area for the record in square meters                        |
| AREAWATERSQMI | Water area for the record converted to square miles               |
| POPDEN        | Population density                                                |
| LSADC         | Legal/Statistical area description code for                       |
|               | the urban area (75 for urbanized area, 76 for urban cluster)      |

The first urban area in this file is Abbeville, LA (UACE=00037). As an example, I would like to find all the Census Blocks that are in this urban area.

As far as I can tell, there is not an API or other method for getting a list of Census Blocks from a specified urban area, so I am trying to find alternatives.

I am an experienced programmer but have no GIS experience. Theoretically, it seems like it should be possible to take the shapefile for urban areas and the shapefile for Census Blocks in Vermilion Parish (where Abbeville is located), overlay the two, and find all the Census Blocks that are covered by the Abbeville urban area polygon.

I need to do this a number of times so I was hoping to do this programmatically with pyshp or similar. But I am open to any solution that I can automate and isn't buying ArcGIS.


texts: would you be able to point me in the direction of finding a copy of the sample data that comes on the CD's for learning MapInfo Professional 11.5?


texts: Centroid value extraction of Landsat image collection in Google Earth Engine

texts:
I have an NDVI collection wich I have created from the combination of different collections Landsat5 and 7.

How can I exctract the NDVI values of the centroids of each pixel, of each image from my collection and store
them in a csv file, with their coordinates?

Example code:

var lst5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
    .filterDate('1984-10-01', '2011-10-01')
    .map(maskL57SR)
var lst7 = ee.ImageCollection('LANDSAT/LE07/C01/T1_SR')
    .filterDate('2011-10-01', '2013-04-07')
    .map(maskL57SR)
var all = ee.ImageCollection(lst5.merge(lst7));

var addNDVI = function(image) {
  var ndvi = image.normalizedDifference(['NIR', 'RED']).rename('NDVI');
  return image.addBands(ndvi);
};

all = all.map(addNDVI)


texts:
We have two feature layers:

layer A - drainage segment layer (along road outline)
layer B - road centre line layer.

In my SQL Server database I have a table storing the mapping information of segment ID (from layer A) and Road name (from layer B).

The problem is that when I create a new polyline feature (a segment) in layer A, I need to update the database table also. I am stuck here.

I do not know how to update the database table at the same time as when a user creates a new feature in layer A.

Should I create a new geoprocess (using python script) to do so?

Is there any other solution for it?

I am using vb.net arcmap addin (vs 2012), arcmap 10.2 and sql server 2008 r2.


texts:
I'm a new GeoNetwork user and having a hard time to understand how to solve metadata validation errors.

I need to start with a very basic question. GeoNetwork validation runs a Schema Validation (XSD validation) and a Schematron validation for ISO 19115(19139). Both return errors, but the XSD Validation in much higher numbers.

Having some XSD validation errors but no errors for Schematron validation for ISO 19115(19139) means the metadata conforms to ISO standard.

What is exactly happening?


texts: How do you produce a output table containing distances between mineral grains at various azimuthal directions?

texts:
I am using ArcGIS 10, the newest version and I am a senior at Western Carolina University and working on my senior thesis and the data set in which I have are images of mineral thin sections all separated into different groups of grains, magnetite, quartz, etc.. either being a vector layer or a raster layer.  I am wanting to calculate the distance between each grain or the grain spacing, boundary to boundary, NOT center to center and also have those distances given every 10 degrees on a 0 to 360 degree directional scale.  Is there any code out there that does this very exact method?  Or is there another program, R or Fragstats, that would do a better job, ArcGIS 10 preferably.

An example of the grains is shown here:

Thanks,

-Michael Stillwagon


texts: iframe map adjusts to cartodb zoom/centering

texts:
I noticed recently that my published iframe map adjusts to whatever the zoom and centering is for that map on the cartodb site.  So if I'm playing around with the cartodb map on cartodb, say exploring particular regions of the map, this will have a direct impact on what my website users see in the embedded map.

Is there a way to avoid this?  I don't see any parameters for setting center or zoom in the iframe code:

<iframe width='100%' height='520' frameborder='0' src='http://sanjuro.cartodb.com/viz/10f021cc-b7a5-11e4-a4dd-0e853d047bba/embed_map' allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen></iframe>


texts: Finding polygon by certain points in QGIS?

texts:
I am using QGIS 2.8.6 in Windows and I need to find polygon by certain points.

In the picture are red polygons and blue points. Some polygons have points but some don't.

How do I quickly find the polygons with points?


texts: How can I add custom imagery to a mapbox project?

texts:
I have a file that was output from Pix4D as an mbtile, along with the actual image files in the google earth tiles folder, I want to use them as the base map in a mapbox project but wondering how I accomplish this?

It seems confusing if I am supposed to do something with them in Tilemill, or if I just upload .tif files to the mapbox project, or something else.

Anyone have a simple walk through of how to accomplish adding your own imagery to the mapbox base map?


texts: Why automatic filter in attribute table in QGIS?

texts:
I have an ESRI shapefile with 1.7 million records. When loaded in QGIS the attribute table is automatically filtered; I only see 725256 records and the filter says "filtered: 725256"? Why? I tried restarting QGIS, reloading the dataset (and another similar dataset in which the same thing happens but with a different number of records filtered) I haven't successfully been able to remove this filter yet. I really need access to all features.

I'm running QGIS with GRASS 2.18.13 on Ubuntu 16.04 LTS.

Please help!


texts:
I'd like to form a 500 meter buffer around a coordinate. That coordinate is in WGS 84.

I've been playing with this for a little and seem to have a solution, but is seems way too complicated:

SELECT ST_AsText(ST_Transform(ST_Buffer((ST_Transform(ST_GeomFromText('POINT(-71.104 42.315)', 4326), 3857)), 500), 4326))

In this solution I first transform the point to a metric coordinates system (EPSG:3857) so the buffer distance is metric. Then I generate the buffer and then I transform the buffer back into WGS, as I need the result in WGS.

Isn't there a simpler solution?


texts:
My QGIS3 raster menu seems to be incomplete:

Analysys, projections, extraction, and all other items are not present, only calculator, align and georeferencer are...
I'm on OSX 10.11.6. Reinstalling or new profile does not work.

Well, I don't know why but there are two raster menus in my QGIS3 installation.

In this second menu item all things seems to be on position. Any idea why this behavior occurs? Any way to join both menus?


texts: Configurable Map Viewer (CMV) - select by drawing polygon around points, then average the values of the points

texts:
I have seen this question and have tried the code suggested:
Adapting ESRI ArcGIS API for JavaScript Feature Layer With Selection sample for use in Configurable Map Viewer (CMV)

But I have been unable to get it to work. I also want to change the result from the sum to the average.

Here is my error report from chrome development tools


texts:
Got asked that today in a job interview, I replied with the usual :

Gather Data : what data do we want, do we possess it ? If not how to do we acquire it, etc.
Database : after we have successfully accomplished the first step, we want new data to be implemented in a DB, that'll allow an easier, faster access to data let alone making it questionable and queryable.
Design the software : what traitement do we want, what functional needs do we want to answer, what processes should our GIS use in addressing those issues ? (Business Layer design)
Development : code it.

I have dropped the modeling of the spatial phenomena, which is not always necessary.

What other steps have I missed ? What are some details I should know ? I am a fresh engineer, having zero experience yet, so I am hoping for experienced people to make me gain some time and point me to some good reads. As you can notice, most of what I cited is coming from an almost purely software development perspective, I feel like I am missing the GIS part in it.

Regards.


texts: Enabling Time on raster layers in ArcGIS Pro

texts:
I have several raster layers (all tiffs) in ArcGIS Pro and I would like to enable Time on each layer. This was straightforward in all versions of ArcMap 10 but not so here it would seem.

As instructed by this article on ArcGIS Onine, I right clicked the layer and clicked on  Properties, however Time wasn't in the list of properties (it is in both the article and in Youtube videos I've looked at).

How do I configure Layer Properties so that I can enable Time on my layers?


texts: AssertionError: Invalid MXD filename from arcpy.mapping.MapDocument()?

texts:
I'm trying to write a script that allows me to list the layers of each map document in a folder. However I keep getting this error after it displays the layers in the first map document:

  Traceback (most recent call last):   File
  "C:\Python27\ArcGIS10.1\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
  line 326, in RunScript
      exec codeObject in main.dict   File "C:\Users\Daimon Nurse\Desktop\DFMPROJECT\Scripts\editmapdocument8.py", line 10, in

      mxd = arcpy.mapping.MapDocument(file)   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 608,
  in init
      assert (os.path.isfile(mxd) or (mxd.lower() == "current")), gp.getIDMessage(89004, "Invalid MXD filename") AssertionError: Invalid
  MXD filename.

This is the code I have tried:

import arcpy
import os

PATH2 = r"C:\Users\Daimon Nurse\Desktop\DFMPROJECT"
arcpy.env.workspace = PATH2
arcpy.env.overwriteOutput=True

for file in arcpy.ListFiles("*.mxd"):
    mxd = arcpy.mapping.MapDocument(file)
    lyr = arcpy.mapping.ListLayers(mxd)
    print lyr

It worked for only the first iteration. Why?


texts: gdal_translate: unknown displacement after transformation

texts:
I am new to GDAL and after a lot of research I cannot find a solution to my problem.
I want to extract a Scientific DataSet (SDS) from an HDF file, but when I do this with gdal_translate there is a small displacement of the netCDF data compared to the original HDF data. Can someone explain to me why this happens and how to solve it?
I am using Panoply to view the data.
Original file: MCD18A1.A2020153.h17v05.006.2020201050502.hdf
Panoply view of the original file:
I removed the SDS from the original HDF file to a netCDF using the following command:
gdal_translate -of netCDF -co "FORMAT=NC4" HDF4_EOS:EOS_GRID:"MCD18A1.A2020153.h17v05.006.2020201050502.hdf":MODISRAD:GMT_1200_DSR OUTPUT.nc

Panoply view (It can be seen that the raster has shifted slightly):

Using -a_ullr <ulx> <uly> <lrx> <lry> I verified that the displacement is ~2000, but why this value?


texts: How to apply functions iteratively to SpatialLines in R?

texts:
Looking for a way to apply the 'rgeos::gIntersection' and 'rgeos::gDifference' function iteratively to SpatialLines, I created 3 SpatialLines as an example:

#from the sp vignette:
l1 = cbind(c(1,2,3,4),c(3,2,2,4))
rownames(l1) = letters[1:4]
l2 = cbind(c(2,2,3,3),c(3,2,2,5))
rownames(l2) = letters[1:4]
l3 = cbind(c(1,2,3,4),c(1,2,2,1))
rownames(l3) = letters[1:4]
Sl1 = Line(l1)
Sl2 = Line(l2)
Sl3 = Line(l3)
Ll1 = Lines(list(Sl1), ID="a")
Ll2 = Lines(list(Sl2), ID="b")
Ll3 = Lines(list(Sl3), ID="c")
Sl = SpatialLines(list(Ll1,Ll2,Ll3))
summary(Sl)
plot(Sl, col = c("green", "grey", "brown"), lwd=c(10,8,6))

How can I do the following lines iteratively (e.g. in a loop)?

#Intersection of lines
I12<-gIntersection(Sl[1],Sl[2])
I13<-gIntersection(Sl[1],Sl[3])
I23<-gIntersection(Sl[2],Sl[3])
#plot
lines(I12, lwd=5, col="red")
lines(I13, lwd=3, col="blue")
lines(I23, lwd=1, col="yellow")

#Difference of lines
D12<-gDifference(Sl[1],Sl[2])
D21<-gDifference(Sl[2],Sl[1])
D31<-gDifference(Sl[1],Sl[3])
D31<-gDifference(Sl[3],Sl[1])
D23<-gDifference(Sl[2],Sl[3])
D32<-gDifference(Sl[3],Sl[2])
#plot
lines(D12, lwd=5, col="red")
lines(D13,lwd=3,  col="blue")
lines(D23, lwd=1, col="yellow")


texts:
I wanted to open an ESRI personal database (.mdb format) into 64-bit QGIS 2.18.14 on a 64-bit Windows 7 laptop with 64-bit MS Office 2010 installed. On my all 32- bit desktop, all I have to do is drag and drop the file into the QGIS browser window to add it to my project. Not so on the 64-bit system, where I get a "Layer is not valid" error.

I followed the directions at Opening Esri Personal Geodatabase (*.mdb) using QGIS?, installing the Access Database Engine and adding the lines from Step 2 into qgis.bat, but when I try to drag and drop the database into the project, I get the same "Layer is not valid" error.

I can add the database following the multi-step procedure outlined in http://www.northrivergeographic.com/qgis-accessing-personal-geodatabase, but this is a lot of work compared to simply dragging and dropping the database.

Is there something else I need to do to be able to drag and drop ESRI Personal Databases into 64-bit QGIS?


texts: How to retrieve the number of unassigned orders in ArcPy?

texts:
I'm using ArcPy for a vehicle routing problem in ArcGIS Desktop. I'm using the Network Analyst tool to find the minimum number of routes needed to service all orders given some constraints. I can create and solve the routing problem in AcrPy, but I can't figure out how to return the number of unassigned orders.

Some things I've tried:

temp = arcpy.na.Solve("Vehicle Routing Problem")
solution = temp.getOutput(0)

###Now check what it can do###
dir(solution)

'Solution' is a group layer. I had expected to see information about the routes, orders, etc. - but couldn't find any of it.

Then I thought that the information could be present in a different layer, so I checked a list of layers, but didn't find anything interesting:

document = arcpy.mapping.MapDocument("CURRENT")
arcpy.mapping.ListLayers(document)

This matched by Table of Contents, but not the contents of the Network Analyst window (which is what I really wanted).

Eventually I gave up op on the idea that the information I wanted was attached to a layer. I found this article on the ESRI website which references an "UnassignedOrders" table, but I have no idea how to access that.


texts: How to get all the sub-rectangles (subgeohashes) of a given geohash

texts:
I am trying to use geohash to generate a grid of rectangles to cover an area. But I am not very familiar with the coding system of geohash. My question is:

If I have a specific geohash gh of 3 characters, how do I get a list of all 4,5,6-character geohashes that are contained in the ST_GeomFromGeohash of the original geohash gh?

I am using PostGIS (2.5, 3.0alpha; PostgreSQL 11), and can manage the basics of getting the geometries of a geohash etc. I am just not sure how to get all the "sub-geohashes", e.g. by string operations. If there is a built-in function in PostGIS/PostgreSQL, it is even better.

Related:

What is the precision of a Geohash


texts: ArcGIS Online Web App generates "no results..." error when clicking results?

texts:
I added a Search Widget in an AGOL Web Map App. The data source is a feature layer (points) contained in a map service in the associated Web Map.  I am searching on a text field containing the names of individuals located in a cemetery (e.g. Zeublon Vance).  When I enter the name and select a name from the dropdown list AGOL returns an error message "No Results Found...".

However, when I hit enter, it zooms to the first result from the dropdown.

I found a couple of threads on the topic but haven't found where where the problem has been solved.

Is this still a known issue?

https://community.esri.com/thread/192585-agol-application-search-widget-generates-no-results-message


texts: Image Classification toolbar disabled in ArcMap 10.1

texts:
I'm trying to select an image from Image Classification toolbar but the dropdown arrow box is disabled. The 'Classification' dropdown box and all of its contents are also disabled.

Any help would be great thanks


texts: Look for all `highway` type `way` in certain area, using the overpass-api directly (not overpass turbo) or osmosis

texts:
I need all highway type way in certain area, I found this query the result I want, but using overpass-turbo (I would like to use only overpass-api or even better only osmosis):
<osm-script output="json">
  <id-query {{nominatimArea:Temperley,Partido de Lomas de zamora,Buenos Aires,Argentina}} into="area"/>
    <query type="way">
      <has-kv k="highway"/>
      <area-query from="area"/>
    </query>
  <print mode="body"/>
  <recurse type="down"/>
  <print mode="skeleton" order="quadtile"/>
</osm-script>

I need to perform this task from a backend hundreds of times using differents areas. So I think I should use overpass-api directly (not using the overpass-turbo frontend), doing a POST request here http://overpass-api.de/api/interpreter .
The issue is that above query fails using overpass-api, I think because of {{nominatimArea}}. When I inspect the POST made for overpass-turbo, I found that the real query to overpass-api is:
<osm-script output="json">
<id-query type="area" ref="3602537337" into="area"/>
        <query type="way">
          <has-kv k="highway"/>
          <area-query from="area"/>
        </query>
      <print mode="body"/>
      <recurse type="down"/>
      <print mode="skeleton" order="quadtile"/>
    </osm-script>

When I run that query in overpass-api directly, I get the desired result.
As you can see, the difference is that {{nominatimArea}} is replaced by type="area" ref="3602537337".
So, Is there a way to know that ref="3602537337" associated to a {{nominatimArea}}?
I have Nominatim installed locally, so I have the relation id too, Is there a way to use that id or maybe something else?
Do I need another approach to this issue?
PD: Perfect scenario for me would be to use osmosis directly but I can't understand documentation ;(  I have all the polygons I need, all names and relations ids too.


texts:
I'm taking the first steps in QGIS (version 2.2 Valmiera) and I am having some difficulties in knowing what mathematical criterion that QGIS uses when converting polygons (shapefile) to raster. I'm using a resolution of 100 by 100 pixels.

Commands: Raster - Conversion

What is the percentage that the program uses?When I overlap the shapefile and raster that the information is not 100% coincidental. I understand that the information is not completely coincident, because the raster consists in squares (pixels).

As I understand the raster is a binary system 0 (absence) and 1 (presence of what is to be studied). This "1" corresponds to a square (pixel). what is your percentage?
What is the mathematical mechanism? I'm losing information?

In Figure 4 you can see how the overlap is not complete (marked with circles). What I would like to know which algorithm that QGIS uses the rasterization? What is your standard? Is there a percentage to exclude certain information? I understand that in geometric terms the result of a shapefile is not the same as a raster. For the program to do the rasterization process will have to be a mathematical foundation?


texts: Patents in GeoSpatial software: impact on practices?

texts:
I've seen on twitter a tweet saying:

  Palantir has done well turning chapters of intro computational
  geometry, GIS, and ontology textbooks into patents:

Looking into the results, my main concern is about the patent concerning "Simplifying a polygon" (I use polygon simplification with the MapShaper tool or the Douglas Peucker algorithm in PostGIS or GDAL ...)
Do you know the impact of this patent in particular? I have to stop using polygon simplification?


texts: OpenLayers - avoid Parameter 'width' contains unacceptable value error

texts:
I am using ol.source.ImageWMS to insert layers into a web map from this WMS.

However, I am receiving Parameter 'width' contains unacceptable value error error if my screen + resolution is too high due to the WMS MaxWidth parameter being 2048. If I decrese the size of my window then the GetMap request is fine because the width value is lower than the limit.

Is there a way to make it work regardless of this limitation?

I don't have access to the WMS server, so changing the MaxWidth is not feasible.


texts: ArcObjects .NET: Get more info out of COM Exceptions - how to get description info from ErrorCode?

texts: Ok, I can trap the COM exception and convert the ErrorCode to the proper enum, (e.g. esriGeometryError.E_GEOMETRY_WRONGTYPE).  But is there a way to get the error description from the enum?  For example, when I mouse over esriGeometryError.E_GEOMETRY_WRONGTYPE in Visual Studio I get a popup that says "The geometry parameter was of the wrong type for the method."  It would be great to retrieve that information programatticaly once the exception is trapped.  Any help greatly appreciated!


texts: Rendering only a specific fraction of raster values

texts: I have a raster where each pixel has a continuous value 0-1. I would like to indicate which 25%  (for example) of the area corresponding to the raster contains the highest values i.e. indicate where the top 25% of values are located. Is it possible to do this somehow simply in Layer Properties using QGIS?


texts: Large Open Street Map OSM file to Shapefile. Is there any hope for 32-bit FME?

texts:
I have a large OSM XML file (around 8 GB) that I was hoping to process in FME. I have a workbench that I previously used to process smaller files (500 MB) into feature type-specific Shapefiles (e.g. waterway_line, waterway_polygon etc.).

In this workbench I simply added the OSM reader, left everything as default, and FME helpfully grouped the features into useful categories - sending each to the appropriate Shapefile.

Unfortunately my 32-bit OS cannot manage the larger file. Because the entire XML file has to be read at the start of the transformation the memory just builds and builds until the process limit is reached before FME has even read all the incoming features.

One of the things FME does by default is build polygons from lines (raw OSM data doesn't recognise polygons), so if I break the area up into smaller files I could end up with polygons that are artificially split (e.g. landuse areas) and end up being labelled twice and having spurious borders through the middle.

One option is to load my OSM file into PostGIS, and FME can read data from PostGIS (I'm assuming this will help overcome the memory limit as the database can be read row-by-row) but then FMW won't know to group features into those useful categories and which Shapefiles they should end up in.

Essentially, it looks like I simply can't use FME to process a big OSM file to Shapefiles. What I really want to know is:

Is there any way I can convince FME to do what I want?
Are there other tools that can create similar convenient Shapefile groupings of feature types?
EDIT How do Cloudmade and GeoFabrik create their huge Shapefiles? Are they using a different tool I don't know about?

Any input much appreciated.

(note: I don't have access to a 64-bit FME machine, and the pre-processed Shapefiles from Cloudmade / GeoFabrik are insufficient for my requirements)


texts:
I have a Geoserver with a layer in a EPSG:32632 projection. I want to display this layer over Open Street Map tiles.

When I use the following html code:

<!DOCTYPE html>

    <meta charset="utf-8">

The OSM tiles are correctly displayed but the other layer does not appear on the map. I guess it is a projection problem, since the OSM tiles are in EPSG:900913, but isn't Geoserver supposed to feed me a reprojected map directly? With Firebug, I can see that the request has correctly been treated, but return blank 256x256 tiles. The request is also made for a SRC EPSG:900913, so the problem must be server-side.

What am I missing? The layer is feeded to Geoserver via PostGIS (in the OpenGeo framework). Am I supposed to put some specific settings client-side?

As a consistency check, I also used the Geoserver "preview layer" tool with OpenLayers, to see if the layer is correctly dispayed, and it is. However, if I declare a SRS 900913 in addition to the native 32632, I also get blank tiles in the tool. So I guess the answer is probably related to Geoserver and not OpenLayers. I really don't understand what I'm missing... Any help would be most welcome!


texts: Is there a function like XY-to-Line that calculates distance along a network for many XY pairs?

texts:
So:
I have a set of XY origins and a set of destinations. I know that XY to Line will give me the Euclidian distance between a given set of origins and destinations, and that an ODS cost matrix can return the distance to a given set of destinations for a given set of origins along a network. Unfortunately, an ODS cost matrix seems like a bad decision given the size of the data set I'm working with. So, I'm looking for a function that is exactly like XY to Line, but that will give me distance along a network between many sets of two points, instead of outputting Euclidian distance.

Any ideas?

PS
Why does the size of my file factor into this? It seems to me that: I am calculating the distance between (households of people on food stamps) to (retailers that accept food stamps). If I calculated the distance between every food stamp recipient in our sample (~55,000) to every retailer in our sample (700) for every month that we are concerned with (17), the calculations start to add up (~655 million). But if I only calculate the distance between the recipients (55,000) and the stores they actually shop at (about 5 per household), it gets a lot more managable, processing time-wise (~4.7 million).


texts: Removing a specific band from an image composite with hundreds of bands in Google Earth Engine

texts:
In Google Earth Engine, the function glcmTexture() outputs 18 types of texture bands. Out of these, one band (suffixed as _maxcorr) is actually not computed by the servers but still exists in the output as a GLCM band with all zero pixel values.

This _maxcorr band creates a problem when band-wise normalization of the image composite is attempted by the unitScale() function as this function requires min value to be less than the max value.

How to tackle this issue?

I thought of two possibilities:

Prevent glcmTexture() from generating the "_maxcorr" band
OR
Remove "_maxcorr" band before input to unitScale() function

How to remove a specific band from an image in GEE?
Trying reverse by using .select() function is not feasible as there are hundreds of other bands in the composite that need to be selected.


texts: Calculate distance and surface with mapbox api

texts:
Is there a way to draw lines and polygons (with geojson) and calculate distance and polygon surface with the mapbox api or leaflet?
I wish to have the same tools as in geojson.io with the extra ability to calculate line length and polygon surface.
For lines I will use the Leaflet method distanceTo but for the polygon surface I have no clue.


texts: polygon to raster - not all polygons rasterized

texts:
I have a building footprint shapefile (polygons) that I want to convert to a raster. I use the Polygon to Raster tool, and specify a cell size by importing from another raster (which is 24m x 30m). The results appear to show that only a couple of the polygons have been rasterized. Why is it that some polygons are and some aren't?

I've attached a picture below showing my results. Pink = building footprint; red = raster pixels after using tool Polygon to Raster. I would like to have a raster file that covers ALL of the building footprints (pink).


texts: Merging two different accurate polygon layers

texts:
I'd like to combine two layers of different administrative areas. One layer is more accurate (layer A) than the other one (layer B) in terms of generalization. So is there a prepared QGIS-tool to do this?

It is essential that layer A is preserved in its shape. Due to the different degree of generalization the poylgons' boundarys will differ as you can see in the picture.

My first attempt was to substract layer A from B. By that it is ensured that at least the shape from the features of A are preservingly included. But close to the meeting edges from those two layers there happen to be fragments of the replaced features. I'd like those fragments not to be merged with the replaced ones, but merged with features they didn't originally belong to.
So as you can see, my approach is probably not the best.

I hope you understood what I wrote, because I'm not really familiar with GIS (and English).
Thank you


texts:
here is my jsfiddle link http://jsfiddle.net/tridip/5abu963o/. i made provision so a yellow color text should be lying on map but not working.

here is the js part only i like to highlight.

$( document ).ready(function() {

  var map = L.map('map').setView([49.2, 16.5], 10);
  new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);

  L.marker(new L.LatLng(49.2, 16.5), {icon:createLabelIcon("textLabelclass","a place")}).addTo(map);
  L.marker(new L.LatLng(49.25, 16.4), {icon:createLabelIcon("textLabelclass","another place")}).addTo(map);
  L.marker(new L.LatLng(49.15, 16.37), {icon:createLabelIcon("textLabelclass","place 3")}).addTo(map);
  L.marker(new L.LatLng(49.21, 16.38), {icon:createLabelIcon("textLabelclass","place 4")}).addTo(map);

})

var createLabelIcon = function(labelClass,labelText){
  return L.divIcon({
    className: labelClass,
    html: labelText
  })
}


texts:
I would like to be able to compare features in Layer 1 (source) to features in Layer 2 (updates to source) in order to see if any of the features geometry and/or attributes have changed.  I would also then like have a "report" generated stating what has changed.

Edit for Clarification: Changes in geometry also include finding features that have been added to the new data layer.  Deletions might be interesting to have, but additions are more important.

I've been looking through the PostGIS functions and can't seem to find any tools that are designed to compare and report differences between 2 layers features, both geometry and attributes.

I am looking for something similar to the ArcGIS "Feature Compare" tool.

If there is nothing like this in PostGIS, are there other open-source tools that will answer these types of questions?  Thanks.


texts: How to get the area of the pixels of a raster in Africa Lambert Conformal Conic CRS in R

texts: My question has been previously asked here (R How to multiply the values of the raster pixels with the true surfaces of these pixels?), I have to multiply the precipitation value of each cell by the area corresponding to each of these pixels under R. Except that I am working with the EPSG: 102024, Africa-Lambert-Conformal-Conic Coordinate system. Is it then an unprojected raster? In ther words, do I also have to use the function raster(r)? If not, how can I get the area corresponding to each of these pixels of my raster in R?


texts: Retaining Bounding Box after Fishnet Clip

texts:
I have a large image that contains around 7000 trees.
I created a bounding box around each one of them and then saved it as a .xml file. I would now like to create different fishnet sizes and clip both the image and bounding boxes associated with the trees in that image. I know that I can simply make a fishnet and clip within QGIS, but I am not sure how to link the bounding boxes? Perhaps turning them into a .csv file with their xmin, xmax, ymin, ymax, classname and then clipping that with the fishnet?
Any other suggestions that I could consider? Would this be better to code?


texts: FME - Cannot load versions in ArcSDE Geodb Writer

texts:
I'm attempting to write to a version in a 10.6.1 ArcGIS Enterprise Geodatabase with a SQL Server 2017 Backend. I have created a version in the database and I want FME to write directly to it. I'm selecting the "Override Version" box in the writer. However, when I click the button to load the versions, I get the following error:

The log shows this:

Creating reader for format: Esri Geodatabase (ArcSDE Geodb)
Trying to find a DYNAMIC plugin for reader named `GEODATABASE_SDE'
FME API version of module 'GEODATABASE_SDE' matches current internal version (3.8 20190820)
Unable to open the Geodatabase reader because the 'DATASET' keyword was not found
A fatal error has occurred. Check the logfile above for details

This error only seems to occur for me in 2019.2. I have tried it in 2018.1 and I can successfully read the versions that exist in the database. Is this a bug in 2019.2? What could be causing this error?


texts:
While creating inner buffers for polygons on postgres/postgis base- a set of few thousand- I received a strange result. Inner buffer for one of the polygons, that was not supposed to appear from logical point of view, showed up. What is more, it looked like flipped.
I've made some more "research" in QGIS and noticed that polygons of certain rotation, with buffer of approx. 65% of one of the edges receive above buffer result. As seen in the picture, when rotated, polygon's buffer won't be generated. I tried regular QGIS tools (buffer) executed on shapefiles not on postgres table.

In the screenshot you can see polygons of different size and orientation to the north. All inner buffers are wrong - should not be present. One polygon that hasn't got inner buffer is just rotated copy of the other in the picture. That was enough for the QGIS "buffer" algorithm to work properly, and not generate buffer there.

The source problem is as follows:

POLYGON ((666360.09 429614.71, 666344.4 429597.12, 666358.47 429584.52, 666374.5 429602.33, 666360.09 429614.71))

in epsg:2180 , and -15m buffer for it.

It gives me wrong result - I guess

I tried to detect error using st_orientation( to check if these buffers have different vertices flow, they don't). I have also changed direction of base/source polygon vertices but it does't make any difference.
Vertices seem to be moved according to buffer size and then used to form polygon. A bit larger or smaller inner buffor works fine.
What am I missing?


texts: OpenGL samples for use with ArcEngine? Inspired by video I linked in post

texts:
Inspired by this video: http://www.youtube.com/user/mresri#p/a/u/0/KjcDWG8nV1g

What are some good OpenGL resources for use with ArcEngine?
C# ArcEngine 10


texts:
I would like to polygonize a raster layer. I searched on the internet and came across the follwing training manual chapter:
https://docs.qgis.org/2.8/en/docs/training_manual/complete_analysis/raster_to_vector.html
However, the required menu entry does not exist in my QGIS instance. Any idea why? I have already browsed through the plugins via the plugin manager but without any success.


texts: Sharing setup details between QGIS users?

texts:
We have just started using QGIS on windows at my work and I am the application responsible. I want my users to have a predefined setup with a couple of extensions and some WMS servers as a starting point. (If they want to add something afterwards, that's fine with me)

How do I do this?

I would prefer not to send out a description with open this menu and do that.

Is it possible to distribute some qgis-project or some type of .ini or .reg file with this information?


texts: Why does my PostGIS query fail with "current transaction is aborted"

texts:
I'm trying to create a vector layer in a QGIS project using a PostGIS query. QGIS is returning the following error:

  Query failed
  1 cursor states lost. SQL: CLOSE qgisf1
  Result: 7 (ERROR:  current
  transaction is aborted, commands ignored until end of transaction
  block
  )

I can't figure out what this error means, and I have no trouble querying the same rows, and presumably the same columns, using psql. Does anyone have an idea about what's going on here?

Update: The original query's where clause looks like:

colname in ('value1', 'value2', ..., 'value40')

I've been able to add QGIS layers using subsets of the list in the where clause, suggesting that there may be a problem either with individual rows. That hypothesis appears to be falsified by the following test, however.

I presume the QGIS query looks like

select * from tablename where colname in ...;

I can run exactly that query in a psql interactive session and it returns a result set without complaint. This observation suggests that either QGIS is not running the query I think it is, or something else is going on between QGIS and PostGIS.

I mentioned above that I can use subsets of the list in the where clause and I'm working to add each individually as its own layer to see if it balks at one of them. Unfortunately that's a time consuming task to which I can't devote myself exclusively, but I'll post another update when it's done.


texts: Can I use a blob defined field to store more than 255 Text characters?

texts: As the title states, i´m not sure whether I should/can use a blob field to store text. I need to increase the amount of text in a field to over 255. Is the blob the way to go?


texts: Complex parametrized string to export gpkg in Python

texts:
I'm trying to write a Python script that does a process (in this case a buffer) iteratively. The input layer is always the same but, in each iteration, the name of the output file must change and It must be exported to gpkg.

This is the structure of the string that I need to create in order to pass it as parameter:

'ogr:dbname=\'/dir/layer.gpkg\' table=\"layername\" (geom) sql='

This string must be creaeted from two parameters: a path and a filename.

I'm struggling with those internal single/double quotes and the backslashes because I don't know how they behave. This is what I have tried until now:

path = './output/layer.gpkg'
dbname = f"""{path}"""
filename = 'filename'
outputlayer = """ogr:dbname='""" + dbname + """' table="layername" (geom) sql="""
outputlayer

And this is what I get:

'ogr:dbname=\'./output/layer.gpkg\' table="layername" (geom) sql='

I need to parametrize the layername part and put those double quotes as shown above.

Just to put it in contest: My final goal is to create a parametrize string that works within this 'OUTPUT' (outputlayer):

processing.run("native:buffer", {
               'INPUT': inputlayer,
               'DISTANCE': buffer, 'SEGMENTS': 20, 'END_CAP_STYLE': 0, 'JOIN_STYLE': 0, 'MITER_LIMIT': 2,
               'DISSOLVE': bufferdiss,
               'OUTPUT': outputlayer})

Can you provide a cheatsheet or some guide to work with these complex strings?


texts: PyQgis Diagram Automated Placement Engine

texts:
I am trying to programatically change the "Show all labels and features for all layers" option for a layer which display diagrams.

This option doesn't seem to appear in QgsDiagramRendererV2 api.
It seems to be related to QgsPalGeometry, but I can't figure how to set that option so that all diagrams are rendered, even overlapping ones.

Can anybody help on that ?

Still no success to turn that option on.
I figured out that it is a global option, and found in QGis api the setShowingAllLabels method in the QgsPalLabeling class.
This is obviously the one I am looking for, but I couldn't manage to make it work :

pal = self.iface.mapCanvas().mapRenderer().labelingEngine()
pal.setShowingAllLabels(True)
self.iface.mapCanvas().mapRenderer().setLabelingEngine(pal)

This code doesn't have any effects.


texts:
I'm developing some software using ArcGIS API, but the question is rather theoretical, as I just came from Google Maps and have no idea where to start; everything seems to be different including the metrics used. I'm not even sure how to explain what I want to understand, so I'll just shoot (don't shoot me if I misname something).

So, the very basic understanding I'm missing is the coordinate system. I'm creating a MapView, then I assign an Envelope (this probably to be the area displayed on the map, right?) as its extent. The problem starts here, Envelope requires some parameters that are definitely not latitude/longitude (I've tried those and the map was showing some random area). From the samples I could just figure out that numbers used are rather strange (something like 658346.0152817797, 6239589.28803324, 841568.832957386, 6366554.416159659) and are not coordinates. What are these numbers? And how can I transform my lat/lon coordinates into acceptable numbers?


texts: Listen to a click event inside bindpopup with Leaflet

texts:
I'm using Leaflet, I have bound popups to layers, and created a popupopen event listener on the map as follow:

map.on('popupopen', this._managePopUp.bind(this));

_managePopUp(layer) {
        console.log('popup listened !');
        console.log(this.elRef);
        this.elRef.nativeElement.querySelector('#Layer-delete').addEventListener('click', e => {
            this._removeLayerByBounds(layer);
        });
        this.elRef.nativeElement.querySelector('#Layer-edit').addEventListener('click', e => {
            this._editLayerByBounds(layer);
        });
    }

The problem is that when the #Layer-delete and #Layer-edit click event listeners are not executed when a popup is called, so I need to re-click on the map then on the layer, then on the delete or edit button, so that it works.

I think the problem is that the this.elRef reference is not updated while clicking directly on layers.


texts: Delete user on ArcGIS server against Oracle backend

texts:
I have a problem, when we delete users, using the following command:

drop user sdedata cascade;

We get the this error:

  ORA-00604: error occurred at recursive sql level 1
  ORA-21700: object does not exist or is marked for delete oracle


texts: Why is the raster information No Data value set to -1.#IND?

texts: I have a couple rasters that have been atmospherically corrected using the "landsat.toar" tool in Grass. When these rasters are output and I open up their properties in ArcCatalog, the NoData Value under Raster Information is "-1.#IND". Any idea what this means? It also doesn't respond like normal NoData values, as I can't use tools like "Is Null" to identify it.


texts: GeoJSON.Net Serializing to valid GeoJson file

texts:
Using the GeoJson.Net lib, how do I serialize a GeoJson.Net.Geometry.MultiPoint to a VALID MultiPoint GeoJSON file?

All I can find is how to serialize a random Geometry object to a JSON file that cannot be read for instance in QGIS.


texts: How we can get output for os.system() in python?

texts:
I wrote the following command in  Geoserver rest-api using curl:

cmd=curl -v -u admin:geoserver -XGET -H "Accept: text/xml" http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/mydatastore/featuretypes?list=available

I want to execute this command through python like os.system(cmd).
Now How can I get the list in python itself.
I tried as follow:

import subprocess
import os
from subprocess import Popen,PIPE,STDOUT,call
cmd=r"""curl -v -u admin:geoserver -XGET -H "Accept: text/xml" http://localhost:8080/geoserver/rest/workspaces/myworkspace/datastores/mydatastore/featuretypes?list=available"""
p=sybprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=None,shell=True)
output=p.communicate()
print output


texts: Setting up Python/ArcPy with ArcGIS Pro and Visual Studio?

texts:
My ArcGIS Pro install recently updated from 1.2 to 1.3.

In reading Python in ArcGIS Pro 1.3 I discovered that Esri have changed how ArcGIS Pro uses Python/ArcPy.

  Legacy:
  In ArcGIS Pro 1.0 through 1.2, if you needed to use Python
  outside of ArcGIS Pro, you also had to install Python for ArcGIS Pro.
  With changes at 1.3, this is no longer required. To avoid confusion,
  uninstall Python for ArcGIS Pro.

I uninstalled Python for ArcGIS Pro, but now I can't get my IDE (Visual Studio 2013) to see arcpy anymore.  In fact I don't think it's seeing Python 3 at all (switching to Python 2.7 still works)

Broken link to arcpy:

Unable to Select Python 3:

As I read that ArcGIS Pro 1.3 uses Anaconda I tried installing that, but it was installed to a completely new location and still I had no access to arcpy from VS.

How can I make Visual Studio see arcpy again?


texts: Data fusion/Pansharpening of Sentinel-2 and PlanetScope

texts:
I am working with fusing optical (Sentinel-2 and PlanetScope) and radar data (Sentinel-1) for my study area, but I got a bit confused over the definition of fusing in the literature.
There are plenty of pansharpening techniques to improve the resolution of satellite imagery and I am using one of these methods on Sentinel-2 with PlanetScope image as PAN image. Is the resulting product now a fused Sentinel-2 and PlanetScope image?
Is pansharpening synonimous with fusion of satellite images or are there more applications needed to fuse two satellite images with different resolutions?


texts:
I want the below xml file to be read by fme.

I tried reading documents and seeing videos. This xml looks more complicated.

http://pastebin.com/pXmjwEqW

<InspectObjects>
<Object id="197589" action="update" objectType="pole" DataSetName="electric"     UniverseId="0" WorldId="0">
<Attributes>
<Attribute id="asset_id"></Attribute>
<Attribute id="id">197589</Attribute>
<Attribute id="location_description">A.T.L.</Attribute>
<Attribute id="npcl_ct">False</Attribute>

I have different objects in a single xml file. I want to filter based on "objectType".

How this can be done by using xml parsing in FME?


texts:
I'm trying to export some PostGIS layers but getting these two errors when using the qgis2web plugin, seems to be memory related but is too many layers or too large an extent or something else? Also the plugin takes about 5 minutes to open:-

  Traceback (most recent call last):
  File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\maindialog.py", line 101, in previewMap
  MainDialog.previewOL3(self)
  File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\maindialog.py", line 234, in previewOL3
  previewFile = writeOL(self.iface, layers, groups, popup, visible, json, cluster, labels, params, utils.tempFolder())
  File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\olwriter.py", line 53, in writeOL
  exportLayers(layers, folder, precision, optimize, usedFields)
  File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\utils.py", line 92, in exportLayers
  lines = f.readlines()
  MemoryError

and this error:-

  MemoryError
  Traceback (most recent call last):
    File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\maindialog.py", line 111, in saveMap
      MainDialog.saveLeaf(self)
    File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\maindialog.py", line 257, in saveLeaf
      outputFile = writeLeaflet(self.iface, folder, 600, 400, 1, layers, visible, "", cluster, "", "", "", labels, 0, 0, json, params, popup)
    File "C:/Users/xxxxx.xxxxxx/.qgis2/python/plugins\qgis2web\leafletWriter.py", line 89, in writeLeaflet
      lines = f.readlines()
  MemoryError


texts: SAGA library is not visible in Processing Toolbox

texts:
The screenshot of Options > Processing

I have SAGA plugin activated in my QGIS 3.8 on a Ubuntu 18 LTS machine. However, it does not show up in my Processing Toolbox.

Could anyone help me solve this?


texts: Checking for feature existence before extract by attribute in ArcGIS ModelBuilder?

texts:
I have a model that runs through a series of Rasters in a folder and extracts individual crops as layers cyclically.

The problem is that if the crop is not grown in a particular state, the model will die as the "extract by attribute" step is trying to operate on a null set.

Is there a way to test to see if the attribute exists in the raster before trying to extract it?

If it doesn't exist, how do I get the model to move on to the next raster rather than dying?

An image of the model Diagram:


texts:
when I want to start the program a black window opens and show me the next message:

Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.0\etc\grass72.py", line 1971, in <module>
    main()
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.0\etc\grass72.py", line 1822, in main
    set_paths(grass_config_dir=grass_config_dir)
  File "C:\PROGRA~1\QGIS2~1.18\apps\grass\grass-7.2.0\etc\grass72.py", line 620, in set_paths
    os.environ['MANPATH'] = to_text_string(addons_man_path)
  File "C:\PROGRA~1\QGIS2~1.18\apps\Python27\lib\os.py", line 420, in __setitem__
    putenv(key, item)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 13: ordinal not in range(128)
Presione una tecla para continuar . . .

How can I get past this?


texts: Does Earth's magnetic field affect any datum definition?

texts:
I had an interview last week. One very interesting question was "does earth's magnetic field affect any datum definition?" I was sure it does not for geocentric datums. But I thought maybe the geodetic datums are affected by earth's magnetic field. But then, none of the physical parameters of a geodetic datum are related to Earth's magnetic field! And then I got confused!

Can anybody give the correct answer?


texts: Revealing the different layers of a shapefile in QGIS

texts:
Shapefile I am referring to is 'NUTS_RG_03M_2010' which is together with several other shapefiles available in a ZIP file on the Eurostat web site.

the ZIP file

the available map sets at Eurostat

I am importing NUTS_RG_03M_2010.shp as a vector layer.

Actually I am interested in the NUTS 2 or 3 level - not the here displayed national level. Now I print this map in a PDF and when I open it I can see the different layers in short intervals displayed - from very fine grained to the national level. The screen shot shows one intermediate level:

My conclusion is that those levels, layers or whatever it is called are "hidden" somewhere and must be displayable and editable in QGIS. How do I access them?

My ultimate goal is to convert a NUTS 3 level layer to GeoJSON or SVG.


texts: Seeking API to return GeoJSON data for countries borders?

texts:
Is there a simple free REST API where I can send the name or code of a country and get in return geojson data which highlights it's borders ?

I'm writing an application where I will have a changing list of countries and I have to outline their surface/borders on a openlayers map.

I've perfected/learned how to do it using sample geojson from this github but I haven't been able to find a RESTful api which serves me similar data?

Does anyone know of such a service, bonus points if I can send multiple country names at once so I don't need to make a lot of calls.


texts: Installing ArcGIS Web AppBuilder with Apache web server?

texts:
i download ArcGIS Web AppBuilder and installed it with Node.js, its start working on my web browser, the main web page asks for an ip or web address, i have XAMPP & Apache web server installed and running well on my PC, but ArcGIS Web AppBuilder doesn't accept my localhost (127.0.0.1) ip.

Is there any way to make ArcGIS Web AppBuilder works on my PC without internet web site??


texts: Projections appropriate for global analysis that preserve area and that preserve distance (but not necessarily in the same projection)

texts:
I am looking for a projection (or a set of projections) that decently preserve distances so that I can buffer every country in the world and have a similar level of minimal distortion for each.

I then need a projection (or set of projections) to compute the areas of these buffers so that each country in the world's buffer area can be compared with any other country's buffer area.

Eventually I will need to do a bunch of overlays onto these areas to chop up and assign other statistics based on proportion of overlap and such. All of these resulting stats need to be comparable with every other country in the world. At this stage in the game, I am thinking that must be done in an equal-area projection(s) as well.

It is the first time I am operating at a scale smaller than local or regional, and the results will have to be defensible and open to peer-review. I am assuming it is improper to do all of these things in lat/lng, but then when I think about the logic of why, I confuse myself!

I appreciate any info, opinions, reflections on similar experiences, etc anyone has about this!


texts: Call output files in temporary directory through Processing Toolbox (python)

texts:
I need to create temporary files as intermediate output to be used with processing algorithms. So, I implemented this:

Processing.runalgorithm("grass:v.to.rast.attribute", ........, None)

This line creates the output in C:\Users...\AppData\Local\Temp\AppData\processing\"folder"\output.tif

In this temp directory, three folders are created.

Now, I need to run other algorithm:

Processing.runAlgorithm("saga...", input,....)

The input of this is the output of the last algorithm, I am trying to access that but I can´t.

I try with system.getTempFilenameInTempFolder('output'+'.'+'tif'). But this line only access one of the three folders.

I research in http://docs.qgis.org/2.6/pt_PT/docs/user_manual/processing/console.html, and try the code presented for qgis 2.6 (but didn't work):

##dem=raster
##twi=output
ret_slope = processing.runalg("saga:slopeaspectcurvature", dem, 0, None,
                None, None, None, None)
ret_area = processing.runalg("saga:catchmentarea(mass-fluxmethod)", dem,
                0, False, False, False, False, None, None, None, None, None)
processing.runalg("saga:topographicwetnessindex(twi), ret_slope['SLOPE'],
                ret_area['AREA'], None, 1, 0, twi)

What can I do to access the output?


texts: r.water.outlet is returning blank raster in QGIS

texts: I am Getting error "￼Ignoring point outside computation region: 77.0072,12.2529" while deliniating watershed using r.water.outlet in QGIS. What am i doing wrong?


texts: Polygon to raster. How to keep same values?

texts:
I have a polygon with values 3, 6, 9, 12, 15, 18, 21, 24, 27 an 30. These are the time it takes for the firetruck to reach certain destinations. Now i want to compare these to another raster that have time for helicopter to reach destinations.

The problem is that when i convert the polygon to raster it doesn't keep the old values, it instead makes new ones 11, 12, 13, 14, 15, 16, 17, 18, 19 and 20.

Is there a way to keep old values so i can make a correct calculation between the two rasters?


texts: I am making a script for creating address locators and then composite address locator. As I was reading the arcpy help documents I found the syntax here http://pro.arcgis.com/en/pro-app/tool-reference/geocoding/create-composite-address-locator.htm. For the in_field_map parameter, the example gives a long string with few explanation on the syntax. Where can I find more details on how to format this parameter?


texts: Digitizing JPEG image or georeferencing it first?

texts:
I'm a new learner when it comes to QGIS.

I have a JPEG image and I want to convert it into a shapefile. The problem is when I polygonized it, the resulting image is inverted. So I decided to just digitize it manually. Now since the image I used has no coordinate reference, I assigned WGS 84. By the way I'm having difficulty assigning any geographic coordinates, so I just input WGS 84. Then I open an OpenLayers plugin which is the Bing Maps. It was just then that I realized that only raster layers can be georeferenced.  So I open again my JPEG file and started georeferencing it.

When it was done the result is way off the grid. what do I have to do?

I am using QGIS 2.4 version.


texts: Create Classes based on Field Values using Python in the Field Calculator

texts:
I'm using ArcGIS 10.3 and I want to create classes (1-4) in a field called "Util_Class" based on the values of a field called "OverallUtil". I think I have syntax error and have been entering this into the Field Calculator:

def Reclass (!Util_Class!):
  if (!OverallUtil! <= 0.6):
    return 1
  elif ( !OverallUtil!>0.6 and !OverallUtil!<= 0.75):
    return 2
  elif ( !OverallUtil!>0.75 and !OverallUtil!<=0.90):
    return 3
  elif (!OverallUtil! > 0.90):
    return 4


texts:
I need to make something similar to a note system, where i can create a feature that will give me something similar to a note system (or a square in the map linked to a feature that will only show itself when editable) where i can type any notes.

the point of this is to correct map details and i have a lot of employees that don't know how to correct them so i need a system in which if they see some errors in the map they will just have to place a feature (or something similar) close to the errors and then specify the errors (so it can then be fixed later on).

there is one more thing, i said that adding a feature combined with a note system would be good because i need to have certain control over the overall notes or features, for example, in case that i need to search for it all at once or edit it all at the same time.

if there is no such thing then maybe a recommended plugin would come in handy. i really appreciate any help given since this is a really good project of an entire state and a lot of people depend on improvements made by me so thank you in advance.


texts: How to make a linked-list in Google Earth Engine?

texts:
Now, after Noel Gorelick's very helpfull code, i have a sorted list with two-segment:
var list = ee.List([
  [101, 103],
  [102, 188],
  [103, 109],
  [109, 122],
  [117, 156],
  [122, 133],
  [133, 100],
  [199, 155]
  ])

i want to make a new list with linked-lists, for example i want to find an element from first column, take second column value and add the value to list, until the second value is equal to 100.
The result list have to a list with one column and values in this list must be:
var newlist = ee.List([101,103,109,122,133])

Any suggestion please?


texts: Legend of World Reference Base (2006) Soil Group

texts:
How Can I get the legend for the downloaded WRB soil groups whether from the https://soilgrids.org/ website or directly downloaded from WCS server https://maps.isric.org/mapserv?map=/map/wrb.map into QGIS?

The legend is shown in numbers. Is it the World Resource Base (WRB) group number for the most probable Soil Group?

if it is, what is the specific number of each soil group?


texts: Add GeoJSON layer to OpenLayers 3.16 from GeoServer

texts:
I try to be as simple as possible with my problem. It's just to display a json layer from my Geoserver on a OSM layer with a ol3.16 page.

I take the example  from this page: http://openlayers.org/en/latest/example … -wfs.html

I take the code of this page and change ONLY the geoserver query to my layer. I get the OSM layer and nothing else.

I open the inspector window in Firefox for both pages (the example and mine).

With the example page, the query call is done and I get a response of 200ko. With my page, the call is done and the response size is 0ko.

To check my query I copy-paste the url from the inspector window in the adress bar, and then I get the json data. If I save it in a file, I have no problem to loads it in another ol3.16 page as a local file.

Then, the query is well formed, it's sent to geoserver and Geoserver dont sent the response only to my page. Anyone have an idea why????


texts: Adding value options in feature attribute table?

texts: I cannot figure out why it says NULL, my goal is to be able to pick values from a classificator table made in Excel and imported into QGIS as a vector layer.


texts: How to plot points that were recorded as meters of distance (X and Y) from a benchmark into a map?

texts:
How can I put the 2 points from the table below into a map?

The "lat" and "lon" are the coordinates of a reference point (location of the RTK base station), these two columns are constant for all the points. The columns "x2" and "y3" has the actual location of each point. They are in meters of distance from the reference point in each axis.

So the 1st point is 106 m East and 381 m South of the reference point.

How do I plot these points into a map?

Accuracy is important in this case and yes, I have hundreds of thousands of points to calculate, I just used two here to simplify the question.

I tried to convert the distances that I have in meters now to decimal degrees and then sum with the reference point coordinates but wasn't able to get the locations accurate enough.


texts: Getting GPS coordinates of an ending point based on a specific road, a starting point and length

texts:
In an Excel file, through VBA, I would like to have the GPS coordinates of a certain point, starting from the previous known point and the length of a specific highway (or a road). I mean a "delta" calculation based on a specific road and a starting point.
I found out the way to obtain GPS from an address (Google Maps API), but not through a specific road and the distance to the starting (GPS known) point.

Is this possible to do using the Google Maps API or is there any other way to accomplish this?


texts:
I've built various QGIS projects that use Canadian UTM and MTM CRS. They worked just fine in QGIS versions through 3.8 (based on proj4 and ?proj5).

In QGIS windows version 3.10.0-3, things got borked with the transition to proj6. QGIS version 3.10.1 seems to have largely fixed that, after I manually also installed proj-datumgrid-north-america in OSGeo4W. My maps display fine again, with CRS conversion on the fly, without pop-up errors.

However, my QGIS message log silently displays the following, with the so-called critical errors repeating during any map redraws. (EPSG:2951 is my project CRS. It's NAD83 (CSRS) MTM zone 9.)

2019-12-11T10:39:56     CRITICAL    Cannot normalize transform between EPSG:2951 and EPSG:4326
2019-12-11T10:40:04     CRITICAL    Cannot normalize transform between EPSG:4326 and EPSG:2951
2019-12-11T10:40:04     CRITICAL    Cannot normalize transform between EPSG:3857 and EPSG:2951
2019-12-11T10:40:04     CRITICAL    Cannot normalize transform between EPSG:26918 and EPSG:2951

Now (3.10.1), the maps look normal, but I'm still surprised at critical errors, even if silent ones. Should I be worried, and if so what should I do?


texts: Arcpy: Counting number of segments where altitude rises or decreases based on DEM?

texts:
I have a DEM of Sudety mountains and linear .shp with several hiking paths.

I'm trying solve one problem: How to make a script based on input DEM and input line shapes that would count number of segments of hiking path where the terrain rise is higher than 50 meters or lower than -50 meters and sum these that are >50m to one field and that are <50m to another field.

I was trying to solve this problem with 3D line stack profiles and arcpy.UpdateRowCursor, but don't know how to order an iteration that would compare row.HEIGHT with row.HEIGHT of the previous row.

Another question is how to name stack profile's output tables by a field name of particular row?


texts: Changing marker size by zoom in Leaflet?

texts:
I get stuck with changing my marker's size when zoom changes in my Leaflet code.
It's a simple map with a metro stations overlay coming from an ArcGIS Server. The markers are coming from that same source.

The code is as follow:

    <meta charset=utf-8 />
    <title>Simple FeatureLayer</title>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />

    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />

    <link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">

I would be very glad if someone's got an idea to solve it.


texts: QGIS or PostGIS auto-split long line features

texts:
I have a dataset of LineStrings in a postgis enabled database and would like to automatically split any feature longer than a certain threshold (say 1 mile).  I am aware of the Split Feature tool in QGIS but since my dataset contains potentially millions of lines, I need an automatic solution.

Is there a pre-existing function or something that can help me with this?  I could write a Python script to go through each feature, and if its length > threshold then split at location X.  But I am not sure how to actually split the line and maintain all other attributes

I can use ArcGIS if necessary but would strongly prefer to use open source tools


texts: Differences in angle measurements in Web Mercator

texts:
I am trying to measure different angles on 2D map using lat/lon coordinates taken from Google Maps, and Java library JTS.

I have noticed a weird thing: my measurements are always distorted, except angles that are perpendicular to meridians and parallels. It gets as high as 25 degrees when the angle sides are at an angle of 45 degrees to the parallalels, example here:

The result is 68.97 and the library I use uses the law of cosines to measure the angle. I also double checked the result using the method provided here, and the difference was still there.

Here's the Java code:

double point2X = 2.35956;
double point2Y = 48.86054;

double point1X = 2.35922;
double point1Y = 48.86215;

double fixedX = 2.3582;
double fixedY = 48.86124;

double angle1 = Math.atan2(point1Y - fixedY, point1X - fixedX);
double angle2 = Math.atan2(point2Y - fixedY, point2X - fixedX);

return Math.toDegrees(angle1 - angle2);

Or as done using JTS:

Coordinate point1 = new Coordinate(2.35922, 48.86215);
Coordinate point2 = new Coordinate(2.35956, 48.86054);
Coordinate fixed = new Coordinate(2.3582, 48.86124);

return Math.toDegrees(Angle.angleBetween(point1, fixed, point2));

And here is a JS fiddle showing the calculations:

  https://jsfiddle.net/hrg04v3n/

I found out that Web Mercator is non-conformal, thus it doesn't preserve angles, but does it get as bad for even such small areas as presented above?


texts: Labeling every polygon in shapefile except for one in ArcMap

texts:
I am using ArcMap 10.8.1.
I am trying to create a map of a county which does not need to be labeled since it is for a report concerning that county, but every surrounding county does need a label for reference. I originally approached this in a very convoluted way and just made a different shapefile for each county excluding the county I was working within.
This time I'm trying to put more effort into cleaning the process up a bit. I am trying to use SQL in Labeling to define different classes of features. My initial thought was to just use a simple SQL query to label every polygon that is NOT the one I am currently working in (in this case Ashland).
Is there something wrong with the SQL here or am I missing something else?
I get an error saying an invalid SQL statement was used.


texts:
I have a point shapefile I am trying to run the GRASS v.surf.idw tool on in python. Here is a link to the data: https://github.com/tanyahelena/qgis_data

I have a short script which runs. I don't get an error message, but I also get no result. What am I doing wrong?

import processing

parameters = {
    'input' : '/Users/ep9k/Desktop/qgis_data-master/area3_testdata_clipped.shp',
    'npoints' : 12,
    'power' : 2,
    'column' : 'PDOP',
    'GRASS_REGION_PARAMETER' : '-116.04415744105579,-116.0047567429083,37.029018114312905,37.054281406967974 [EPSG:4326]',
    'GRASS_REGION_CELLSIZE_PARAMETER' : 0,
    'GRASS_RASTER_FORMAT_OPT' : '',
    'GRASS_RASTER_FORMAT_META' : '',
    'GRASS_SNAP_TOLERANCE_PARAMETER' : -1,
    'GRASS_MIN_AREA_PARAMETER' : 0.0001,
    'output' : '/Users/ep9k/Desktop/GRASS_OUTPUT.tif'}

processing.runAndLoadResults('grass7:v.surf.idw', parameters)

I have been able to run the tool using the 'IDW Interpolation' tool, native to QGIS but I struggle with GRASS tools.


texts: Calculating distance between points within river network using ArcGIS Pro

texts:
I have a shapefile of a river, and the coordinates of several points. I am interested in calculating the pairwise distance between each of those points along the river network.
Is there any way to do this with near table or another tool using ArcGIS Pro?
Edit: I have arcGis Pro 2.7.26828. I have tried near table and the Euclidian Distance tool. I do not have rivex.


texts: ESRI JS API - don't trigger onClick event when panning Map

texts:
I have a custom onClick handler for my map that is meant to add a point wherever the map is clicked.  I'm finding that this function is triggered even when I click the map to pan.  Is it possible to somehow ignore the onClick event if the map is panning?

Update:

Here is the code for my onClick handler.

this.mapClickHandle = dojo.connect(this.map, "onClick", lang.hitch(this, function(evt) {

    this.layers.forEach(function(layer) {

        layer.layerObject.clearSelection();

    });

    console.log(evt.screenPoint)

    var toleranceInPixels = 10;
    var pnt = evt.mapPoint;

    var pixelWidth = this.map.extent.getWidth() / this.map.width;
    var toleranceInMapCoords = toleranceInPixels * pixelWidth;
    var ext = new esri.geometry.Extent(pnt.x - toleranceInMapCoords, pnt.y - toleranceInMapCoords, pnt.x + toleranceInMapCoords, pnt.y + toleranceInMapCoords, this.map.spatialReference);

    var q = new esri.tasks.Query();
    q.geometry = ext;

    var deferreds = this.layers.map(function(layer) {

        return layer.layerObject.selectFeatures(q);

    });

    all(deferreds).then(lang.hitch(this, function(results) {

        if (results.some(
            function(result) {
            return result.length > 0;
        })) {
            dijit.byId(this.mapPage).performTransition(this.attributePage, 1, "fade", null);
        } else {
            if (this._editing) {
                this._newGeom = evt.mapPoint;
                dijit.byId(this.mapPage).performTransition(this.templatePage, 1, "fade", null);
            }
        }

    }));

}));

This is for a mobile web application using the JS API v3.4.  The behavior I am seeing is still in my desktop web browser though.  Basically, what the code above does is transition to the attribute view if an existing feature is clicked on (or nearby) or it transitions to the editor template page if the map is clicked and not existing features are nearby.


texts:
Wish I could change the layers according to a certain selection criterion.
For this I made a select that acts an onchange event that normally should change what is seen on the map ....
But unfortunately this does not happen :(
Please help, I am very new to these things ....
Here is what I've done so far:
$( document ).ready(function() {
          $("#id_primarie").change(function(){
               console.log('test');

               var id_primarie = $('#id_primarie').val();

                var teren = new ol.layer.Tile({
                    source: new ol.source.TileWMS({
                              url:'http://127.0.0.1:10000/geoserver/ADMINISTRATIE/wms',
                              params: {'LAYERS': 'ADMINISTRATIE:teren',
                                       'STYLES':'TEREN',
                                       tiled:true,
                                       transparent: true,
                                       viewparams: 'id_primarie:'+id_primarie },
                              format: new ol.format.GeoJSON(),
                              ratio: 1,
                              serverType:'geoserver'
                    })
                });

                map.addLayer(teren);

          })
      });

Use: OpenLayers: 6.4.3
Geoserver 2.15.1
UPDATE:
cod:
$( document ).ready(function() {
          $("#id_primarie").change(function(){
               console.log('test');

               var id_primarie = $('#id_primarie').val();

                var map = new ol.Map({
                  target: 'map',
                  layers: [
                    new ol.layer.Tile({
                      source: new ol.source.OSM()
                    }),
                    new ol.layer.Tile({
                          source: new ol.source.XYZ({
                                  attributions: ['Powered by Esri', 'Source: Esri, DigitalGlobe, GeoEye, Earthstar Geographics, CNES/Airbus DS, USDA, USGS, AeroGRID, IGN, and the GIS User Community'],
                                  attributionsCollapsible: true,
                                  url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',
                                  maxZoom: 16
                          })
                      }),
                  ],

                  view: new ol.View({
                    center: [469713.24, 505416.01],
                    zoom: 35
                  })
                });

                proj4.defs('EPSG:31700','+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=28,-121,-77,0,0,0,0 +units=m +no_defs');
                ol.proj.proj4.register(proj4);

                var teren = new ol.layer.Tile({
                    source: new ol.source.TileWMS({
                              url:'http://127.0.0.1:10000/geoserver/ADMINISTRATIE/wms',
                              params: {'LAYERS': 'ADMINISTRATIE:teren',
                                       'STYLES':'TEREN',
                                       tiled:true,
                                       transparent: true,
                                       viewparams: 'id_primarie:'+id_primarie },
                              format: new ol.format.GeoJSON(),
                              ratio: 1,
                              serverType:'geoserver'
                    })
                });

                map.addLayer(teren);

          })
      });

Now he does what he needs only because the problem is that he puts the same map with different layers twice :(


texts: Can anyone tell me of an open source where I can get the shapefile for France at a postal code level?


texts:
I maintain a layer in my project that indexes geotagged research photos. Right now, the layer (in a gpkg) has an attribute PhotoPath which points to the photos stored separately on disk. I then use a QML or HTML widget in the layer attribute form to display the photo. This widget (HTML version) has a document.write(expression.evaluate("\"PhotoPath\"")); embedded in a  tag.

For portability and version control, I'd like to store the actual photos inside the gpkg.

Since version 3.8, QGIS allows storing binary (blob) data inside a gpkg and accessing it with a binary widget. Unfortunately, so far it seems this widget only allows importing or exporting the blob data, not other manipulation. Any ideas how to display it as an image?

I've done a manual proof of concept of the following klugey solution, but I hope there's something better.

Storing the photo in the gpkg not as a binary blob, but in a base64 encoded text representation.
Replacing the  with a  to paste in the picture as a data URL.

To do this fully, I'd have to implement the base64 encoding as a PyQGIS action and/or processing algorithm; and muck around with various escaped quotes in the HTML widget. It's storage-space and computationally wasteful, and I'm not sure if there's an upper limit on the data URL length. Any better approach I'm missing?


texts: Using Near to determine proximity in decimal degrees using ArcGIS Desktop?

texts:
Using ArcGIS Desktop, I want to calculate the nearest distance of points to lines, and I need distances to be in decimal degrees not meters.

How do I do this?

Even if I choose "decimal degrees" in the Near tool, the output seems to be in meters!