Advertisement
Guest User

Untitled

a guest
Jan 12th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. DATA "the_geom from xyz using unique id using SRID=xxxx"
  2.  
  3. /usr/local/pgsql/bin/pgsql2shp -f /home/name/public_html/proj/data/xyz -h xxx.xxx.xx.xx -u username -P passwrd dbname "select the_geom from xyz"
  4.  
  5. LAYER
  6. NAME "province"
  7. STATUS ON
  8. TYPE POLYGON
  9. CONNECTIONTYPE POSTGIS
  10. CONNECTION "host=127.0.0.1 port=5432 dbname=xyz user=postgres password=postgres"
  11. DATA "the_geom from xyz"
  12. CLASS
  13. STYLE
  14. COLOR 128 128 128
  15. ANTIALIAS true
  16. END
  17. END
  18. END
  19.  
  20. $ pgsql2shp -f <path to output shapefile> -h <hostname> -u <username> -P <password> databasename "<query>"
  21.  
  22. $ pgsql2shp -f xyz -h 127.0.0.1 -u postgres -P password postgres "SELECT name, the_geom FROM xyz"
  23.  
  24. Initializing...
  25. Done (postgis major version: 2).
  26. Output shape: Polygon
  27. Dumping: XXXXXXXXXXXXXXXXXXXX [23 rows].
  28.  
  29. MAP
  30. IMAGETYPE GIF
  31. EXTENT 23.49 59.3 23.60 59.68
  32. SIZE 400 400
  33. SHAPEPATH "/home/name/public_html/proj/data/"
  34. IMAGECOLOR 255 255 255
  35.  
  36. LAYER
  37. NAME veget
  38. DATA Poltava10_Vegetation_region
  39. STATUS ON
  40. TYPE POLYGON
  41. CLASS
  42. STYLE
  43. COLOR 25 210 12
  44. END
  45. END
  46. END
  47. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement