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?

Example DBF file link:

  • 1
    Could you add a link to a small test file? – user30184 Jun 8 '17 at 11:29

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"
| improve this answer | |

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.