Can I create GeoJSON from DBF where X and Y coordinates are stored as normal attributes.
Is there something in ogr2ogr
, which can create GeoJSON?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityCan I create GeoJSON from DBF where X and Y coordinates are stored as normal attributes.
Is there something in ogr2ogr
, which can create GeoJSON?
It's possible to convert a dbf file to a GeoJSON one thanks to the power of Spatialite support:
ogr2ogr -f GeoJSON StackOverFlowExample.json StackOverFlowExample.dbf -dialect SQLite -sql "SELECT ST_Point(x,y) AS geometry, * FROM StackOverFlowExample"
If the .dbf is not part of an ESRI shp I think your best option is converting the dbf to csv and then the csv to geojson. You could use ogre or the many online available sites.