clarisma / geodesk-py

Fast and storage-efficient spatial database engine for OpenStreetMap data
https://docs.geodesk.com/python
GNU Lesser General Public License v3.0
36 stars 0 forks source link

Area calculations way off near the poles #20

Closed osmuser63783 closed 8 months ago

osmuser63783 commented 9 months ago

I realise that Core concepts explains about the Mercator projection and I guess this is why the result of .area on objects near the poles overestimates their actual area.

It would be nice if (1) the documentation here mentioned this (if only to save GIS beginners some confusion why the numbers don't make sense), and (2) if the documentation pointed to a way to solve this in Python not just Java. (Ideally of course I’d like to get accurate area calculations from .area but I realise this may be out of scope.)

clarisma commented 9 months ago

Yes, it would make sense to re-project coordinates on the fly to make large area calculations more accurate near the poles. We'll put this into the next major release (Issue #22)

Related: Issue #1

clarisma commented 8 months ago

It turns out this is a bug (The Mercator projection, with a proper scale factor applied, actually returns reasonably accurate areas even near the poles). A fix is on its way.

clarisma commented 8 months ago

Caused by #32 (Fixed)