Ticket #390 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

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: trunk
Keywords: lrs Cc:


ST_AddMeasure(geometry, startm, endm) => geometry


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

Change History

Changed 5 years ago by pramsey

ST_AddMeasure implementation

Changed 5 years ago by robe


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.

Changed 5 years ago by pramsey

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

Changed 5 years ago by robe

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?

Changed 5 years ago by robe

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.

Changed 5 years ago by pramsey

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())

Changed 5 years ago by robe

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

Changed 5 years ago by pramsey

The documentation is aspirational... :)

Changed 5 years ago by pramsey

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from PostGIS Future to PostGIS 1.5.0

Changed 5 years ago by pramsey

Er, multilinestring is now supported.

Note: See TracTickets for help on using tickets.