New answers tagged geojson
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
...
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 ...
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-...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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] ...
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)
...
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/...
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 ...
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, ...
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&...
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();
...
Top 50 recent answers are included
Related Tags
geojson × 2406leaflet × 700
javascript × 299
openlayers × 234
python × 191
qgis × 189
postgis × 166
shapefile × 136
json × 136
openlayers-2 × 116
ogr2ogr × 110
coordinate-system × 92
mapbox × 82
geoserver × 81
polygon × 80
openstreetmap × 67
postgresql × 66
gdal × 65
convert × 62
wfs × 46
geopandas × 43
layers × 41
markers × 41
d3 × 41
topojson × 41