[gdal-dev] Convert shapefile to SQL text for PostGIS

Aleksey Naumov anaumov at gmail.com
Tue May 11 12:09:53 EDT 2010


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) );

which could be read into PostgreSQL later. Ideally, I am looking for a
direct conversion, i.e. not involving PostGIS.

Thank you,
Aleksey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100511/79b45792/attachment.html


More information about the gdal-dev mailing list