Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Last active August 29, 2015 14:16
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save wboykinm/bd6aa75165da8449fdb1 to your computer and use it in GitHub Desktop.
Save wboykinm/bd6aa75165da8449fdb1 to your computer and use it in GitHub Desktop.
How to dump geojson from postgres without ogr2ogr
psql DBNAME -c "\\copy (SELECT ST_AsGeoJson(ST_Union(the_geom)) AS the_geom, attribute2, attribute3 FROM TABLENAME) to '/PATH/TO/YOUR/DESIRED/FILE.geojson'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment