Hot answers tagged

5 votes

Converting Pandas column with featurecollection to GeoJSON

You can use the following code. Just specify json_string_column and output file path. import json import pandas as pd import geopandas as gpd # df = YOUR DATAFRAME json_string_column = "...
2 votes

ogr2ogr PostGIS to GeoJSON using batch file

I had the same problem with connection to oracle. This solve my problem (path to drivers): SET GDAL_DRIVER_PATH=c:\OSGeo4W\apps\gdal\lib\gdalplugins You should add it in your .bat file. Path depends ...
  • 61
2 votes

MMQGIS Geocoder: Japanese addresses not being geocoded

I have tried to geocode your addresses using several geocoders (arcgis, bing, google, here, nominatim), and was able to get several results: address \ geocoder arcgis bing google here nominatim ...
  • 27.5k
1 vote

ogr2ogr can't find my layer's CRS

There's no EPSG code "102459". However, "102459" is an ESRI code. If your spatial reference is defined in your dataset, as you noted, you can leave out the -s_srs parameter and ...
  • 57k
1 vote
Accepted

WMS request response in GeoJSON

The correct URL to get JSON is http://79.101.20.137:8080/geoserver/eig/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image/jpeg&TRANSPARENT=true&QUERY_LAYERS=eig:tp&...
  • 4,209
1 vote
Accepted

Connect two polygons in GeoJSON

You can snap one to the other: import geopandas as gpd from shapely.ops import snap df = gpd.read_file(r"/home/bera/Desktop/GIStest/connect.json") geom1=df.iloc[0].geometry geom2=df.iloc[1]....
  • 58.7k
1 vote

How to keep property ids when recreating feature ids of a GeoJSON using ogr2ogr?

This seems to work: ogr2ogr -sql "SELECT \ $(for key in $(cat example.geojson | jq --join-output '.features[0].properties | keys | join(" ")'); do echo -n "'example'.${key},...
1 vote

How to keep property ids when recreating feature ids of a GeoJSON using ogr2ogr?

I can't explain why, but this seems to work: ogr2ogr -sql "SELECT geometry, id as id,ROW_NUMBER() OVER() AS generated_id FROM id" -dialect sqlite id2.json id.json -lco ID_FIELD="...
  • 57k

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