Opened 8 years ago

Closed 8 years ago

#810 closed enhancement (fixed)

Increare accuracy of area calculation

Reported by: hopfgartner Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: trunk
Keywords: Cc:

Description

In the case of polygons which are "far" away from the origin, as happens frequently in projected SRS, the applied change may increase the accuracy of the area calculation by some order of magnitude. Doing some tests on UTM32N geometries and comparing the result with the result calculated with a routine written with http://de.php.net/manual/en/book.bc.php the accuracy improved by 4 to 5 orders of magnitude. The patch is against PostGIS 1.5.2.

Attachments (2)

postgis-area.patch (703 bytes) - added by hopfgartner 8 years ago.
lwpoly.c.diff (1.1 KB) - added by hopfgartner 8 years ago.

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by hopfgartner

Attachment: postgis-area.patch added

comment:1 Changed 8 years ago by robe

Milestone: PostGIS 1.5.3PostGIS 2.0.0

comment:2 Changed 8 years ago by strk

Version: 1.5.Xtrunk

Sounds good to me. Would you feel like attaching an updated patch against trunk and make sure the regression test still passes all ? Even better if you could _add_ a test in the existing tickets.sql file.

Changed 8 years ago by hopfgartner

Attachment: lwpoly.c.diff added

comment:4 Changed 8 years ago by pramsey

Applied to trunk at r8068

comment:5 Changed 8 years ago by pramsey

Resolution: fixed
Status: newclosed

Applied to 1.5 at r8071 and 1.4 at r8072

Note: See TracTickets for help on using tickets.