[postgis-devel] [PostGIS] #1120: ST_Line_Interpolate_Point does not handle M value

PostGIS trac at osgeo.org
Tue Jul 12 12:54:51 PDT 2011


#1120: ST_Line_Interpolate_Point does not handle M value
---------------------+------------------------------------------------------
 Reporter:  falcor   |       Owner:  pramsey      
     Type:  defect   |      Status:  new          
 Priority:  medium   |   Milestone:  PostGIS 2.0.0
Component:  postgis  |     Version:  1.5.X        
 Keywords:           |  
---------------------+------------------------------------------------------
 The reference manuals says "Since release 1.1.1 this function also
 interpolates M and Z values (when present), while prior releases set them
 to 0.0.", but it appears that only the Z values is interpolated.

 To test, use the example query on the page:

 # 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;
      st_asewkt
 --------------------
  POINT(3.5 4.5 5.5)


 Now change LINESTRING to LINESTRINGM and see that the M value returned is
 0.

 # SELECT ST_AsEWKT(ST_Line_Interpolate_Point(the_line, 0.5)) FROM
 (SELECT ST_GeomFromEWKT('LINESTRINGM(1 2 3, 4 5 6, 6 7 8)') as the_line)
 As foo;

      st_asewkt
 -------------------
  POINTM(3.5 4.5 0)

 This was tested against PostGIS 1.4.2 and 1.5.2 with a 0 M value in both.

-- 
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1120>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-devel mailing list