[postgis-users] Issue with ST_Line_Interpolate_Point dropping m values

Craig McIlwee craig.mcilwee at openroadsconsulting.com
Tue Jul 12 11:07:02 PDT 2011


Hello,
 
Im using PostGIS 1.5 and am having trouble with the ST_Line_Interpolate_Point function, the M value of the returned points are always 0.   An example query with output is:
 
select st_asewkt(st_line_interpolate_point(st_geometryn(the_geom, 1), 0.88364273)) from wgs_statecov_tway;
"SRID=4326;POINTM(-90.4466123484958 38.8893086051018 0)"
 
 
My geometries are MULTILINESTRINGM type, and examination with ST_AsEWKT shows proper M values as you see below.  I also use the M value for other LRS functions.
 
select st_asewkt(st_endpoint(the_geom)) from wgs_statecov_tway;
"SRID=4326;POINTM(-90.2232337557835 38.8615691007846 136.351980792317)"
 
 
The odd thing is that when I try the example query from the reference manual everything works fine.
 
SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.5))
                FROM (SELECT ST_GeomFromEWKT('LINESTRING(1 2 3, 4 5 6, 6 7 8)') as the_line) As foo;
"POINT(3.5 4.5 5.5)"
 
 
Based on this, it seems like I must be doing something but because the query is so simple I have no idea what that could be.  Any ideas?
 
Thanks,
Craig
Open Roads Consulting, Inc.
757-546-3401
http://www.openroadsconsulting.com
 
This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.  If you are not the intended recipient, you should immediately stop reading this message and delete it from all computers that it resides on. Any unauthorized reading, distribution, copying or other use of this communication (or its attachments) is strictly prohibited.  If you have received this communication in error, please notify us immediately.
 

This e-mail communication (including any attachments) may contain confidential and/or privileged material intended solely for the individual or entity to which it is addressed.
P - Think before you print.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20110712/ac907b8f/attachment.html>


More information about the postgis-users mailing list