wiki:UsersWikiExamplesPgsql2Shp

pgsql2shp Examples

Database on different machine, authentication required

pgsql2shp -f myshp -h myserver -u apguser -P mypassword -g mygeomfield mydatabase mytable

Database on same machine, trusted user, no need for host

pgsql2shp -f myshp mydatabase mytable

Using an sql statement instead of table

pgsql2shp -f myshp -h myserver -u apguser -P mypassword -g mygeomfield mydatabase "select parcel_id, the_geom from parcels where neighborhood='DORCHESTER'"

Where myshp is the shapefile name without the .shp extension

Last modified 15 years ago Last modified on Apr 13, 2009, 2:15:22 PM
Note: See TracWiki for help on using the wiki.