Guest User

Untitled

a guest
Nov 1st, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $ pgsql2shp -f <path to output shapefile> -h <hostname> -u <username> -P <password> databasename "<query>"
  2.  
  3. $ pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "SELECT sp_count, geom FROM grid50_rsa WHERE province = 'Gauteng'"
  4.  
  5. Initializing...
  6. Done (postgis major version: 2).
  7. Output shape: Polygon
  8. Dumping: XXXXXXXXXXXXXXXXXXXX [1947 rows].
  9.  
  10. $ 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'"
  11.  
  12. $ pgsql2shp -f qds_cnt -h localhost -u postgres -P password gisdb "Select sp_count, geom from grid50_rsa where province = 'Gauteng'"
  13.  
  14. $ 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