Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ pgsql2shp -f <path to output shapefile> -h <hostname> -u <username> -P <password> databasename "<query>"
- $ pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "SELECT sp_count, geom FROM grid50_rsa WHERE province = 'Gauteng'"
- Initializing...
- Done (postgis major version: 2).
- Output shape: Polygon
- Dumping: XXXXXXXXXXXXXXXXXXXX [1947 rows].
- $ ogr2ogr -f "ESRI Shapefile" qds_cnt.shp PG:"host=localhost user=postgres dbname=gisdb password=password" -sql "SELECT sp_count, geom FROM grid50_rsa WHERE province = 'Gauteng'"
- $ pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "Select sp_count, geom from grid50_rsa where province = 'Gauteng'"
- $ pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "SELECT sp_count, geom FROM grid50_rsa WHERE province = 'Gauteng'"
Add Comment
Please, Sign In to add comment