New answers tagged

1 vote
Accepted

Extract shapes and shape data from GeoTIFF using Rasterio and store as GeoJSON

shapes returns an iterable of tuples with geometry and value, you can use geopandas to parse the geometry into a valid geojson. import geopandas as gpd import rasterio from rasterio import features ...
user avatar
  • 52.5k
0 votes

Folium draw and highlight polylines with distinct colours from unique GeoJSON

Solution (works perfectly)! It appears it is possible to achieve what I set to (see main question) within the extent of the style_function. We can pass values to the style_function properties in a ...
user avatar
1 vote

Find points which fall within specified distance to POI using Python

You can create a dataframe of one point, buffer the point and spatial join it to all other points. Spatial join is very fast. import geopandas as gpd df = gpd.read_file(r'/home/bera/GIS/Data/LMV-...
user avatar
  • 52.1k
1 vote
Accepted

GeoJSON to SVG, keeping properties (mapshaper)

If (on the web app) you add id-field=FOO then you'll get SVG with field FOO from your data in the id attribute. You can also add svg-data=BAR to get field BAR written to a data attribute. Using a test ...
user avatar
  • 51.9k
0 votes

Fixing misshaped GeoJSON polygons

As commented by @SpacedMan: That looks fairly hard to recover, and might be due to a number of things. OpenStreetMap seems to have 16 admin-level "4" subdivisions for Ghana that look like ...
user avatar
  • 63.7k
4 votes

'ValueError: Expected object or value' when reading GeoJSON file with Pandas

There are several things to keep in mind: Do not forget to close the GeoJSON with ]} There is no need to call the read_json() via pd.io.json.read_json, simply pd.read_json. Even if it is placed in ...
user avatar
  • 24k
0 votes
Accepted

Is there a limit on the number of polygons shown by GeoJson on Leaflet?

Well, I believe I found a solution. The only thing I could think of was the fact that my layer in ArcPro had a symbology! I removed the symbology which specifically was coming from a cluster analysis ...
user avatar
  • 28
1 vote
Accepted

Using Leaflet.motion plugin on geometry returned by WFS service?

L.Geoserver.wfs is async method, so any data in wfsLayer is accessible only after layer is loaded. L.Geoserver.wfs is extension of L.FeatureGroup which means it fires layeradd event after layer is ...
user avatar
  • 16.9k
0 votes
Accepted

Adding GeoJSON layer to a Layergroup so that it shows as radio button in layer control?

Leaflet control L.control.layers has no option/possibility to have radio buttons for overlays, but you can listen to map's overlayadd and overlayremove events and hide currently selected overlay when ...
user avatar
  • 16.9k
3 votes
Accepted

Using GeoJSON as input to leaflet.motion plugin in Leaflet

All you have to do is extract line string coordinates from geoJsonData and store them in some array, let's say dataCoords, and flip coordinates while doing that, since Leaflet expects [lat, lng] ...
user avatar
  • 16.9k
2 votes

Using GeoJSON as input to leaflet.motion plugin in Leaflet

remove the following line. var Json2 = JSON.parse(geoJsonData) JSON.parse extracts a dictionary from a string. Thus you do not need it here. Edit: To your new inquiry here's another approach. (Tested) ...
user avatar
  • 21
2 votes

Get only a filter value ols:PROPERTIES from this API response

I need to add propertyName in the parameter like the old parameter list is service:WFS version:1.0.0 request:GetFeature typeName:ols:ols srsName:EPSG:4326 maxFeatures:1 format_options:application/...
user avatar
0 votes

Issue with using TopoJSON server API to return TopoJSON object with properties

The answer by @Tomas works for me. Thanks. And I code the following snippets to identify geojson and topojson respectively. // Firstly reference topojson library. topojson-server for convert geojson ...
user avatar
0 votes
Accepted

Adding labels to first and last joint in polyline using Leaflet

Your tooltips and markers are shown, but at the wrong location. Zooming out enough you would see them. Reason for this is that Leaflet for the input to it's methods/functions expects [lat, lng] order, ...
user avatar
  • 16.9k
0 votes
Accepted

Merging two polygon features (GeoJSON file) using QGIS

Multipolygon is an array of polygon coordinates. So you'll need to wrap the coordinates in another array. Try this: { "type": "Feature", "properties": { "id&...
user avatar
1 vote
Accepted

Having trouble with Mapbox Isochrone FeatureCollection return type

I think you can try to read as JSON first, then deserialize: HttpResponseMessage response = client.GetAsync(getIso).Result; string jsonResponse = await response.Content.ReadAsStringAsync(); ...
user avatar

Top 50 recent answers are included