Opened 8 years ago

Closed 8 years ago

#1120 closed defect (fixed)

ST_Line_Interpolate_Point does not handle M value

Reported by: falcor Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.4
Component: postgis Version: 1.5.X
Keywords: Cc:

Description

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.

Change History (2)

comment:1 Changed 8 years ago by pramsey

Milestone: PostGIS 2.0.0PostGIS 1.5.4

This problem does not exist against trunk, moving to 1.5 milestone.

comment:2 Changed 8 years ago by pramsey

Resolution: fixed
Status: newclosed

Fixed in 1.5 at r8848 and in 1.4 at r8849

Note: See TracTickets for help on using tickets.