Skip to content

Instantly share code, notes, and snippets.

@justinlewis
Created March 4, 2013 18:28
Show Gist options
  • Save justinlewis/5084289 to your computer and use it in GitHub Desktop.
Save justinlewis/5084289 to your computer and use it in GitHub Desktop.
Export a PostGIS table to GeoJSON format with ogr2ogr.
ogr2ogr -f "GeoJSON" /PATH/TO/NEWFILE.json PG:"host=YOUR_HOST dbname=YOUR_DB user=YOUR_USER password=YOUR_PASS port=5432" "YOUR_POSTGIS_TABLE(the_geom)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment