Last active
August 29, 2015 14:16
-
-
Save wboykinm/bd6aa75165da8449fdb1 to your computer and use it in GitHub Desktop.
How to dump geojson from postgres without ogr2ogr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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