Last active
December 23, 2015 05:49
-
-
Save mhkeller/6590111 to your computer and use it in GitHub Desktop.
PostGis query to shp
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
| $ pgsql2shp -f <path to output shapefile> -h <hostname> -u <username> -P <password> databasename "<query>" | |
| $ pgsql2shp -f ca_hex_2000_ided.shp -h localhost -u mike mike "SELECT ca_hex_2000_ided.geom, ca_hex_2000_ided.hex_id FROM ca_hex_2000_ided, bounder WHERE ST_Intersects(ca_hex_2000_ided.geom, bounder.geom) " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment