Writes the contents of table tableName to a shapefile
located at path.
tablename can be either:
the name of an existing table,
the result of a query (SELECT instruction which has to be written between simple quote and parenthesis '( )').
The default value of fileEncoding is ISO-8859-1.
Shapefiles do not support arbitrary geometrical data.
They do not support:
POLYGONs (they are automatically converted to
MULTIPOLYGONs when exported)
NULL Geometries
Multiple Geometry types in the same table
Examples
Case where tablename is the result of a selection.
Export the .prj file
If you want to export your shapefile with it’s projection, stored in a .prj file, you must assume that the table contains a SRID constraint value greater than 0.
If not, the SRID must be enforced using the following commands:
Where:
mytable is the table name to update
the_geom is the geometric field name
EPSG_CODE is the EPSG id corresponding to your system (e.g 4326 for WGS84 or 2154 for the french Lambert 93).