Ticket #266 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

ST_Length for geography

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: trunk
Keywords: Cc:

Description

Paul, Just in case its not in your todo and if its not too much trouble. I think an ST_Length would round off the measurement offerings for geography and imagine it should be easier than the ST_Distance and ST_Area you have already implemented.

I imagine calculating lengths of streets and roads is a common practice.

Change History

Changed 4 years ago by pramsey

  • status changed from new to closed
  • resolution set to fixed

Committed at r4662

Changed 4 years ago by robe

Hmm -- Paul I see you managed to sneak in the behavior of Perimeter in the ST_Length function for geography. I must flag this as being inconsistent with geometry ST_Length which returns 0 for areals.

I'm not so bothered about this inconsistency (since I consider returning 0 for length of an areal kind of silly, but as much as I hate alias's and unnecessary function bloat, I think it might be prudent to introduce one for ST_Perimeter. The reason being -- my old-fashioned self-speaking:

When I think of length -- I think Line (not polygon) When I think areal -- I don't think length, I think perimeter.

I can only imagine old-fashioned thinkers like me will think the same, and that there are a large number of said people in our community.

I'm going to leave this closed and you can reopen or change unless you think I am being unnecessarily petty.

Note: See TracTickets for help on using tickets.