texts: OSRM doesn't show actual route while plotting from osrm-backend JSON response

texts:
While trying to test routing using OSRM Demo server I sent GET request with the following url:

http://router.project-osrm.org/route/v1/driving/90.4007354,23.7936502;90.3925568,23.7746739?steps=true

When I plot the intersections on a web map with OpenStreetMap tiles in the background I get the following route.:

But when I use the same cordinate in the OSRM Demo Server's front-end I get the following route:

I have also check that the JSON response from the OSRM Demo Server's front-end which is the same as the response from the url I requested. From the first screenshot we can see that the while routing the flyover is being ignored and the starting and the ending point of flyover are being connected with a straight line when plotted but that is not the case for the OSRM Demo Server's front-end. What am I doing wrong? Can anybody please help?


texts:
Hi I have tried to upload a shapefile to GEE using only the extensions .shx .shp .sbn .dbf and .cpg and I keep getting the following error = Error: Unable to transform edge (258573.666225, -3764973.048903 to 258573.666230, -3764973.048914) from EPSG:4326 PLANAR to EPSG:4326.
Any suggestions?


texts: Calculating wells by county and then updating county table with that data using ArcPy?

texts:
I have the following code to calculate the number of wells within a counties layer.  Right now it is giving me a total number of wells.

Where and how do I get it to loop through all the counties separately and give me that count separately?

Following this; I'd like to also calculate the well density – i.e. how many wells there are per area unit, and update the table with that value as well.

import arcpy

# For each county calculate the total numbers of wells that fall into that county, and update the county table with the total count.

wellsLayer = "C:\\Wells.shp"
arcpy.MakeFeatureLayer_management(wellsLayer , "wells_lyr")

countiesLayer = "C:\\COUNTIES.shp"

arcpy.SelectLayerByLocation_management("wells_lyr", "INTERSECT", countiesLayer, "", "NEW_SELECTION")

fieldList = "name"

wellsCount = int(arcpy.GetCount_management("wells_lyr").getOutput(0))

print wellsCount


texts: Draw edges connecting vertexes (by id) on QGIS


texts: Save raster layer temporal properties to qml

texts:
Is there a way to save a raster's QgsRasterLayerTemporalProperties to a qml file using pyqgis?
I noticed that the temporal properties are also not included in the qml when manually saving the raster layer's style from Properties > Style > Save style..., so perhaps this is not possible at all?


texts:
I'm working with a QGIS plugin developed with Python. This plugin is running normally in QGIS 2.6 in a Windows XP, however when I try to instail this same plugin on QGIS 2.18 in a Windows 10, this error appears: "No module named Tkinter".

I already searched about and all the possibilities that I found of error and the way to fixed isn't applyed to my problem.

Does this error happen because of the windows version, the QGIS version or another problem?


texts: Is there any geoserver plugin available to read excel files and displaying values on respective pincode/zipcode areas of Geoserver wms/wfs maps?

texts:
I have business data with pincodes in an excel file. Pincode boundaries shapefile is configured in geoserver. zipcode is common field in both of the files.

Could anyone guide me about the plugins availability to read excel files and display respective zipcode business figures on WMS/WFS maps of Geoserver 2.5.2 version with windows 7 (64 bit OS).

If plugins are not available, then how to check multiple parameters using spatial queries to geoserver layers?

ex:- In a zipcode file, age groups, income groups, profession fields are present. If i want to show result of 40-45 age group with annual income greater than 5M from doctors profession on wms/wfs maps. How can i achieve this? Any idea/advise can be greatly helpful.


texts: How can I smooth LineString coordinates with 1D Gaussian Filter?

texts:
I'm trying to smooth a LineString through 1D Gaussian Smoothing and I'm having a doubt on the steps required to implement it, regardless of programming language. I couldn't find by myself anything explaining how to do it.

The linestring is a vector of coordinates, each having longitude and latitude. I'm supposed to use a 1D Gaussian Smoothing method, so that means I have to pass 2 times on the coordinates. I'm not very used to this kind of subject, so I'm a bit confused on how to apply this method.

If anyone had any experience doing this, I'd like to receive documentation or articles on the subject.

(Analogy) I'm trying to do what the least squares method does to XY coordinates. We feed it with the coordinates and calculate using some degree (linear, quadratic, etc.), then we'd get the best fitting polynomial. But in my case, I have to smooth both axis (longitude and latitude) using the 1D Gaussian filter.


texts: ogr2ogr Export spatial data from SQL Server to Spatialite

texts:
I am trying to export some spatial data from SQL Server 2012 to Spatialite with the following command

ogr2ogr  -f SQLite -update C:\tmp\Spatial.sqlite -nln "my_polygons" "MSSQL:server=host;database=MySQLDB;trusted_connection=yes;GeometryFormat=native;" -sql "SELECT *  FROM MySQLDB.dbo.my_polygons"  -lco SPATIAL_INDEX=yes -gt 65536

Ogr2ogr does write from SQL Server to my Spatialite db however the imported table is not recognised as a spatial table.

When trying to view the result in QGIS is doesn't show any polygons. However I can see the table and the attributes!


texts: Configure geoserver to ignore format_options

texts: I'm using Geoserver 2.8.1. Is it possible to configure the server to ignore certain format_options passed to Geoserver's WMS service?


texts: Creating a project without projection/simple Cartesian coordinates?

texts: I want to draw a schematic process diagram in QGIS (yes, I really want, because I can document my data in the table) but it seems impossible to create a CRS that is simple Cartesian (x,y). Anyone can give me a hint?


texts: Online Courses to Learn Writing Custom Python Scripts / Plugins in QGIS?

texts: I am looking for resources to learn writing Python Scripts / Plugins for QGIS. The Developer Cookbook is a good start, but I am specifically looking for a video-based resource that teaches with hands-on exercises.


texts: Do any open-source .Net libraries (commercially usable) exist for reading/writing LiDAR data?

texts: I have a few LiDAR point data (.las files) with me. I would like to read the X,Y and Z from it using .Net. I found liblas, which is in C++ and I am not sure if it can be used commercially after reading the licensing information. Has anyone found any good ones?


texts:
I connected my Oracle database to ArcGIS and added one layer to map. This layer has points and polygons. I make a selection in this layer and get 9508 selected features, which I want to export as shapefile and add it separately to the map. I choose Data > Export Data, choose to export only selected features. But in the shapefile I get, there are less objects that were selected - only polygons, not points.

How can I properly create such layer file with selected points and polygons from Oracle database layer?


texts: Adding custom attributes to GeoJSON with QGIS

texts:
I have some GeoJSON data (originally GPX data) like below:

{"type": "FeatureCollection","features": [
{"type": "Feature","properties":{"time":"2018-03-15T12:22:17.293Z","provider":"network","time_long":"1521116537293","accuracy":"21.507","altitude":"521.2000122070313"},"geometry":{"type":"Point","coordinates":[12.9734916,13.6980481]}}
,{"type": "Feature","properties":{"time":"2018-03-15T12:20:50.000Z","provider":"gps","time_long":"1521116450000","accuracy":"26.0","altitude":"601.0","bearing":"306.1","speed":"0.95"},"geometry":{"type":"Point","coordinates":[12.9732416,13.69785612]}}
}

I need to add two global level parameters:

start_time: 1521116537293
filename:  myfile.jpg

So that when I perform WFS calls in Javascript, I get two parameters from GeoJSON response in addition to above GPX point data.

Is it possible and supported in GeoJSON and if so how to do that in QGIS?


texts: PostGIS - Dynamic Server-Side Clustering based on Zoom level

texts:
I'm working on a Ruby on Rails application that is showing road signs on the map(leaflet). So, user can browse map and road signs, great. But, if there are a lot of signs and user wants to zoom out, there are obvious problems for my app.

First problem is to prevent loading a lot of elements (signs) at the same time.
And the second problem is to have clear view of elements on the map.

This:

Insted of this:

Solution by my research is to cluster elements by locations as user is zoom-ing in and out. More precisely, using k-means algorithm.

My questions are :

Are there some done solutions for this?
If done solutions not exists, how to use k-means algorithm with zoom level?

I'm using Postgres database with Postgis extension and Ruby on Rails build API.


texts:
Due to problems with other software, I am trying to find altervative software in order to georeference DWG Images without a defined coordinate system attatched to them. They are digitized to scale 1:1 and are therefore the upper left coordinate is located in GIS Software at 0 0.

I have FME 2015 (soon to be FME 2016) but cannot see any georeferencing tools.


texts: convert kml to gpx programmatically or with a command

texts:
I have a KML file I downloaded from Google Maps "My Maps". This KML has many layers, each layer with many POIs.
I would like to convert the KML with tools like ogr2ogr from the GDAL library or some python scripts, but I find it very hard.

So far:

ogr2ogr -f GPX my_file.gpx my_file.kml

gives ERROR 6: Cannot create GPX layer MY_LAYER_XYZ with unknown geometry type

ogr2ogr -nlt POINT -f GPX my_file.gpx my_file.kml

gives many errors on various fields (which I guess come from how Google builds the KML) similar to ERROR 6: Field of name 'description' is not supported in GPX schema. Use GPX_USE_EXTENSIONS creation option to allow use of the <extensions> element.
then it also gives ERROR 1: Features without geometry or with non-ponctual geometries not supported by GPX writer in waypoints layer.
ERROR 1: Unable to write feature 2 from layer MY_LAYER_XYZ.

ogr2ogr -nlt POINT -f GPX -dsco GPX_USE_EXTENSIONS=YES  my_file.gpx my_file.kml

gives ERROR 1: Features without geometry or with non-ponctual geometries not supported by GPX writer in waypoints layer.
ERROR 1: Unable to write feature 2 from layer MY_LAYER_XYZ.

ogr2ogr -nlt POINT -f GPX -dsco GPX_USE_EXTENSIONS=YES -lco FORCE_GPX_TRACK=YES my_file.gpx my_file.kml

gives ERROR 1: Features without geometry or with non-ponctual geometries not supported by GPX writer in waypoints layer.
ERROR 1: Unable to write feature 2 from layer MY_LAYER_XYZ.

I've tried this python script kml2gpx.py at https://gist.github.com/timabell/8791116 which looking at the code should iterate through the KML processing it as "normal XML" content (using stuff like import xml.sax), but the output does not contain any of the POIs in the orginal KML.

I am not familiar with the KML and the GPX standard, I just wished there was a handy script to convert one to the other. Is it possible at all?


texts: Characteristics of different methods to convert ECEF to LLA

texts:
I'm trying to convert ECEF (Earth Centered, Earth Fixed) coordinates, which are defined in X,Y,Z, centered at (0,0,0) to LLA (Latitude, Longitude, Altitude). There are a couple of methods I found on the internet (please let me know if there are better methods). Both are clearly described in this document, on pages 3-4:

http://www.microem.ru/pages/u_blox/tech/dataconvert/GPS.G1-X-00006.pdf

One uses an iterative method and the other is a closed form solution. I would like to know which method to use for my application. Two relevant criteria are speed (computation time) and accuracy. The algorithms aren't difficult to implement, but I don't think it's straightforward to compare the two... For example, I feel like accuracy will vary by the input ECEF coordinate.

So does anyone have more information about each method? It would be great if I could get which one is faster (guessing closed form) and a rough accuracy I can expect from each (ie, within how many meters of the actual LLA can I expect my answer to be or something along those lines).


texts: I have OGS 4.02, OS is Windows Server 2008 R2 Standard.I have questions about Geoexplorer. I know that anonymous users can not save and publish map and also they can not upload layers. If I create users which are in Geoserver admins (access mode is admin for specific workspace) or editors (access mode is write for specific workspace), why they can not upload their layers (zipped shapefiles) in their workspace, creating maybe even new stores on the fly. Why is that option only avaliable for one person, user with admin role? Is it something with folder security in Windows, is it necessary to create also users and specific folders for them. I know that after succesfull upload, two folders are created: one in C:\ProgramData\Boundless\OpenGeo\geoserver\uploads (tmp prefix) and another in workspace where data are uploaded. So who can only write in that folders through geoexplorer and geoserver port 8080? Is it necessary to create postgis store to enable upload for some power users (editors or small admins)?


texts: Pythonaddins combobox advanced functionality

texts:
I made an Add-in for ArcMap that shows important news for our company. It is actually a toolbar with combobox and refresh button. It loads news from a text file located in our server and as every user has an access to it, this toolbar loads lines from this file. Finally it looks like this:

Here is a part of code
class gc_cmb(object):
"""Implementation for GC_NewsToolbar_addin.combobox (ComboBox)"""
def __init__(self):
    file_txt =  u'\\\SRV-03\\Projects\\UTILS\\AddIns\\\\news.txt'
    list_news = []
    with open(file_txt, 'r') as myfile:
        list_news=myfile.read().split('\n')

    self.value = list_news[0]
    self.items = list_news
    self.editable = True
    self.enabled = True
    self.dropdownWidth = 'WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW'
    self.width = 'WWWWWWWWWWWWWWWWW'

User can see the latest new in a combobox's window here self.value = list_news[0]. Other news are in a dropdown list.
The refresh button updates this list.
But there one thing I would like to add:
Auto-update - It would be much better if news are refreshng automtically after text file is edited. Looks like writing some kind of timer but it probably can interrupt geoprocessing tools if they are launch.
Any thoughts?


texts:
I would know if there's a way to export qgis data to mapserver (Mapfile).
In previous version of Qgis there was a plugin called "Export to Mapserver", now I can't find anything...


texts: Adding delimited text file PyQGIS WKT (pto1 pto2, pto3, pto4)

texts:
I have a tab separated text file

N_linea Punto1  diametro SDR    wkt_geom

The WKT contains expressions like this:

MultiLineString ((415120.8792 1126811.8435, 415124.8703 1126802.8395))

I have built the following expression:

fn4="file:///E:\DOCS\Manolo\Senara\SIG\Python\ejemplo1.txt?delimiter=%s&wktField=%s&useHeader=no&crs=epsg:5367&decimal=%s"%("\t","wkt_geom",".")
vlayer = QgsVectorLayer(fn4,'ejemplo1','delimitedtext')

# Compruebe si la capa es válida
if not vlayer.isValid():
     print ( "Capa no cargada" )

But its doesn't work.

Can somebody help me?


texts:
I am learning ArcGIS so there is a lot I still need to learn. I created a map in ArcMap and want to insert this map on my blog. Basically, I want to embed it. But all I can find is how to embed a map I make on ArcGIS On Line.

How do I take this map (mxd extension) and put it on my blog?

I did upload it in to my content on line if that is needed.


texts: Where is the pdf of the US Census data stored that contains all the codes?

texts:
I'm working with US census data and I can't locate the documentation that explains all of the codes (e.g. P01001 etc) that is used to describe the attribute tables in the shapefiles.

I haven't been able to find it on the www.census.gov site and it's tricky to search for if you forget the exact name (which I have!).

Thanks.


texts: Deleting cursor used in SearchCursor within dictionary comprehension?

texts:
If it is best to open cursors using a with statement to ensure it is deleted, like so:

with arcpy.da.UpdateCursor(fc,fields) as cursor:

Then, if a cursor is used as the iterable in a comprehension like so:

d = {k:v for (k,v) in arcpy.da.SearchCursor(fc,fields)}

Is it necessary to delete the cursor after using it in the comprehension?


texts: No export dialog on QGIS 2.8 and 2.10 with Mac OS X Yosemite?

texts:
I'm trying to work out the map making tutorial here: http://www.qgistutorials.com/en/docs/making_a_map.html

When I try to export an image or pdf or even print the map I built in the composer, I receive no response, no dialog, nothing.

I tried QGIS 2.8 and 2.10. My computer is a Mac mini with OSX Yosemite and 4GB RAM.
I couldn't find any log files to debug or anything.


texts:
I'm just starting with using xarray for working with n-dimensional NetCDF datasets. I particularly like the techniques for slicing using both indexes and labels (isel and sel):

import xarray as xr
ds = xr.open_dataset('/path/to/data.nc', decode_times=False, chunks={'time': 1, 'depth': 1})
v = ds['my-variable'].isel(**{'time': 0, 'depth': 0}).sel(**{'lat': slice(-90,90,10), 'lon': slice(40,-80,5)})

This works great if my longitude slice is increasing (-80° to 40°), but not if I want the 'wrap' version of that, which crosses the antimeridian (40° to -80°), as in my snippet above. For example:

>>> v = ds['my-variable'].isel(**{'time': 0, 'depth': 0}).sel(**{'lat': slice(-90,90,10), 'lon': slice(40,-80,5)})
>>> v['lat'].shape
(0,)

Yet:

>>> v = ds['my-variable'].isel(**{'time': 0, 'depth': 0}).sel(**{'lat': slice(-90,90,10), 'lon': slice(-80,40,5)})
>>> v['lat'].shape
(1501,)

The only difference is 'lon': slice(-80,40,5) (returns data, but not the data I want) vs 'lon': slice(40,-80,5) (returns no data).

What is the best way to slice with longitude spanning the antimeridian with xarray?


texts:
I'm trying to change the datastore backup location to our storage server but i get an error saying "There is a database backup process running"

A bit of context: I just restarted the machine and tried to change it's location but i got this error. I do not have a schedule for backups set.


texts:
I have much amount of raster tiles with hillshaded relief, that I've tiled using QGIS (Qtiles). And I'm trying to import these raster tiles into PostGIS. I have searched about my question but found only cases connected with importing rasters into Postgis (raster2pgsql) or tiling rasters in Postgis.
I've tried to use Geoserver (Build an image pyramid and load them to Geoserver), but it's necessary to retile (gdal_retile) initial raster and the result differs from Qtiles (gdal_retile split image by other parameters and assigns other names to tiles, not as slippy map tilenames format).
Further I would like to add tiled rasters on my map canvas in QGIS using TileLayer Plugin (This plugin can render only tile maps in the tile format of Slippy Map).
Has anybody an idea, how to import tiled raster?
Sooner or later I wonder it would be possible to add my tiles from PostGIS in QGIS and create beautiful maps:)


texts: Convert image from WMS service to Shapefile

texts:
I have a layer on ArcGIS that I want to convert to a Shapefile. This layer was created from a WMS server, so it's an image. The link to this shape is this one https://www.arcgis.com/home/webmap/viewer.html?webmap=64ca041031d0429e862433f6cc5d0cd1.

Is there a way to do that?

I've got this layer from a WMS server.


texts: Showing WMS layer data and marker popup simultaneously in Leaflet

texts:
I need to show WMS layer information and if there are some marker
or other layers at the same coordinate, it should show both
data of WMS layer and marker information.
But when marker covers wms layer, click would not trigger getfeatureinfo
to get WMS data. Is there any method to show both?
My marker:
L.marker([lat,lng], { icon: icons }).bindPopup(
         '

test

context
'
         ).openPopup();

I write a sample on codepen:
https://codepen.io/jerry820428/pen/zYKRERE
I want to trigger map.on('click') event when click the marker, that means both alert and popup would show on web.


texts: Get array of LatLngs from ArcGIS feature layer polyline using Esri-Leaflet

texts:
Leaflet has a method built into the polyline class to return an array of all LatLng coordinates of the line. It would look something like:

var latlngArray = polyline.getLatLngs();

Esri-leaflet, the Esri plugin that allows for interaction with ArcGIS Online and ArcGIS REST services has a separate class--Layer--that, it seems, it uses for all hosted feature types--points, lines, polygons, etc. Used in Esri-leaflet, it's constructed with L.esri.featureLayer.

I'm essentially trying to take the latitude and longitude of the feature vertices and perform a custom transformation on them point by point before placing them on the map without altering their values on the server. By using the pointToLayer option I've been able to retrieve and manipulate the latlng values for points. This would be fairly simple if I could call .getLatLngs() on the feature layer.

Is there a way I can do something similar with a polyline?


texts:
I am currently deving a java application using spring data JPA, postGIS, Hibernate, and geoTools. I have a controller GET method that takes in a query string as a parameter to be used to determine if Point objects in my data base are within the specified area passed in with the GET call. My happy path goes as follows: Get request is made -> query string is a GeoJson -> controller sends that string to a service level -> service level calls repository -> repository uses Spring data JPA to perform this query:

SELECT * FROM Shop
WHERE st_within(shop.point_geom,
                st_setsrid(st_geomfromgeojson(:input), 4326)) = TRUE

now this works fine and dandy, and I am now in the testing phase. What I am trying to test currently is whether or not this query is safe from SQL injection. The only info I can find on the web when researching geomFromGeoJson and sql injection is over a node.js ORM library. So would anyone with java and postGIS experience be willing to send me in the right direction?


texts:
How do I integrate Google Earth into my website?

I have done a lot of researching on it but nothing helps me out.

I want to plot some lat, lon stored in MySQL database into Google Earth. As  I understand Google Earth takes only KML or KMZ files.

So, I have to convert this files into KML or KMZ which can be done but I am stuck here, i.e at plotting this file into Google Earth.


texts: multiply range of value NDVI of Modis product in Google Earth Engine

texts:
Modis product have range of value NDVI from -2000 to 10000, but I need this range of value modify on range from -0,2 to 1
This is my code for finding NDVI in region:

var California = ee.Feature(    // California.
    ee.Geometry.Point(-119.37744140625,37.62815420124975),
    {label: 'California'});
var Utah = ee.Feature(  // Utah.
    ee.Geometry.Point(-111.5386962890625,38.1120855331916475),
    {label: 'Utah'});
var Coloredo = ee.Feature(  // Coloredo.
    ee.Geometry.Point(-106.6827392578125,38.98844856696302),
    {label: 'Coloredo'});
var sites = new ee.FeatureCollection([California, Utah, Coloredo]);
Map.addLayer(sites)
var collection = ee.ImageCollection ('MODIS/MOD13Q1')
  .filterDate(ee.Date('2012-01-01'),ee.Date('2014-12-31'))

//function to create mask from SmmaryQA
var maskQA = function(image) {
  return image.updateMask(image.select("SummaryQA").eq(0));
};

var goodCollection = collection.map(maskQA)
Map.addLayer(goodCollection)

//var nas= googCollection.multiply(0.00001)
//var evi1 = function(evi){
  //return evi.updateMask(goodCollection * 0.0001)
//};
//var areaImageSqKm = goodCollection.multiply(0.00001);
//var fallowedArea = fallowed.multiply(areaImageSqKm);
//var evi2 = collection.map(evi1)

var NDVITimeSeries = ui.Chart.image.seriesByRegion(
    goodCollection, sites, ee.Reducer.mean(),'NDVI', 5000, 'system:time_start', 'label')
        .setChartType('ScatterChart')
        .setOptions({
          title: 'Temporal development of MODIS product',
          vAxis: {title: 'NDVI'},
          lineWidth: 1,
          pointSize: 1,
        });

print(NDVITimeSeries)

How do I recalculate the value range?


texts: OpenLayers 4 remove features.getFeatures() sort array on change

texts:
I add the function drag on a feature that I draw, but OpenLayers 4 seems that when you modify a feature, the new index of the one you modify now is different.

How can I remove that function from the core? or exist an alternative to prevent this?

This is what I use to add the drag function.

$("#markdrag").click(function(e) {

  e.preventDefault();

  var sel = document.getElementById('tlfeature');
  // get ID of the current marker
  var ids = sel[sel.selectedIndex].id;
  var dragInteraction = new ol.interaction.Modify({
    features: new ol.Collection([Msource.getFeatures()[ids]]),
    style: null
  });
});

Where IDS is the index of the feature, but if I draw 2 features and drag the 1st at the end of the interaction the index is now 1 and not 0.

I need to work on Index because when I draw a marker I have a function that:

populates the drop-down menu with the marker (name = Marker + source index)
add a Textarea (bind to the marker ID(source index) so when you change the marker you have a related Textarea)
I'm working on this events to create all of these.

drawLayer.on("change", function(){
  // remove the interaction when you plot one marker
  map.removeInteraction(draw);
});

// occurs when you finish to draw the current element
draw.on("drawend", function(){
  // function to create everything
  drawing();
})

here a screenshot of how it looks


texts: Applying custom Google map style in OpenLayers2?

texts:
Recently I stumbled upon this interesting article showing potential of adding custom styles to Google Maps. Some examples of styled maps can be seen here and you can design your own from scratch here.

I'd like to apply 'greyscale' theme to my OpenLayers base map:

Style description according to Google demo would look somehow like:

var styles = {
  'Greyscale': [
    {
      featureType: 'all',
      rules: [
        {saturation: -100},
        {gamma: 0.50}
      ]
    }
  ]
}

My Google map in OpenLayers currently looks simply like:

var gmap = new OpenLayers.Layer.Google("Google Streets",
    {
    'numZoomLevels': 20,
    'sphericalMercator': true}
);

How could I apply greyscale theme to my map?


texts: One layerswitcher option to open two wms layers

texts:
I have two WMS layers Martello_Towers and Martello_Towers_Range. Rather than have two options in Layerswitcher I would like one option to control both layers. They are both in the same projection. I've tried obvious things like layers: "egm715:DLR_Martello_Towers" + "egm715:DLR_Martello_Towers_Range", or trying to combine them in a variable.

I've seen the solution at Working example to group layers in LayerSwitcher of OpenLayers 2? But grouping them isn't what I'm after.

// Martello Towers
    dlr_martello_towers_wms = new OpenLayers.Layer.WMS("DLR Martello Towers", "http://localhost:8080/geoserver/egm715/wms",
        {
        layers: "egm715:DLR_Martello_Towers",
        transparent: true
        }, {
        projection: "EPSG:3857",
        opacity: 0.7,
        visibility: false
        }
    );
    dlr_mtowers_range_wms = new OpenLayers.Layer.WMS("DLR Martello Towers Firing Range (WMS)", "http://localhost:8080/geoserver/egm715/wms",
        {
        layers: "egm715:DLR_Martello_Towers_Range",
        transparent: true
        }, {
        projection: "EPSG:3857",
        opacity: 0.4,
        visibility: false
        }
    );


texts: Creating Main and Secondary Map in QGIS?

texts:
In QGIS I need to generate two maps on one, I'm aiming to have a large map covering a large area in Europe and in the top right corner place another map zoomed in to a specific country.

Does anyone know the method to do this?

I have seen it mentioned but have not been able to find a tutorial.


texts: Print Composer rotates map and labels stay unrotated using QGIS 2.8.3

texts:
I have seen these questions regarding label rotation and map rotation via the print composer. One of them explains that the labels are rotated with the map, which I am looking for but am unable to get working for QGIS 2.8.3.

This first image shows the labels correctly placed, in the case where I have set my print composer map rotation to 0. They are set on the perimeter of the land parcels.

The second image shows what happens when I set my map rotation (270) to fit the map contents correctly into the desired paper size. The labels stay where they were, while the map rotates. Adding 270 as the rotation parameter on the labeled layer has not helped.

This is how I set up my labels:

This is how I rotated the print composer map:

Not sure if this could have anything to do with it, but the labels are a concatenation of two fields (e.g. concat("field1", "field2")).
Edit : This doesn't seem to make a difference for my data.


texts: Best way to assign points to nearest roads in postgis?

texts:
I'm trying to implement a simplified type of dasymetric mapping for census data. I've downloaded the Census's American Community Survey individual-level data and randomly assigned every household to a point within a block group. Now I want to move these random points to the nearest road. I've downloaded the OSM data and loaded it via osm2pgsql. So I have two tables:

dade_random_points: a point for each household. 'wkb_geometry' is the geo field.

dade_planet_osm_roads: a linestring for every road. 'way' is the geo field.

(By the way, I'm doing a proof-of-concept with just Miami-Dade County for right now.)

After reading
How to get the nearest point on a linestring to a given point?
and
http://www.postgis.org/docs/ST_ClosestPoint.html

I wrote this enormous, multi-nested query. It's still churning on my laptop, but it seems to work when I put in 'limit' statements to do smaller pieces.

Surely there has to be a better way? (Or maybe there's a postgis dasymetric library out there somewhere that I haven't been able to find?)

drop table if exists dade_points_on_roads cascade;
create table dade_points_on_roads as
select
  table4.id,
  table4.osm_id,
  table4.geoid10,
  table4.name,
  ST_ClosestPoint(
    ST_Transform(table4.way, 4326),
    ST_Transform(table4.wkb_geometry, 4326)
    ) as point_on_road
from
  (
  select
    --table3.*,
    points.*,
    roads.*
  from
    (
    select
      table1.id,
      min(table1.distance) as distance
    from
      (
      select
        p.id,
        r.osm_id,
        ST_Distance(
          ST_Transform(r.way, 4326),
          ST_Transform(p.wkb_geometry, 4326)
          ) as distance
      from
        dade_planet_osm_roads as r,
        dade_random_points as p
      where
        ST_DWithin(
          ST_Transform(r.way, 4326),
          ST_Transform(p.wkb_geometry, 4326),
          500
          )
      --limit 1000
      ) as table1
    --order by distance asc
    group by table1.id
    --limit 10
    ) as table2,
    (
    select
      p.id,
      r.osm_id,
      ST_Distance(
        ST_Transform(r.way, 4326),
        ST_Transform(p.wkb_geometry, 4326)
        ) as distance
    from
      dade_planet_osm_roads as r,
      dade_random_points as p
    where
      ST_DWithin(
        ST_Transform(r.way, 4326),
        ST_Transform(p.wkb_geometry, 4326),
        500
        )
    --limit 1000
    ) as table3,
    dade_planet_osm_roads as roads,
    dade_random_points as points
  where
    table2.id = table3.id
    and table2.distance = table3.distance
    and table2.id = points.id
    and table3.osm_id = roads.osm_id
  ) as table4
;


texts: labeling feature based on defined Value Map in QGIS?

texts:
I have some defined Value Maps as .csv and I want to label features according to this definitions. But when I use simple label expression, labels are "raw values" instead of "description values" - ignore defined Value Maps.

Is there some way to label features correctly?

As a best option, I need to build an expression with several attributes to label like this:


texts: How to PGRoute from OpenLayers via PostGIS/PostgreSQL

texts:
I need to route a shortest distance for a map which I have loaded from a PostgreSQL by means of JSON file. I can project the map in my browser and I can identify the linestrings. For a particular linestring I wanted to check whether distance is calculated or not. Soon after, I would like to check among the different linestrings(nearest node). All I want is after marking start point and end point that route would calculate a distance. Here I could get vertices of a point when clicked.
Data I am having is a JSON file and PostgreSQL Server/DB, JScript, OpenLayers.. And moreover, I would like to display attributes over the linestring from the JSON file properties. Is this possible. Please help me out. I got stuck for the next step.

Thank you


texts: How can I create a grid cell map based on two other grid cell map?

texts:
I have two grid cell maps:

Species per grid cell
Sample events per grid cell

I need a map which shows the Species per Sample event per Grid cell, basically the map that results from dividing Item 1 / Item 2.

Is this possible with DIVA-GIS?  If so, how?


texts: Clustering of points based on 1 or 2 attributes

texts:
In QGIS:

I have data of sightings of a particular animal that has been mapped as points. Some of these may be repeated sightings. I've classed the sightings according to 'SightCode' which represents the number of adults and juveniles in the sighting. I also have the Date of the sighting by YYMM.

For example, here I show the symbols as older (start of the year) to newest (recent month), and labels for SightCode.

How can I cluster the points so that they are grouped by proximity and attributes?

Ie. Show only recent sightings after January 2019 ~ 1901, then group those by SightCode and proximity so that sightings within say 1km of each other that are 1 Adult 3 Juveniles ~ 1A3J are only shown as 1 point and not x# of points.

The cluster point cluster symbology allows the symbols to show without the recent timing set when zoomed in, but when zooming out it also clusters all points without classifying those according to SightCode (it just lumps them all as a number). Attribute based clustering doesn't seem to take distance into account. I can't seem to get concave hull to work, I just get errors so not sure if that is the right tool anyway.

Any other ideas?

Edit 1 8/4/20: I tried DBSCAN as the first step but it's grouping a large number of points together that I would like to have seen separation with. See below. Where individual points are far apart, they were still clustered as one, because individual points were close... (green points). How to separate these out based on distance before progressing to the next steps?


texts: How to check if feature class or table contains field with specific name before adding it?

texts:
Im trying to write a script that finds out if the shapefile has a specific field and if not  to add the field. I get it to show me the field, but the loop goes through each field, so it would create a new field each time the specified field is not there. But if it's theres I just want it to say it is there and if it's not to create new field. My code so far just says:

"not filled in yet"
"not filled in yet"
"not filled in yet"
"cities.shp"
"not filled in yet"

(prints out like this cause there are five fields)

My code so far:

fieldList = arcpy.ListFields("cities.shp")

for field in fieldList:

if field.name == "CAPITAL":
    print "cities.shp"

else:
    "then add new field"


texts: Unable to classify multiband raster in ArcGIS

texts: I am trying to classify a multiband raster in ArcMap 10.4. I have created composite band of multiple bands using composite bands tool and given it as input for maximum likelihood classification. I have created signature file of ROIs on the same. I am getting ERROR 010108 that the number of bands in the signature file (1) is less than the selected bands in the stack (10). Is there any other way to resolve this issue?


texts: WMSLayer not showing, ArcGIS JavaScript API

texts:
I've started to dabble in the JavaScript API for ArcGIS and I am having an issue with a layer I want to display. It's this WMS Layer:

In the following code (mostly taken from the ESRI tutorial here), I can create the basemap just fine, however the WMS layer doesn't populate. Given the WMSLayer help document here, it appears that I can just declare a variable for a new WMSLayer and add the URL. That doesn't seem to work. I saw some suggests in this thread, about removing the 'request=GetCapabilities' portion of the URL and I've played around with a few other suggestions such as adding the layer to the map after I've declared it (map.addLayer(layer)), but nothing seems to populate. Given that I am fairly new with JavaScript, I'm sure I'm missing something simple.

What am I doing wrong?

Also, when the map opens it is zoomed to an area around Hudson Hope BC. The WMS Layer should show show some hatched polygons North East of Hudson Hope along the North side of the #29 highway.

<!DOCTYPE html>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Map</title>

<link rel="stylesheet" href="https://js.arcgis.com/3.27/esri/css/esri.css">


texts:
I am trying to connect source and destination points with the hub lines tool in MMQGIS. I have gone through the other posts on this subject but couldn't figure out what I am doing wrong.

I have succeeded doing so before in a different school project and I can't understand why it is not working now. The tables have pretty much the same fields as the last time.

The 2 tables are the same, but saved once as source and once as a destination.
I will add screen shots of the fields and the hub lines application window and maybe someone will see what am I doing wrong.


texts: Converting huge multipolygon to polygons

texts: I have a shapefile with some huge multipolygons, with 100.000's of parts. What would be the easiest way to split them to singlepart polygons? I'm looking for something like QGIS ”Multipart to singlepart” function, but the file is to large for QGIS to handle. I'm guessing that there is probably already some Python module that can do it for me. Any tips?


texts: Cannot run "Create Fishnet" tool in ArcPy

texts:
I've been trying to run an ArcPy code which creates a fishnet for sampling.
Everything in the code works fine, but when it gets to arcpy.CreateFishnet_management(), it stops running.
I've already checked the documentation of ArcGIS Desktop about this function, and I don't know what I'm missing.
The error says that there is no value assigned to parameter origin_coord nor to y_axis_coord.
I've checked the documentation about this and in the part that describes template parameter it says:

Specify the extent of the fishnet. The extent can be entered by specifying the coordinates or using a template dataset.

My problem is that, since I'm specifying the template to be the same as the feature, I'm leaving those parameters (origin_coord and y_axis_coord) empty, but the documentation says I could do so.
Here is the code:
# coding utf-8
import arcpy

arcpy.env.overwriteOutput = True
ws = 'D:\Projeto_VANT\SIG\proc_parc.gdb'
arcpy.env.workspace = ws

arcpy.CreatePersonalGDB_management('D:\Projeto_VANT\SIG', 'output')
outpath = 'D:\Projeto_VANT\SIG\output.mdb'

talhoes = r'teste'

estados = ('SP', 'MG')
florestas = ('PROPRIA', 'PARCERIA')

arcpy.MakeFeatureLayer_management(talhoes,
                                  'talhoes_layer',
                                  """ "ESTADO" IN {} AND "FLORESTA" IN {} """.format(estados, florestas),
                                  ws)
arcpy.FeatureClassToFeatureClass_conversion(in_features = 'talhoes_layer',
                                            out_path = outpath,
                                            out_name = 'talhoes1')
talhoes1 = r'talhoes1'

arcpy.AddField_management(talhoes1, 'CONCAT_T', 'TEXT')
arcpy.CalculateField_management(talhoes1, 'CONCAT_T', """ [ESTADO] & "_" & [CODIGO] & "_" & [TALHAO] """, 'VB')

list_of_fields = [f.name for f in arcpy.ListFields(talhoes1)]

with arcpy.da.SearchCursor(talhoes1, ['CONCAT_T', 'AREA']) as tal_cursor:
    for x in tal_cursor:
        arcpy.MakeFeatureLayer_management(talhoes1,
                                          'layer_{}'.format(x[0]),
                                          """ CONCAT_T = '{}' """.format(str(x[0])))
        arcpy.FeatureClassToFeatureClass_conversion('layer_{}'.format(x[0]),
                                                    outpath,
                                                    'Layer_{}'.format(x[0]))
        arcpy.env.workspace = outpath
        talhao = r'Layer_{}'.format(x[0])
        arcpy.Buffer_analysis(talhao,
                              'negBuf40_{}'.format(x[0]),
                              -40)
        negBuf_tal = r'negBuf40_{}'.format(x[0])
        arcpy.CreateFishnet_management(out_feature_class = 'Fish_{}'.format(x[0]),
                                       cell_width = 22.6,
                                       cell_height = 22.6,
                                       number_rows= 0,
                                       number_columns = 0,
                                       labels = True,
                                       template = negBuf_tal,
                                       geometry_type = "POLYGON")

        print('Talhao {} succesfully extracted!'.format(x[0]))
        arcpy.env.workspace = ws

And here is the error message:
Traceback (most recent call last):
  File "D:/ArcPy_Classes/Scripts/sampling_sig.py", line 51, in <module>
    geometry_type = "POLYGON")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\management.py", line 17024, in CreateFishnet
    raise e
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Fishnet Origin Coordinate : Value is required
ERROR 000735: Y-Axis Coordinate : Value is required
Failed to execute (CreateFishnet).


texts: Visualizing extra bytes from LAS 1.4 in Potree?

texts:
I was wondering if it is possible to visualize the information that can be stored in the extra bytes of the LAS 1.4 file. This could be really helpful for validating features that have been calculate from the point clouds and stored in the extra bytes. The features are written into the .las files with laspy (https://pythonhosted.org/laspy/tut_part_3.html)

I know that it is possible to work/see them in Cloud Compare and LAStools, but it would be faster to view them in a Potree viewer.


texts: Syntax for adding GeoServer / GeoWebCache WMTS or TMS tiles to QGIS as XYZ Tiles layer

texts:
I am trying to add tiles from a GeoServer instance (using GeoWebCache) as an XYZ layer to a QGIS project.

The demo map on the server is here:

https://gis.lmi.is/geoserver/gwc/demo/LMI_Kort?gridSet=EPSG:3857&format=image/png

There are at least two URLS where I can access tiles individually:

https://gis.lmi.is/geoserver/gwc/service/wmts?layer=LMI_Kort&style=default&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=9&TileCol=299&TileRow=408
https://gis.lmi.is/geoserver/gwc/service/wmts/rest/LMI_Kort/EPSG:3857/9/408/299?format=image%2Fpng

The server also provides a TMS endpoint: https://gis.lmi.is/geoserver/gwc/service/tms/1.0.0

I have tried variations of each of those as XYZ sources in QGIS, substituting {z}, {x} and {y} in the place of 9, 408 and 299.  I have also tried {-y}, to see if that works.  The projection for the project is 3857.  In all cases, I can add the layer to QGIS but nothing happens on the map canvas.

What is the correct connection string to use?

Note: I am able to add the layer as WMTS, but there are issues with the rendering.  I wanted to see if XYZ tiles would be better.  See Image quality and aliasing effects in GeoWebCache WMTS tiles in QGIS for details.


texts: Shapefile From Excel Sheet Crash When Selected Spatialy or By Attributes

texts:
Using ArcGIS 10.2, I am receiving an Excel sheet, on a daily basis, which contains 105 columns(Fields) and includes has X and Y values.

For whatever reason (which I cannot understand) all data types in the sheet were formatted as "Currency" so I run a Macro to change all values reformat the field as:

"@", "0" , "0%" and finally "0.000000" for X and Y column before adding the sheet to ArcMap.

I use the Add Data --> Add XY Data... method to add the Sheet to ArcMap
I then Use Data--> Export Data --> all Features to export as a shapefile.

Now after the process shapefile automatically can be added to map I have all points on the map and the table shows all values which were in the Excel file BUT whenever I try to Select Points by Select Feature tool or Select From Table the ArcMap Crashes.

Selecting by Attributes also does not get any Unique values!

And finally after closing the map I am not able to add the shapefile into Map again.

Can you please let me know what may cause such an issue?


texts:
I'm trying out a mixed environment here at work with PostGIS and ArcSDE together.

I'm having some problems creating feature classes with custom SRIDs. I imagined that all that I needed to do was update spatial_ref_sys table, but it did not worked also.

Any tips on how to achive this with custom SRIDS? With normal srids it's working just fiiine.

Thanks


texts: Apply symbology to raster working in Data and Layout view but won't export to jpg correctly

texts:
I'm trying to export a series of jpg maps by displaying and symbolizing raster layers one at a time. The Data View and Layout View in ArcMap 10.7 correctly reflect the symbology of the .lyr file I want to use, but when I export the image, the symbology of the raster is a bunch of randomly chosen colors, and there is no consistency between images (e.g. a whole new set of colors is chosen each time). I'm using ArcPy within the ArcMap scripting box, not doing standalone python.

import arcpy
from arcpy import env
from arcpy.sa import *
from arcpy import mapping
import os

#variables to look through
folders = ['folder1', 'folder2','folder3']

scn_no = range(len(folders))
yearlist = range(2020,2110,10)

#make object out of map document (your .mxd file):
map_mxd = arcpy.mapping.MapDocument(r"C:\Users\MyDocuments\mymap.mxd")

#make object out of dataframe
df = arcpy.mapping.ListDataFrames(map_mxd, '*')[0]
#reference symbology layer file
symbfile = r'C:\Users\Folder1\mysymbology.lyr'

for i in scn_no:
    env.workspace = folders[i]
    sc = arcpy.ListRasters('*.tif')
    for y in range(len(yearlist)):
        year = yearlist[y]
        inras = sc[y] #set raster to visualize

        arcpy.mapping.Layer(symbfile)
        #load yearly rasters into map one at a time
        #creates temporary display file for each raster
        result = arcpy.MakeRasterLayer_management(inras, 'tempras.tif') #create temporary display raster, stored in Local app data file
        layer1 = result.getOutput(0) #make temporary display raster into a layer in the map document
        arcpy.mapping.AddLayer(df, layer1) #add the layer to the dataframe

        #apply symbology from .lyr file
        symb = arcpy.mapping.Layer(symbfile)
        arcpy.ApplySymbologyFromLayer_management(layer1, symb)
        arcpy.RefreshActiveView()
        print(y) #progress check

        #exporting the jpg
        x = str(inras)
        out_jpg = str(scenario[i]) + '_' + x.replace('.tif', '.jpg')
        outpath = r'C:\Users\MyDocuments\outfolder'
        arcpy.mapping.ExportToJPEG(map_mxd, outpath + "\\" + out_jpg, "PAGE_LAYOUT", 2400, 3000, 600) #width and height dimensions and resolution


texts: Calculating shortest route distances when FROM and TO are off road

texts:
I have a shapefile of ~10,000 groundwater wells, a shapefile of ~7 points of interest, and a comprehensive road network. I am looking to create a single distance value for each groundwater well that represents the shortest distance route to the nearest point of interest, by road.

My issue (other than being a GIS novice) is that both the groundwater points and the points of interest do not lie directly on the road network. There is a distance from each of these groundwater wells to the nearest road, then that point on the road to the section of road nearest to the point of interest, and then the distance to the point of interest. And I have 10,000 wells to do.

groundwater wells = X

Points of interest = tan O

I was curious how one of you experts might go about this?


texts: CAD to GDB import using ValueTable function

texts:
I have several CAD files (DWG) that I want converted to Feature Classes within a file GDB.
Each feature class will be based on a polyline attribute "LAYER" value, so I have a query filter applied before they get loaded into the GDB.

I think my script (Python 2.7) has a problem with there being no values being written to the ValueTable. Here's the script, followed by the error message - can anyone please help?

=================================

# Description: Imports and merges polylines from one CAD workspace into a single feature class

import arcpy
from arcpy import env

env.workspace = "X:/GEMS_vector_data/DWG_files_sites_floors/0011-test"
CADgdb = "X:/GEMS_vector_data/DWG_files_sites_floors/0011-test/CADToFeatures.gdb"

# Create a value table that will hold the input feature classes for Merge
vTab = arcpy.ValueTable()

# Step through each dataset in the list
for fd in arcpy.ListDatasets("*", "CAD"):
    LayerName = fd + "_level"
    # Select only the Polyine features for external walls
    arcpy.MakeFeatureLayer_management(fd + "/Polyline", CADgdb + LayerName, "\"Layer\" = 'AR_WALL_EXT'")
    vTab.addRow(LayerName)

# Merge the CAD features into one feature class
MergedFloorPlans =  "X:/GEMS_vector_data/DWG_files_sites_floors/0011-test/CADToFeatures.gdb/Floors01"
arcpy.Merge_management(vTab, MergedFloorPlans)

================================

Error msg

  Traceback (most recent call last):   File
  "X:\GEMS_vector_data\DWG_files_sites_floors\0011-test\import_CAD_to_FBDB_01.py",
  line 26, in
      arcpy.Merge_management(vTab, MergedFloorPlans)   File "D:\Program Files\ArcGIS\Server\arcpy\arcpy\management.py", line 3762, in Merge
      raise e ExecuteError: Failed to execute. Parameters are not valid. ERROR 000735: Input Datasets: Value is required Failed to execute
  (Merge).


texts: Adding RGB values to Laspy synthetic point generation?

texts:
What is the correct way to add RGB values to points made from scratch?
Laspy is working great for me so far. I want to add RGB values to synthetic points that I've generated. I am using 2 numpy arrays. The first stores all of the XYZ (floats) values. The second array stores the point data record (intensity, classification; Red, Green, Blue). There are only 1200 points and they classify fine. When I comment out the "RGB" the file is generated.
Code:
def makeLASfile(finishPoints,LASheader, valuesP):
    #From laspy
    print("Your Making LAS file")

    outfile = laspy.file.File("C:\\Users\\XXXXX\\Documents\\Programming\\Python Scripts\\Laspy\\Circleoutput.las", mode="w", header=LASheader)
    outfile.header.offset = LASheader.offset
    outfile.header.scale = [1.0,1.0,1.0]

    outfile.x = finishPoints[ :,0]
    outfile.y = finishPoints[ :,1]
    outfile.z = finishPoints[ :,2]

    outfile.intensity=valuesP[ :,0] #intensity
    outfile.flag_byte=valuesP[ :,1] #flag_byte
    outfile.Raw_Classification = valuesP[ :,2] #classification
    outfile.user_data = valuesP[ :,3] #user_data
    outfile.pt_src_id = valuesP[ :,4] #pt_src_id
    outfile.Red = valuesP[ :,5] #red
    #outfile.green=valuesP[ :,6] #green
    #outfile.blue = valuesP[ :,7] #blue

    outfile.close()

The issue is that I have something not formatted correctly for the RGB and I get the following exception:
> Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\laspy\base.py", line 1221, in set_dimension
    spec = self.point_format.lookup[name]
KeyError: 'red'

    self.set_dimension("red", red)
  File "C:\Program Files\Python37\lib\site-packages\laspy\base.py", line 1225, in set_dimension
    "not found.")
laspy.util.LaspyException: Dimension: rednot found.*


texts: Configuring partial word matching in AnswerWorks-Vantage Linguistics on ArcGIS Desktop and Server products?

texts:
Esri, like many companies, has licensed iSEEK AnswerWorks from Vantage Linguistics for natural language search of the ArcGIS Help system. At ArcGIS 10, Esri dropped the Microsoft Keyword indexing search function from the Help system. Unfortunately, Esri's default settings for the indexed AnswerWorks searches are "full word match" only.

Has anyone figured out how the AnswerWorks settings in ArcGIS can be modified to return "partial word match" searches?


texts: Data collector mobile app with mapping capabilities

texts:
At work we have a GIS solution platform with 50+ GB of data in a Postgres cluster. Almost all tables have spatial columns. We have several clients consuming this information for different needs.

I'm looking for the best mobile solution for field data collection and visualization.

There is an old question about this, but since it is 4 years old, probably a lot of things had changed.
Open Source equivalent to Collector for ArcGIS to use with QGIS/PostGIS?

To summarize, the main requirements are:
- Mobile app (Android mandatory, iOS non-mandatory)
- Base maps (OSM, Google, Bing, etc)
- View OGC mapping data (WMS, WFS, etc)
- View forms with specific information of every layer
- Capable of adding new geometries (point, polygon, polyline) to a layer, and adding specific alphanumeric data using an associated dynamic form. This data can hit an WFS-T service
- Work offline. That includes basemaps (like a local tile cache), and vector data
- If some data was collected offline, it need to sync that data with the service/database

And in top of that, some clients have very specific requirements for their mobile apps. For instance, to some of them, the normal data collection app is enough, but maybe another client have a procedure in the field that requires special features. So, the possibility of development is really welcome, may be via an SDK or something similar.

What are the actual alternatives to accomplish this?


texts: Determine overlapping points using a spatial filter in ArcObject

texts:
I have a point layer with thousands of points.  Using a spatial filter, I have to find out those points which are intersecting each other.  Then the  objectid's of the intersecting points should be displayed in a list box.

I'm using ArcObjects and C# and need a solution in this environment.

How should I approach this problem?


texts: Find overlapping area of each class in classified images

texts:
I have three classified satellite images, lets say 2005, 2010, and 2015.
All images are similar i.e. the same total area and same number of classes.

I want to output those areas where pixels of all three classification matches/overlap.

For example: Find pixels that is classified in "class A" in all three images.

Is there any way to do it in ArcGIS?


texts: Find duplicate point geometries in a shapefile

texts: How to find a duplicate point geometries in point shapefile (around one lakh geometries) using Python OGR/GDAL


texts:
I am learning how to create choropleth for Canada in  R. I am using hrbrmstr answer as a guide line.

How do I apply gSimplify selective to specific areas. For e.g. how do I apply it to Nunavut and not to the other provinces and territories. Without gSimplify the code is very slow and using it causes some gaps between provinces to appear.

Without:

With:

I know I could try to find a low res map to solve my problem but I am interested in seeing how to manipulate these spatial object.

My Code

 library(maptools)
library(rgdal)
library(raster)
library(rgeos)
library(ggplot2)
library(ggalt)
library(ggthemes)
library(viridis)
library(magrittr)

# as stated in the other answer, this is the same as your shapefile
can_adm <- raster::getData('GADM', country='CAN', level=1)

# make the polygons a bit less verbose
gSimplify(can_adm, 0.1, topologyPreserve=TRUE) %>%
  SpatialPolygonsDataFrame(dat=can_adm@data) -> can_adm

str(can_adm, vec.len = 0, max.level = 2)

# turn them into a data frame
can_map <- fortify(can_adm, region="NAME_1")

# use a gd projection for this region
can_proj <- "+proj=lcc +lat_1=49 +lat_2=77 +lat_0=40 +lon_0=-91.86666666666666 +x_0=0 +y_0=0"

# reproducibly simulate some data
set.seed(1492)
prov<- unique(can_map$id)
data_overlap <- data.frame(id=prov,
                     value=sample(100, length(prov)))

# plot it
gg <- ggplot()

gg <- gg + geom_blank(data=can_map, aes(long, lat))

# draw the base polygon layer
# gg <- gg + geom_map(data=can_map, map=can_map,
                     # aes(map_id=id),color="#b2b2b2", size=0.15, fill=NA)
# fill in the polygons
gg <- gg + geom_map(data=data_overlap, map=can_map,
                    aes(fill=value, map_id=id),
                     size=0.15)

gg <- gg + scale_fill_viridis(name="Scale Title")
gg <- gg + coord_proj(can_proj)
gg <- gg + theme_map()
gg <- gg + theme(legend.position=c(0.8, 0.5))
gg


texts: How to fill inn A, B, C ...Y, Z, A, B, ...Y, Z, A, B, and so on?

texts:
as a second part of a problem i am trying to solve. I need help to figure out how to fill in serial letters.. Starting at A.. going to Z and starting over at A again.. I have a tabel with numbers 1-600 and i want 1 to be A, 2 = B, .... 26= Z, 27 = A 28 = B and repeating like that....

I am useing field calculator in ArcGIS

Alternativley... how to create the numbers 1-26 over and over.. so.. 1, 2, 3, ...25, 26, 1, 2, 3.. and so on..

THX


texts: QGIS 3.4.8 Filter Expression for OSM values

texts:
I'm trying to complete the seemingly basic task of a filter select for a layer of OSM data pulled from https://download.openstreetmap.fr/extracts/africa/. It's an .osm.pbf which I added to my project as a vector layer. The file is 21.7MB.

The layer's attribute table contains an 'other_tags' column. In that column, some rows include the word 'power'; e.g.

"frequency"=>"50","cables"=>"3","voltage"=>"110000","power"=>"line"
"power"=>"generator","generator:source"=>"hydro"

I simply want to select all rows with "power" in this field. This should be the query:

other_tags LIKE '%power%'

I've also tried:

"other_tags" LIKE '%power%'
other_tags ILIKE '%power%'
"other_tags" ILIKE '%power%'
other_tags IS '%power%'
"other_tags" IS '%power%'

This is driving me crazy. I've read the QGIS docs and numerous Posts on StackExhange, so beginning to wonder if it's a QGIS bug.


texts: Is there a ArcSDE for non-production use available?

texts:
I am trying to enter the market for GIS.  I wish to test some of the things I have written against a ArcSDE server since that is what I used before I became unemployed and that is where my skill set is.

For programming/servers there is a multitude of options if you need windows servers or database rental.  Is there a ArcSDE equivalent?


texts: Why is it possible to annotate layer without being in edit session?

texts:
My colleague discovered that you don't have to be in an edit session to annotate a layer.

Are the annotations still saved to the database?

If, yes: HOW without an edit sesstion?

If no: Where are they stored then?


texts: Buffer and intersect using turf.js and leaflet

texts:
I have 2 geojson feature collections in leaflet. One of them is road and the other one is parcels. I want to calculate buffer for road and then intersect this buffer layer with parcels. How can I do this using turf.js and leaflet. I am a newby in both of them. I tried to write a little script but it does not work. Could you tell me what ı am doing wrong. Here is a little part of my code that I wrote so far:

  var buffered = turf.buffer(road, road.width, {units: 'meters'});
  var roadbuf = L.polygon(buffered, {style:myStyle}).addTo(mymap);


texts: Iterate feature classes to append a folder of shapefiles to their corresponding feature classes in a preset geodatabase template?

texts:
I want to make a tool with iterate feature classes that will take my shapefile folder and append each shapefile to it's corresponding feature class in a template geodatabase.

I have a folder with shapefiles "A.shp", "B.shp", and "C.shp" and a geodatabase with feature classes "A", "B" and "C".

The geodatabase needs to be a parameter because this is done to many different datasets.


texts:
I have to make multibuffer to a several shp's (30 or +) and with this code the it takes 30 minutes or more.

    import arcpy,time,glob,os
def multibuffer (probe,Zona_trab,nombarch3,recortes2):
    x=0
    bufdef = (Zona_trab,"\\bufferRing",time.strftime("%H%M%S"),".shp")
    bufferRings = ''.join(bufdef)
    if probe == 1:
        with open (nombarch3) as p:
            for x in recortes2:
                dtaring = p.readline()
                arquet, valbuf2, datperm= dtaring.split(",")
                valbuf2=float(valbuf2)
                a= valbuf2*0.3
                b= valbuf2*0.5
                c= valbuf2
                distances = [a,b,c]
                puntselec1a2 = (Zona_trab,"\\puntsele",x,".shp")
                puntsele2 = ''.join(puntselec1a2)
                print puntsele2
                print distances
                arcpy.MultipleRingBuffer_analysis(puntsele2,"capadeRingbuff"+str(x)+".shp", distances, "meters", "", "ALL")
        p.close
        wcard="puntsele*"
        try:
            dir=Zona_trab+os.sep+wcard+'.shp'
            flist=glob.glob(dir)
            arcpy.Merge_management(flist, bufferRings)
        except:
            print "error"

The code works, it have no errors, so it will work slow, but safe. My question is:

what would you do for speed up the process?

The first part of the program is done instantly, but this call:

arcpy.MultipleRingBuffer_analysis(puntsele2,"capadeRingbuff"+str(x)+".shp", distances, "meters", "", "ALL")

Make the stop of several minutes in the script.

With this new info, someone know how to speed up this part? Doing several MultipleRingBuffer at once or something like that? (I think is not posible to make that)


texts:
Possible duplicate

I have a question about Nominatim, but the OSM forum currently does not accept new registrations...

I want to limit my search results to a specific country, so I am using the following snippet (minimal example):

#!/usr/bin/env python3
import requests
import json
import pprint

#r = requests.post('http://nominatim.openstreetmap.org/', params={
#        'format': 'json', 'city': 'Athens', 'country': 'Greece'})
r = requests.post('http://nominatim.openstreetmap.org/', params={
        'format': 'json', 'q': 'Athens', 'countrycode': 'gr'})
result = json.loads(r.text)
pprint.pprint(result)

Using the general query and countrycode, the results are all of cities named Athens in the United States.
Using the structured request query, the result is as expected.

The wiki states that using countrycode limits the results to a specific set of countries.

I am aware that I can use the structured requests API instead of a general query, but I have some misgivings as it is labeled as experimental. However, my question is if countrycode is respected or is it me that is doing something wrong here?


texts: Problem in filling table of ArcSDE feature class in SQL Server 2008?

texts:
I have an ArcSDE point feature class and I add it to ArcMap 10.

After that I add some points to it and fill every field for all points in the attribute table and Save Editing.

However, the SQL Server table that related to the feature class is empty while the attribute table in ArcMap and ArcCatalog is full (as expected).

I checked the connection to the spatial database and that was correct.

How do I fill the table in SQL Server when the attribute table in ArcGIS is full?


texts: Renaming attribute/field names in GeoPackage Layer using PyQGIS?

texts: I need to rename the attribute field names in a GeoPackage layer by using Python QGIS 3.2.


texts: 'qgis: splitvectorlayer': wrong output directory

texts:
I have implemented the algorithm 'qgis: splitvectorlayer' in python and it works also, but the algorithm does not save the newly created shapefiles in the output directory, but in the input folder. Why?

import sys

from qgis.core import *
from PyQt4.QtGui import *
app = QApplication([])
QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
QgsApplication.initQgis()

# Prepare processing framework
sys.path.append('C:/OSGeo4W64/apps/qgis/python/plugins')  # Folder where Processing is located
from processing.core.Processing import Processing
Processing.initialize()
from processing.tools import *

input = QgsVectorLayer('C:/OSGeo4W64/_StreetGeneratorDev/tryouts/files/centre/cir/streets.shp', 'test', 'ogr')
output = "C:/OSGeo4W64/_StreetGeneratorDev/tryouts/files/centre/cir/singlefiles/"
field = "angle"

general.runalg('qgis:splitvectorlayer', input, field, output)


texts: How would I calculate point values relative to the values of points nearest them?

texts:
I have a layer of points that numbers in the tens of thousands. Each point has an attribute field with values measuring level of magnitude. I would like to compare the attribute value of a given point to the points around it. In order to see how relatively high or low the point value is for a given area, the comparison will only include points within a given distance.

Example: I am focused on a point with a value of 10. There are three points close to this point with values 5,7, and 12. The calculation I would like to see would be [(10-5)+(10-7)+(10-12)]/3 for an average difference of 2. I would want to know if the average difference was a negative number.

I would like to do this for every point in the layer so some level of automation is pretty much mandatory. The platform I have available is QGIS.

I remember something similar in a past project where I converted points to a raster but have been unable to duplicate this as I used ArcGIS for that. I am not sure I have the appropriate tools in QGIS to undertake this project.


texts:
I'm a new qGis user (just started yesterday) and I'm trying to find a solution to a problem.
I need to generate a 3D polygon starting from a list of points located in space, with X and Y coordinates and elevation value (these points are generated by a telemeter, used to map a landslide areas like mountains and hills).

I tried the Contour tool but it works only when I have just 4 points on my list (so that it says 2x2 grid). When I add more points it says "No regular grid" and clicking OK crashes qGis.
I also tried some Vector tools but all I can get is 2D polygons or a polygon with fixed altitude, not a polygon where every vertex has its own altitude.

Two images to explain the concept:

My 3D points:

What it should look like when having a lot of points:

https://image.shutterstock.com/z/stock-photo-white-abstract-polygonal-mountain-d-illustration-isolated-on-white-563125678.jpg

Is there a way to do it on QGIS?


texts: Masking LiDAR points to create DEM in ArcGIS Pro with ArcPy?

texts:
I have an irregular LiDAR point cloud dataset, so when I try to create a DEM or DSM, the points are connected across the irregular edges of the LiDAR point cloud.

I thought that creating a mask would help, but this doesn't seem to work. Here is my example code:

lasd = "mylasd.lasd"
arcpy.env.mask = "myMask" ## this is boundary of LiDAR point cloud
outname = "dem"
dem_layer = arcpy.CreateUniqueName('dem_layer')
arcpy.MakeLasDatasetLayer_management(lasd, dem_layer,class_code=classCodes,
                                     return_values=return_Vals)
arcpy.conversion.LasDatasetToRaster(dem_layer, outname, "ELEVATION", "BINNING AVERAGE LINEAR", "FLOAT", "CELLSIZE", 10, 1)
arcpy.Delete_management(dem_layer)

Using the mask doesn't result in any difference. Is the correct way to create the DEM and then, crop it? This seems more time-intensive, so I want to avoid this step if possible.


texts: Signing ArcGIS Add-In with a post-build event

texts:
I'm attempting to automate signing of an ArcGIS Add-In using a post build event in visual studio that triggers a batch file (which subsequently triggers ESRISignAddIn utility). Running the batch file manually through command prompt works fine, the Add-In is signed successfully. However if I attempt to run the batch file in the post-build event, it returns an error saying the Add-In file cannot be found. I've noticed that by the time the build process gets to the post-build stage, only the DLLs are created - the Add-In file is not, hence the batch file cannot find it. It appears the Add-In file is created AFTER the post-build event (illogical, I know).

I have tried adding the batch commands to the post-build event command line (in project settings > compile > build events), and have also tried adding this directly to the project file XML:

<Target Name="AfterBuild">
    <Exec Command="&quot;$(ProjectDir)Post_Build.bat&quot; &quot;$(TargetDir)my.esriAddIn&quot;" />
</Target>

Seems that 'post build' and 'after build' events are both executed before the esriaddin file is built, useless!

Has anyone had any experience working with post-build events and ArcGIS Add-Ins? I want to know if it's possible to force the Add-In file (my.esriaddin) to be created before the post-build event.

My last resort solution is to execute the build and then the batch file using a build runner (e.g. finalbuilder), but would ideally like to keep everything in the same project.


texts:
I have several compass bearings:

bTrue = 190°
b1 = 250°
b2 = 100°
b3 = 170°
b4 = 90°

I want to compare b1 - b4 and find out how close they are to bTrue. So bTrue is 100%. How much percent is then b1, b2, b3, and b4? 360°-180° would be 0%.

The use case is that have GPS locations with bearings that I am trying to match to road segments, where I also know the bearing. Besides the distance to the road I also want to consider bearing. b1 - b4 are the bearings of the road and bTrue is the bearing of the GPS point.


texts: Why use a database when you can have all of your data in javascript/openlayers?

texts:
I have a really simple and basic question.

First of all, I have to mention that I am pretty new to web applications and GIS. I am working on a web application using Openlayers, Postgresql/postGIS and pgrouting. I was wondering why use a database when I can insert all of my data into OpenLayers as Geometry Points, assuming I know the routing algorithms and I need only geometry points and linestrings?

What are the advantages of using a database in my case? Generally, what online GIS systems need a database?


texts:
I have lines that I would like to split at polygon boundaries. The line table is MULTI and the polygon table is MULTI and was derived from a MULTILINESTRING table that was buffered then unioned to create one geometry.

The pink is the polygon and the white lines are what needs to be split at the polygon boundaries.

This is the returned geometry after running my query. Note the missing geoms, both inside and outside of the polygon, relative to the first pic.

I am almost there but my query is not returning all the lines that are in my original table and I can't figure out why.

CREATE TABLE split As

WITH dmp_geom As ( -- used to dump from MULTILINESTRING to LINESTRING
SELECT (ST_Dump(multiline.geom)).geom As dmp_geom
FROM multiline
),

split_geom As ( --splitting dumped lines at polygon boundaries
SELECT ST_Split(t1.dmp_geom, t2.geom) As split_geom
FROM dmp_geom t1, unioned_poly t2
)

SELECT ST_CollectionExtract(split_geom, 2) As geom --select only lines
FROM split_geom;

My question is: how can adjust my query so that I will get all the features in my original table, just split at the polygon boundaries?


texts: Heat Map trouble: Is this a data formating problem?

texts:
I'm playing with the heat map plugin with QGIS. I've run through QGIS tutorial:
http://docs.qgis.org/html/en/docs/user_manual/plugins/plugins_heatmap.html,
using the airports data set as explained and I reproduced tutorial results.  I have a 600,000+ data set (five years worth) of police calls from Philadelphia, which I've reduces to 185 points (a day) for testing.  The Meta data for both sets is below although I've used both the dbf file and saved shp file as input.

For larger Radius settings (above about 0.1) I get a rainbow bulls Eye centered on but many time lager than my data set range.  For smaller Radius settings I get a uniform single color covering the data set range and transparent holes opening over (but not centered on) each data point.

I get just what I should with the Alaska data set.

General:

Storage type of this layer: ESRI Shapefile
Source for this layer: C:\Users\Gallery of Tools\Documents\GIS DataBase\Alaska\shapefiles\airports.shp
Geometry type of the features in this layer: Point
The number of features in this layer: 76
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries
Extents:
In layer spatial reference system units : xMin,yMin -4480198.52,1433525.80 : xMax,yMax 4615124.98,6502586.83
Layer Spatial Reference System:
+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs

General:
Storage type of this layer: ESRI Shapefile
Source for this layer: C:\Users\Gallery of Tools\Recovered from the Dell600GB\Image Catalog\EngravingsNMaps\Philadelphia\Police Incident\PoliceIncJune302012.dbf
Geometry type of the features in this layer: Point
The number of features in this layer: 185
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries
Extents:
In layer spatial reference system units : xMin,yMin -75.2515,39.9047 : xMax,yMax -74.9594,40.1226
Layer Spatial Reference System:
+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs

P.S. And another thing.  When I change the Radius setting, the cell size changes automatically.  Is this supposed to happen?


texts: qgis printcomposer: can I wrap text in attr table?

texts: I have some longish text attributes and when I try and put these on the map using the attribute table they get truncated.  Is there a way to get these long lines wrapped.


texts: How to add a new road to an existing pgRouting graph?

texts: I have an existing pgrouting network topology that I would like to add a road to.  The road is a linestring from a shapefile and will intersect several roads in the existing network.  Is there an easy way to add the road into 'ways' so it is segmented properly and new vertices are created at the intersections?


texts: How can I set QGIS "Random Points" density to less than 0,0001 (circa 100 meters apart)?

texts:
I have an input boundary vector layer (700 hectares); on it, I want to generate a set of random points (Vector/Research tools/Random points) with a reciprocal distance average of 233 meters, but the smallest density I manage to set is 0,0001 (which is, as it looks to me, an average of 100 meters distance).

Does someone have any clue?


texts: QGIS How to match the CRS for a 0,0 imported CSV file and match it with PWG file?

texts:
I have downloaded a png file 19200, 19200 pixels with a PGW world file that matches the png file to the real world coordinates.

I am developing an object detection algorithm to take this png file and export a bounding boxes on a csv file for the detected objects: e.g: building: 7279.0, 12082.0, 7285.0, 12084.0.

The only problem that the object detection does not care about the pgw file thus it only generates the bounding boxes related to the png file not the PGW file.

to view the results: I am using qgis, import the png file, then qgis reads the pgw file and display the image on its correct location on the map. But when I input the csv file with the bounding boxes it get displayed in the 0,0 to 19200, 19200 location instead of the real world coordinate system and there is no way to map these two after they get imported unless I delete the PGW file and convert the 0,0 to 19200,19200 coordinates to 0,0 to 19200,-19200 bu that means I can not view the map inside the world background.

Is there a solution for that?


texts: Making OGC WMS/WFS look like ArcGIS Server layer, including functionality?

texts:
Esri contacted me about this question. After a good talk the conclusion was that it is not wise to build a wrapper around WMS/WFS because of possible changes to the REST interface of ArcGIS Online later. If we want to use ArcGIS Online fully, we just have to use ArcGIS Server. Too bad that we also use OGC-services from external parties. Found no solution for that yet...

----original question----
Our organisation is interested in using ArcGIS Online. We already serve our spatial data using the OGC standards WMS/WFS using Mapserver. Unfortunately, ArcGIS online only works great if you use ArcGIS Server to serve your data. ArcGIS Online only supports the mapping funcionality of WMS, but not the 'GetFeatureInfo' functionality. WFS is not supported by ArcGIS Online at all.

Because migrating all our maps (800+) to ArcGIS Server will be time consuming and expensive I am searching for an alternative.

Do you know of any method to disguise our WMS/WFS services as if they were ArcGIS Server services? I'm thinking about a wrapper of some kind. In theory ArcGIS Online should than be able to use these services as if they were ArcGIS Server services.


texts: import qgis.core problem with QgsFeature and QgsGeometry

texts:
I've tried several previous answers to similar questions - no luck.

I run Win7. I installed QGIS 2.2.0 using the OSGeo4W 32-bit installer.

Problem 1) from qgis.core import * failed.
Solution 1) After everything related to setting Path and PYTHONPATH variables failed, I had to copy C:\OSGeo4W\apps\qgis\python\qgis to C:\Python27\Lib\site-packages (and yes, including C:\OSGeo4W\apps\qgis\python\qgis in both Path and PYTHONPATH did NOT work).

Problem 2) The above approach got the qgis.core import started, but resulted in the following error message related to QgsFeature and QgsGeometry:

Traceback (most recent call last):
  File "D:\Research\inhaca\OBIA\model_script.py", line 1, in <module>
    from qgis.core import *
  File "C:\Python27\lib\site-packages\qgis\__init__.py", line 35, in <module>
    from qgis.core import QgsFeature, QgsGeometry
ImportError: DLL load failed: The specified module could not be found.

Now I'm lost. I tried copying all files from C:\OSGeo4W\apps\qgis\include and C:\OSGeo4W\apps\qgis\lib to the respective (include and Lib) folders in C:\Python27 - still didn't work. I'm fumbling in the dark here, any pointers?


texts: Downloading only one band in Google Earth Engine without the RGB bands

texts:
I have calculted the NDVI of specific plot and download it in order to run analysis in QGIS. The image on GEE had only one band: the calculted NDVI, but whenever I open it on QGIS I have 4 bands: NDVI and the RGB bands. I would like to have only one band in the image.

Is there any way to download only one band and not to have the rendered image?

This is an example for how I have download image that has only band 4 and band 8 and QA60, but when I  opened it on QGIS I had also the RGB:

This is the code part the export the images:

for (var i in listOfNumbers) {
  var image = ee.Image(listOfImages.get(listOfNumbers[i]));
  var toexport=image.visualize({}).addBands(image);

//   // do what ever you need with image
  Map.addLayer(image, {}, i);
  Export.image.toDrive({
  image: toexport.toFloat(),
  description: i,
  scale:20,
  crs:'EPSG:4326',
  //maxPixels:1310361348,
  region:geometry.geometry().bounds()

});

}


texts: Call different functions when clicking on a map vs. clicking on a polygon in Leaflet

texts:
I have a map and I add a featureGroup to it. Then, I add some polygons to the featureGroup.
Now I want something to happen, when a polygon in featureGroup is clicked and something else to happen when a place on the map outside of the featureGroup to be clicked. This is what I have done:
var map = L.map('map').setView([52.51616, 13.31339], 11);
var featureGroup = L.featureGroup().addTo(map);

map.on('click',function(e) {
        console.log('clicked on map');
});

featureGroup.on('click',function(e) {
        console.log('clicked on polygon');
});

But when I click on a polygon of featureGroup, the consolereads

clicked on polygon
clicked on map

When I click on the map (outside of a polygon):

clicked on map

I want only the featureGroup's listener to be fired, when clicked on a member of that group, not the map's listener.
I use Leaflet 1.6.0


texts: Load PostGIS Layer with BLOB and use the form widget for binary fields (QGIS 3.6) not working

texts: I have tried to load a PostGIS layer containing a binary data field (BLOB, bytea) and then use the new form widget for binary fields (https://qgis.org/en/site/forusers/visualchangelog36/index.html#feature-new-form-widget-for-binary-blob-fields). The problem is, that the binary field will not be in the layers attribute table, so the widget can not be used/activated. In the QGIS database manager the field is visible in the table preview. Does anybody knows what is going wrong or what I am missing?


texts: ArcGIS Unfeasible output from ViewShed Tool

texts:
I have an observer point (VP3) from which a consultant viewed bird activity on a site. See illustration of the site (blue polygon) with a colored scale of terrain height AoD in m (grey rectangles added before posting and should be ignored):

It is necessary to provide an illustration of what area is visible from VP3 in order to show what bird activity the consultant could have observed.

In doing so the following are assumed:

(1) The consultant was 1.8m in height.

(2) The observer was looking for birds flying up to 20m above the ground.

It was decided to use the Viewshed (Spatial Analyst) tool. However (2) above requires a change to the input raster. This was achieved by using raster calculator to create a new raster = Terrain Raster + 20m. This raster was checked and appears correct.

Viewshed was then run with the following:

Input raster: Raster output from raster calculator = Terrain height + 20m

Input point or polyline observer features: A point feature class VP3 only.

Output above ground level raster (optional): Not entered.

Z factor (optional): not entered

Use earth curvature correctional (optional): FALSE (not checked).

The output is not as expected:

The pale green represents areas that are visible. Referring back to the picture showing terrain across site, there is a gradual slope from high altitude to lower altitude from South to North of the site. Given the lack of hills in between the viewpoint and the area of interest (within blue line) it would be expected that almost all of the site would be visible.

To illustrate this further, the area directly around VP3 is investigated. See VP3 and two points, A1 and A2:

Altitude has been obtained using the Identify tool:

A1: 238m
VP3: 240m
A2: 242m

Distances: A1 -> VP3 = 31m. VP3 -> A2 = 100m.

Considering the observer height of 1.8m and that features 20m above the ground are being observed, it is not feasible that A1 and A2 would not be visible from VP3.

What is the error in my understanding or my approach?


texts: Using two with statements with arcpy.da.SearchCursor()?

texts:
I often see code that is comparing 2 shapefiles where there needs to be 2 with statements in the same loop. In my head I always thought both with statements should be placed first before starting looping the rows in each cursor like:

with arcpy.da.SearchCursor(fc2, field4) as sCursor1:
    with arcpy.da.SearchCursor(fc1, field5) as sCursor2:
        for row1 in sCursor1:
            for row2 in sCursor2:
                #do stuff

However I have seen code that looks like this:

with arcpy.da.SearchCursor(fc2, field4) as sCursor1:
    for row1 in sCursor1:
        with arcpy.da.SearchCursor(fc2, field5) as sCursor2:
            for row2 in sCursor2:
                #do stuff

Purely just looking at this I would assume that the second version reopens the cursor for every row in sCursor1, and therefore the first method would be better. I have read http://preshing.com/20110920/the-python-with-statement-by-example/ and this suggests that :

  The above with statement will automatically close the file after the nested block of code.

Therefore it looks like I might be correct, however is there a preferred method of the 2 or another way that would be better, such as creating the cursors first and the using the del statements at the end?

Some timings on small, med, large data would be good if possible.


texts: How do I avoid altering the data range when writing a NumPy array into a TIF file with rasterio?

texts:
I'm using a machine learning model to automatically recognize (a specific type of) vegetation in RGB imagery. The output of this model is a binary NumPy 2d array, with '1' meaning vegetation and '0' meaning no vegetation. The output is basically a mask. For writing this array into a .TIF file, I use the Python rasterio library (see code below).
import rasterio as rs

[...]

tile_dest = rs.open(tile_path)

img = Image.open(tile_path)
img = np.array(img)

inference = inference_function(img)

inference_fname = output_folder_path / tile

with rs.Env():
    profile = tile_dest.profile

    profile.update(
        nodata=0,
        count=1)

    # Storing .tif image in original CRS
    with rs.open(inference_fname, 'w', **profile) as dst:
        dst.write(inference.astype(rs.uint8), 1)

This all works perfectly fine; I can add the .TIF file as a raster layer in QGIS. My problem, however, is that the raster layer has 2 values: 1 and 2. As you can see in the code above, the 0 value has already been assigned as 'nodata'. I do not want to have two values, because the resulting raster layer should be a mask of the vegetation find in the RGB imagery. The resulting mask, added as a raster layer in QGIS and overlaying the original RGB image, can be seen in the image at the end of this post.
I do not want to have two separate values (1 - black and 2 - white). Instead, I want to have one single value, representing the vegetation mask.
I think that I get the two values due to compression, but from what I've read in the rasterio documentation, the only types of compression available for .TIF files are LZW and JPEG which both could create 'new' values during compression. How do I avoid altering the data range during the writing of a .TIF file with rasterio?
EDIT:
I've also tried to change the type of compression, but both JPEG and LZW produce the same result. Setting the NBITS parameter to 0 also didn't help.


texts:
I am requesting a WMTS which does not number tiles from 0/0, but from some arbitrary given number. Is it possible to deal with this with openlayers 3?
I thought WMTS should have defined first tile of every tile matrix as 0/0, should not it?


texts:
I want to retrieve some satellite images with UV bands, but I don't know which satellites are providing UV bands and whether we can freely download them.
I have already downloaded Modis and Landsat images, but about other satellites I have no idea where to start. I need some hints about satellites that have UV bands in their products. The spatial resolution is not important at this stage.


texts:
I'm learning Open Street Map in order to try to retrieve a list of all cinemas in the world, in a country or in a city

I would like to know if I can do that with a REST query in Postman.

On overpass-turbo.eu I can see there is a way to do that. I see the informations I want to retrieve but I cannot tell how to create the query for Postman

On harrywood.co.uk it seems I can create the query but I must be doing something wrong. Dammit! I feel I'm so close!

I can see there are other questions like mine, but they are not about Postman, so I don't really see how can I use those information.

But I know what I want to do is possible because I can see the outcome at this URL:

I now know that there are 23.743 cinemas in the worls and if it's possible I would like to retrieve those information.


texts:
Trying to load layers from .SXF:

 QgsProviderRegistry::instance(qgisPluginPath);

   pLayerFromProvider = new QgsVectorLayer(
               filePath.toUtf8(),
               SL_LayerList.at(index.row()).toUtf8() ,
               "ogr");

   pLayerRenderer = new QgsSingleSymbolRenderer(
                    QgsSymbol::defaultSymbol(pLayer->geometryType()));

   pLayer->setRenderer(pLayerRenderer);

   if (pLayer->isValid()) qDebug("Layer is valid");
   else                   qDebug("Layer is NOT valid");

   pLayerSet = new QList <QgsMapLayer*>;
   pLayerSet->append(pLayer);

   QgsProject::instance()->addMapLayers( *pLayerSet );

 //pMapCanvas was created
   pMapCanvas->setLayers(*pLayerSet);
   pMapCanvas->resize(500,500);

   pMapCanvas->refresh();

Rectangle appears on widget only.
What's wrong?


texts: is there a gis web engine for displaying video on terrain?

texts:
i desire to display video on a globe surface on it's geographic position context.

i prefer an opensource solution for displaying the video on map elevation model in web GIS application, but could not found any example for this need.

i found a java-client application based on Worldwind GIS engine for video on terrain at http://goworldwind.org/demos/.

but did not found any web-based example.


texts: Descartes Labs Platform speeding up scenes.mosaic

texts:
We're hoping to download many Sentinel-2 mosaics in order to deploy a deep learning model on a large region. We currently use the following steps to construct and download images:
dltile = dl.scenes.DLTile.from_latlon(
    lat=lat,
    lon=lon,
    tilesize=250,
    resolution=5,
    pad=0
)
scenes, ctx = dl.scenes.search(
    aoi=dltile,
    products=["sentinel-2:L1C"],
    start_datetime="2019-05-01",
    end_datetime="2020-08-01",
    sort_field="acquired",
    sort_order="asc",
    cloud_fraction=0.01,
    limit=100
)
summer_scenes = scenes.filter(lambda scene: 5 <= scene.properties.date.month <= 7)
arr = summer_scenes.mosaic(
    bands="red green blue",
    ctx=ctx,
    bands_axis=-1,
    processing_level="surface",
    scaling="display",
    resampler="cubic"
)
img = Image.fromarray(arr.data)
img.save(image_filename)

The whole pipeline can be slow, particularly the call to mosaic. Our understanding is that the cubic resampling and conversion to surface reflectance slow things down, but we want to keep these operations ideally. Is there any way to speed this up without removing that processing?


texts: Do I need to deal with warnings about row count and spatial index to use pgRouting?

texts:
After read this nice post from underdark A Beginner’s Guide to pgRouting, although I still have some little problems, I think I can begin the "Creating a routable road network" stage right now.

I got a polyline shapefile already, but after I Add PostGIS Layers, I open PostGIS Manager and I don't know if these two red triangles would bother me later on:

There is a significant difference between estimated and real row count. Consider running VACCUUM ANALYZE.
No spatial index defined.

If they do, what can I do？


texts: Vertically fit an Open Layers map in a div

texts:
I've created an Open Layers map similar to this example I've mocked up:
https://codesandbox.io/s/seamlessly-repeating-vectorlayer-forked-igqti?file=/main.js
[EDIT: The above link now shows a commented solution]
The problem is, OpenLayers seems to base the minimum zoom on the width of the map - Which means if the container div is too wide, the map doesn't fit vertically and can't be zoomed out any further.
Is there a way to get around this so that my client can easily show the whole map vertically without having to constrain the horizontal width or increase the divs height?


texts: Intersect coordinates with spatial polygon with R

texts:
I get the shapeline of newyork census tract from library tigris,after i have a lot of point,in coordinates get from the new york police department

library(tigris)
tracts <- tracts(state = 'NY', county = c(5, 47, 61, 81, 85), cb=TRUE)

for the reproducibility i put some of my point coordinates:

mydata=
        Latitude Longitude
    1   40.71108 -73.85472
    2   40.66888 -73.93251
    3   40.82708 -73.86241
    4   40.68076 -73.95389
    5   40.82449 -73.91253
    6   40.88475 -73.86385
    7   40.76403 -73.97858
    8   40.72972 -73.86397
    9   40.86285 -73.89958
    10  40.57603 -74.09003
    11  40.65729 -73.73765
    12  40.84034 -73.92200
    13  40.76732 -73.98430
    14  40.76039 -73.91510
    15  40.72176 -73.84581
    16  40.69129 -73.91738
    17  40.57487 -74.16973
    18  40.61622 -74.03403
    19  40.63404 -73.96016
    20  40.75528 -73.93629

The main problem (i think) is that Coordinate Reference System (CRS) arguments of my data is NA.So when i try to intersect mydata with tracts, my result is NA,even if i plot the two things together i get only the image of tracts without mydata.
I tried, watching around the web:

proj4string(mydata)<-proj4string(tracts)

But this didn't solve my problem.

edit: Also i tried to read the shapefile with readShapePoly that lose the CRS,but it didn't work.


texts:
Hey Guys new to ESRI and the javascript api. I have the following function that when you click on the map adds a circle graphic to the map at that locations geographic lat and Long. But what im tyring to accomplish is that when you click on the map it adds the circle and when you click on the map again it updates the circle's locations. Any help would be great.

        function update_circle(first, second) {
            //add circle to map for current locaiotn
            var gl = new GraphicsLayer();
            var p = new Point(first, second);
            var s = new SimpleMarkerSymbol().setSize(60);
            var g = new Graphic(p, s);
            map.removeLayer(gl);
            gl.add(g);
            map.addLayer(gl);
        }


texts:
I want to draw a simple dashed line with an arrow at the end in QGIS.
What I tried:

Using QGIS Arrow option to make an arrow but that made the arrow a polygon and I didn't find a way to change the line portion to dashed.
I edited the arrow created in QGIS to remove the line and leave just the head portion.
I added another style below as a simple line and made that thicker and dashed.

I now have a dashed line with an arrow head at the end but The tip of the arrow starts at the line endcap so I can see the line protruding in front of the arrow. I can fiddle with x and y offsets but it seems a bit ammeter, I believe there must be a better way.

Any suggestions to accomplish this in a clean way?


texts: PostGIS buffer in meters without geography

texts:
I am building an application where I need to build a radius n meters around a given lat, lon. the st_buffer overload that uses a geography type for the first parameter would work fine, however, I am using an ORM that does not provide the ability to cast a geom to geography.

I tried setting the SRID to 4326 but it still outputs the circle in much larger units.

Is there some calculation/formula I can use to convert n meters to whatever units the geometry type uses?


texts: Running Train Random Trees Classifier which classifies by probability and not discrete classes using ArcMap

texts:
I have a a series of points which values' are a binary of a feature being present or not-present and a multiband raster of various landscape varables.
Is there a way to use random trees classification (in ArcMap) which will create a ecd of probability rather than just a simple present/not-present binary—values from 0 to 100% of how likely the feature is present?


texts: I have a Landsat MSS image file that contains a vertical string of incorrect pixels. Does anybody know what this might be?


texts: QGIS (3.10.4 and 3.12.1) always forces projection from epsg:2958 to epsg:2150 when saving shapefiles

texts:
I've recently set up a new work computer with QGIS build 3.10.4 and every time I go to save a shapefile and define the projection as epsg:2958 (NAD83(CSRS) / UTM zone 17N - Projected) it will instead save the file as epsg:2150 (NAD83(CSRS) / UTM zone 17N - Projected).

Does anyone have experience with this issue? How do I stop this from occurring?

Edit: I'm also noticing that this issue is only occuring when saving to a shapefile. It is not occurring when saving to a GeoPackage.


texts:
I'm beginner with GeoServer.

I have a jsf page in my application website (`   PDF Export ).

I want to export the map in PDF.

I added the print module to the GeoServer application.

Then I created the jasper report,
but I do not know where I'm going to create and put the config.yaml file and the spec param...

What should I do next?


texts: How to loop through multiple layers in a GeoPackage using QGIS Graphical Modeller

texts:
I have 1,366 districts each of which has up to 300 sub-districts. These are all held in a GeoPackage, but each district is a separate layer.
What I need to do next is to iterate through each layer and apply MULTIPART TO SINGLEPART (and other operations) to the sub-districts.
I will need to this in Graphical Modeller.
So far, I have only been able to address the first layer in the GeoPackage. How do I loop through all the layers in the GeoPackage?
QGIS 3.10.3 A Coruna
Window 10 (64-bit)


texts:
I have a layer on geoserver and I want to get JSON result of a single river. For example get river id=2541.

I see examples that using BBOX. But I do not use BBOX on my wms query.

http://geoserveraddres:8080/geoserver/MFG/wms?REQUEST=GetFeatureInfo&SERVICE=WMS&INFO_FORMAT=application/json&QUERY_LAYERS=MFG%3Ariver

How can I get by id?