[postgis-users] z,m,zm geometries

Paul Ramsey pramsey at opengeo.org
Tue May 15 22:58:48 PDT 2012


On Tue, May 15, 2012 at 3:02 PM, Duarte Carreira <dncarreira at gmail.com> wrote:
> Hi there.
>
> I'm trying to convert from esri's st_ geometry type to postgis' one.
>
> I can't convert to wkt using esri's functions and build a geometry in
> postgis using geomfromtext.
>
> Problems start when there are z, m, or zm coordinates. Mind that I'm on
> postgis 1.4 since that's the latest supported by esri.
>
> Now, when I convert from esri using their function I get a text like:
>
> LINESTRING Z ...
>
> When I pass it to geomfromtext, or even st_geomfromewkt, postgis does not
> like this...
>
> I posted on esri's forum and got a slap in the hand saying postgis is not
> following the ogc standard...
>
> I've done some reading and all I could find are references to POINTZ,
> POLYGONZ, etc. (suffixes withouth spaces) in v.1.2.0 of the standard. But
> this does not seem to be the spec for encoding wkt, just the geometry type
> to be put into geometry_columns. Either way, I could not get postgis 1.4 to
> accept pointz or any other geometryz type. I found references to postgis 2.0
> doing this... but that is beyong my grasp for now.
>
> So my 2 questions are:
>
>  - is there anyway i can get this to work in postgis 1.4 (main question)?

Are you wedded to the Z? Do you have a way to strip the Z from the
ESRI geometry before outputting the text?
Perhaps you could try WKB instead? (Still might have problems with
type numbers, but maybe worth a try?)

>  - and as long as we're in the subject, how is this related to the ogc sfs
> spec? are "they" right?

The 1.0 and 1.1 specs made no mention of higher dimensions (and hence
provided no guidance on what form the WKT should take). Not sure if
1.2 did, but I don't think so. ISO SQL/MM does talk about them, and
that's the pattern ESRI is following. PostGIS 2.0 consumes that kind
of text, but that's no solace to you.

P.

> Thanks for your time!
>
> Regards,
> Duarte
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>



More information about the postgis-users mailing list