Opened 6 years ago

Closed 6 years ago

Last modified 2 years ago

#2463 closed enhancement (fixed)

st_length on curve is on linearized geom

Reported by: mjurce Owned by: pramsey
Priority: medium Milestone: PostGIS 2.1.1
Component: postgis Version: 2.0.x
Keywords: Cc:

Description

Executing: select st_length(st_geomFromtext('CIRCULARSTRING(0 1000,707.1067812 707.1067812,1000 0)'));

st_length


1570.63862548611

Gives same result as: select st_length(st_curvetoline(st_geomFromtext('CIRCULARSTRING(0 1000,707.1067812 707.1067812,1000 0)')));

st_length


1570.63862548611

The function should return the arc length and not the approximated linestring length.

Change History (11)

comment:1 Changed 6 years ago by pramsey

Type: defectenhancement

There's lots of stuff in the arc support that doesn't work directly on arcs. Heck, distance didn't work directly on arcs until 2.1. So upgrades for full arc support are enhancements. I'm a little surprised that length isn't implemented, and will verify if that is the case, since it's so easy to do.

comment:2 Changed 6 years ago by robe

should this be 2.0.4 or 2.1.1 instead. If it requires a lot of code for 2.0.4 (which doesn't have your new fangled code), we probably shouldn't mess with it in 2.0.4

comment:3 Changed 6 years ago by robe

Milestone: PostGIS 2.0.4PostGIS 2.1.1

comment:4 Changed 6 years ago by pramsey

Yep, confirmed, length code just segmentizes, right up to trunk.

comment:5 Changed 6 years ago by robe

and so? is this fixable in next 2 weeks or punt to 2.2 (or 2.1.2)

comment:6 Changed 6 years ago by pramsey

I had the maths worked out, will probably be in this week.

comment:7 Changed 6 years ago by pramsey

Resolution: fixed
Status: newclosed

Fixed in 2.1 at r12043

Fixed in trunk at r12045

comment:8 Changed 2 years ago by strk

I noticed compoundcurve is still using the linearized geom for length, should I reopen this ?

comment:9 Changed 2 years ago by mjurce

Yes.

comment:10 Changed 2 years ago by strk

This being from 4 years ago I guess it's better to file another ticket. Would you do verify my finding, mjurce, and open the new ticket ? What I noticed was in the C code, didn't try to expose it at the SQL level...

comment:11 Changed 2 years ago by strk

I've filed #3774 to tackle compoundcurve

Last edited 2 years ago by strk (previous) (diff)
Note: See TracTickets for help on using tickets.