[postgis-users] ST_UNION drops M coordinate

Paul Ramsey pramsey at cleverelephant.ca
Wed Aug 5 10:51:41 PDT 2009


No, sorry no table. In general:

"interesting" things (containment tests, calculations of new derived
shapes) only take X and Y into account.
constructive functions (buffer, union, difference) that make new
geometries pass Z through and for new points try to interpolate a
"reasonable" Z value from the inputs
constructive functions do not pass M through

So the most you can expect from higher dimension handling is that they
are not stripped and are hopefully correctly interpolated on
introduced vertices.

P.

On Wed, Aug 5, 2009 at 10:46 AM, Satish Murthy<satish_m at hotmail.com> wrote:
> Thanks Paul.
>
> I also noticed that some other functions too have this limitation (such as
> ST_CONTAINS). Is there a table/matrix somewhere that lists which function
> supports XYZM?
>
> Satish
>
>> Date: Wed, 5 Aug 2009 10:36:46 -0700
>> From: pramsey at opengeo.org
>> To: postgis-users at postgis.refractions.net
>> Subject: Re: [postgis-users] ST_UNION drops M coordinate
>>
>> Yes, we just don't support the higher dimension in the operation. GEOS
>> was extended to 3 dimensional handling some time ago, but never got
>> pushed farther when we added M at postgis 1.0. Probably fixable, but
>> with a reasonable amount of careful work to catch every case.
>>
>> P
>>
>> On Wed, Aug 5, 2009 at 10:22 AM, Satish Murthy<satish_m at hotmail.com>
>> wrote:
>> >
>> > When I do this (notice the second ST_COLLECT):
>> > select ST_AsEWKT (ST_COLLECT (geom)) from (
>> > select (ST_DUMP(geom)).geom from (select p_geom as geom from (
>> > select ST_COLLECT (geom_col, st_GeomFromEWKT('Point(1 -1 0 10)')) as
>> > p_geom from tab) a
>> > )as b ) as c
>> > I get:
>> > "MULTIPOINT(71.1 -42.31 10 10,1 -1 0 10,1 -1 0 10)"
>> > This is fine, except that "1 -1 0 10" gets repeated.
>> >
>> > BUT---
>> > When I do (I use ST_UNION here):
>> > select ST_AsEWKT (ST_COLLECT (geom)) from (
>> > select (ST_DUMP(geom)).geom from (select p_geom as geom from (
>> > select ST_UNION (geom_col, st_GeomFromEWKT('Point(1 -1 0 10)')) as
>> > p_geom
>> > from tab) a
>> > )as b ) as c
>> > I get this:
>> > "MULTIPOINT(1 -1 0,71.1 -42.31 10)"
>> > No repetition, but the M coordinate is missing.
>> >
>> > Any pointers on what's going wrong here?
>> >
>> >
>> > ________________________________
>> > Are you an untamed, bizarre or daring explorer? Find out now! Drag n'
>> > drop
>> > _______________________________________________
>> > postgis-users mailing list
>> > postgis-users at postgis.refractions.net
>> > http://postgis.refractions.net/mailman/listinfo/postgis-users
>> >
>> >
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
> ________________________________
> Date India’s Teen Diva. Find out if you hit it off with her or are her fiery
> opposite. Drag n’ drop
> _______________________________________________
> 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