[Gdal-dev] ogr2ogr : creating Multipolygones shapefiles from
Postgis
Bill Thoen
bthoen at gisnet.com
Fri Dec 1 08:08:09 EST 2006
I think that just got fixed yesterday, but try including an output SRS,
like -a_srs WGS84. I think what's happening is that ogr2ogr can't determine
what the SRS is for your data when you use the -sql switch. Try examining
it with ogrinfo to see if that's it.
I had the same problem, but when I tried yesterday's daily CVS "snapshot"
(which you have to build from source) that problem went away for me.
On Fri, Dec 01, 2006 at 01:22:22PM +0100, Marc Jacquin wrote:
> Hi all,
>
> For example this works fine for polygons:
> Ogr2ogr -f "ESRI Shapefile" d:/test.shp PG:"dbname=xxxx user=xxx host=xxx
> password=xxx port=xxx" -sql "select the_geom from mytable where .... "
>
> If you use it with a multipolygon PostGIS geometry, it creates an empty Line
> shapefile.
>
> I could get around by using the where clause instead of the sql clause:
>
> Ogr2ogr -f "ESRI Shapefile" d:/test.shp PG:"dbname=xxxx user=xxx host=xxx
> password=xxx port=xxx" mytable -where "...."
>
> Should I file a bug?
>
> I use the binary version of FWTools 1.10.
>
> Regards,
>
> Marc
>
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>
More information about the Gdal-dev
mailing list