Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#390 closed enhancement (fixed)

ST_AddMeasure to change all the measures on a feature at once

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: master
Keywords: lrs Cc:

Description

ST_AddMeasure(geometry, startm, endm) => geometry

Attachments (1)

addmeasure.patch (3.4 KB ) - added by pramsey 15 years ago.
ST_AddMeasure implementation

Download all attachments as: .zip

Change History (10)

by pramsey, 15 years ago

Attachment: addmeasure.patch added

ST_AddMeasure implementation

comment:1 by robe, 15 years ago

Paul,

When are you planning on commiting this? After 1.5.0 is released?

If by chance you had hopes of squeezing it into 1.5.0 which I would hope you would, I would rather you expose the SQL interface as well. You can only do that if you get it in 1.5.0. That I feel strongly about. Even if its not perfect, I would prefer publicly live code to dormant code that only those "in the know" can exercise.

Yah I know we already called an RC1, but since its short and fairly standalone I'm perfectly willing to look the other way and quickly test to verify it didn't break anything else if Mark and Kevin are okay with it as well.

comment:2 by pramsey, 15 years ago

OK, you only have to ask me twice :) ! r5162

comment:3 by robe, 15 years ago

Okay you broke it. I was testing on my OpenSUSE 8.3 :)

Can't make check -- get this error

psql:postgis.sql:3837: ERROR: function st_startpoint(geometry) does not exist LINE 3: AS $$ SELECT ST_M(ST_StartPoint($1)) $$

HINT: No function matches the given name and argument types. You might need to add explicit type casts.

I see you snuck in two other functions ST_StartMeasure and ST_EndMeasure? Why do we need those?

comment:4 by robe, 15 years ago

For clarification I was testing on 8.3.3 and unfortunately don't have my windows build to test at the moment or 8.4. This could very well be a bug in earlier 8.3 installs that it is not treating the whole commit as a single unit and is sequence dependent.

ST_StartPoint/ST_EndPoint are defined after ST_StartMeasure/ST_EndMeasure. It is ST_StartMeasure is where its breaking.

comment:5 by pramsey, 15 years ago

On reflection, they are silly functions, so I removed them. Better to keep a two-step, standards compliant approach to getting that info with st_m(st_startpoint())

comment:6 by robe, 15 years ago

Okay make check is fine now. Minor gripe -- your documentation is wrong. It says ST_AddMeasure supports multilinestrings, but my torture scan returns this error when subjected to the multilinestrings

ERROR: Only LINESTRING is supported

comment:7 by pramsey, 15 years ago

The documentation is aspirational... :)

comment:8 by pramsey, 15 years ago

Milestone: PostGIS FuturePostGIS 1.5.0
Resolution: fixed
Status: newclosed

comment:9 by pramsey, 15 years ago

Er, multilinestring is now supported.

Note: See TracTickets for help on using tickets.