[postgis-users] ST_Locate_Between_Measures requires M-coordinates?

Ingo Weinzierl ingo.weinzierl at intevation.de
Fri Sep 24 02:07:34 PDT 2010

Hi list,

I think that I have just discovered an inconsistency in the PostGIS
manual. Today, I have tried to use the function
ST_Locate_Between_Measures that takes a geometry and two floating
point numbers (see [1] in the manual). The manual says, that this
function "supports M coordinates". So, in my eyes, I should be able
to call this function with geometries that don't have any M coordinates
as well. Two examples:

1) Function call without M coordinate:
SELECT ST_Locate_Between_Measures(ST_GeomFromEWKT('LINESTRING(33296361.4755929 5980762.99091387,33296357.0886 5980746.8462,33296350.5402 5980729.1851,33296336.2529 5980715.4926,33296331.0934 5980705.9678,33296328.3154 5980697.4349)'), 1.5, 3);

the result:
ERROR:  Geometry argument does not have an 'M' ordinate

2) Function call with M coordinate:
SELECT ST_Locate_Between_Measures(ST_GeomFromEWKT('LINESTRINGM(33296361.4755929 5980762.99091387 0,33296357.0886 5980746.8462 4,33296350.5402 5980729.1851 8,33296336.2529 5980715.4926 13,33296331.0934 5980705.9678 20,33296328.3154 5980697.4349 39)'), 1.5, 3);

the result:

As you can see in the upper two examples, I was not able to call the
ST_Locate_Between_Measures function with geometries that don't have
any M coordinates - it seems that M coordinates are REQUIRED but not
SUPPORTED. It this right? And should the manual beeing fixed? Or is
there a mistake in the function call in the first example?


[1] http://postgis.refractions.net/documentation/manual-1.5/ST_Locate_Between_Measures.html
Ingo Weinzierl <ingo.weinzierl at intevation.de> | Tel.: +49 (0)541-33 508 3773
Intevation GmbH, Neuer Graben 17, 49074 OS  |  AG Osnabrück - HR B 18998
Geschäftsführer:  Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100924/9f9ae789/attachment.pgp>

More information about the postgis-users mailing list