May 2017
Beginner to intermediate
328 pages
7h 17m
English
In order to get some help with the tool just type the following in the console:
pgsql2shp
The general syntax for the tool is as follows:
pgsql2shp [<options>] <database> [<schema>.]<table> pgsql2shp [<options>] <database> <query>
Shapefile is a format that is made up of a few files. The minimum set is SHP, SHX, and DBF. If PostGIS is able to determine the projection of the data, it will also export a PRJ file that will contain the SRS information, which should be understandable by the software able to consume a shapefile.
If a table does not have a geometry column, then only a DBF file that is the equivalent of the table data will be exported.
Let's export a full table first:
pgsql2shp -h localhost -p 5434 -u postgres ...
Read now
Unlock full access