[gdal-dev] reading postgis xyzm with ogr2ogr

Duarte Carreira dncarreira at gmail.com
Wed Feb 11 10:23:19 PST 2015


Thanks Paul.

Yes, but I'm trying to export all tables from a schema, so I don't state
the names of the tables. I think using sql would require 1 comand per
table, right?

So my command is something like this:

ogr2ogr -progress PG:"dbname='postgis'
active_schema=schema1 schemas=schema1 <connectioninfo>" -f "SQLite"
mydb.sqlite   ....

I was hoping for a magic parameter to avoid the xyzm error...



On Wed, Feb 11, 2015 at 5:55 PM, Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> You could use the OGR sql query option to wrap your geometry call in a
> force2d or force3d function call in PostGIS?
>
>  --
> Paul Ramsey
> http://cleverelephant.ca
> http://postgis.net
>
> On February 11, 2015 at 9:54:07 AM, Duarte Carreira (dncarreira at gmail.com)
> wrote:
>
>  Hi there.
>
>
>
> I’m trying to figure out how to read xyzm geometries from postgis with
> ogr2ogr, if at all possible.
>
>
>
> I get the usual "is not supported" error:
>
> ERROR 1: Reading EWKB with 4-dimensional coordinates (XYZM) is not
> supported
>
>
>
> But reading old tickets I get the idea there is a way to read and just
> ignore the 4th dimension, instead of getting null geometries.
>
>
>
> For instance:
>
> http://trac.osgeo.org/gdal/ticket/1323
>
>
>
> From 8 years ago(!), says:
>
> The problem does not occur if a layer is accessed using
> OGRPGDataSource::GetLayerByname()
> Then, geometry is read in EWKT form and parsed correctly without any
> errors but M coordinate is omitted.
>
> Can this be done using og2ogr?
>
>
>
> Thanks,
> Duarte
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150211/51045eda/attachment.html>


More information about the gdal-dev mailing list