I just stumbled on this while looking for something completely
different, shp2pgsql:
http://postgis.refractions.net/docs/ch04.html
The shp2pgsql data loader converts ESRI Shape files into SQL suitable
for insertion into a PostGIS/PostgreSQL database either in geometry or
geography format. The lo
You can use shp2text:
http://www.obviously.com/gis/shp2text/
It won't output the insert statements directly but it will create a tab
delimited file that you could then parse into your database.
Aleksey Naumov wrote:
> Dear GDAL users,
>
> Is there a way to use ogr2ogr or other means to conver
Dear GDAL users,
Is there a way to use ogr2ogr or other means to convert a layer (e.g. a
shapefile) into an SQL text file suitable for insertion into PostGIS? In
other words, a file with SQL text like:
INSERT INTO "my_table" ("the_geom" ) VALUES (GeomFromEWKT('SRID=-1;POLYGON
(( ...))'::TEXT) );