Hot answers tagged

3

When you create marker cluster group from GeoJSON data that contains only points for markers, and you markers will be L.circleMarker markers, you must have the following in mind: You can use L.geoJSON for parsing GeoJSON data, creating desired markers and adding them to cluster, but you don't add GeoJSON layer to the map. Markers of type L.circleMarker are ...


3

You may try the following (tested) ogr2ogr -nln spatial.buildings -dialect SQLite -sql "SELECT geometry AS footprint FROM RhodeIsland" -update -append -gt 65536 -f "PostgreSQL" PG:"<my connection string>" "RhodeIsland.geojson" Using -sql and -dialect SQLite, you are able to remap geometry column correctly You ...


1

I still can't understand why the previous code doesn't work but using an alternative approach with pointToLayer and L.Circle seems to achieve the desired effect. var geoJson = new L.geoJSON(geojsonFeature, { pointToLayer: (feature, latlng) => { return new L.Circle([feature.properties.latitude, feature.properties.longitude], feature.properties....


1

it turns out that some data in the coordinate column is null. It causes the error mentioned above.


1

GeoJSON is JSON data, it's easier if you treat it as such. Actually it's probably better to treat it as geospatial data and use a geospatial library, but if you're stuck with the standard library: import json str_data = '''{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"...


Only top voted, non community-wiki answers of a minimum length are eligible