Guest User

Untitled

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