Opened 11 years ago

Closed 11 years ago

Last modified 7 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 by pramsey, 11 years ago

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 by robe, 11 years ago

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 by robe, 11 years ago

Milestone: PostGIS 2.0.4PostGIS 2.1.1

comment:4 by pramsey, 11 years ago

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

comment:5 by robe, 11 years ago

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

comment:6 by pramsey, 11 years ago

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

comment:7 by pramsey, 11 years ago

Resolution: fixed
Status: newclosed

Fixed in 2.1 at r12043

Fixed in trunk at r12045

comment:8 by strk, 7 years ago

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

comment:9 by mjurce, 7 years ago

Yes.

comment:10 by strk, 7 years ago

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 by strk, 7 years ago

I've filed #3774 to tackle compoundcurve

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