Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use equal-area projection for area calculation #22

Open
clarisma opened this issue Dec 5, 2023 · 1 comment
Open

Use equal-area projection for area calculation #22

clarisma opened this issue Dec 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@clarisma
Copy link
Owner

clarisma commented Dec 5, 2023

Currently, Feature.area uses a Euclidian algo (scaled to latitude), which suffers from loss of accuracy near the poles.
Accuracy would improve by re-projecting coordinates into an equal-area projection, with only a small decrease in speed (?? - see comment below)

@clarisma clarisma added the enhancement New feature or request label Dec 5, 2023
@clarisma
Copy link
Owner Author

Comparison of Fast (scaled Mercator projection -- current approach) and Accurate (Lambert projection). Difference isn't dramatic. Fast, however, is 5x faster than Accurate.

(Greenland is way off because we're comparing the larger admin area in OSM to the land area stated in Wikipedia).

                            Area (in square km)
Name                        Fast         Accurate     Wikipedia
-------------------------   ----------   ----------   ----------
Araucania (Chile)             31869.80     31766.66     31842.30
Baffin Island                519325.54    510095.64    507451.00
Bavaria                       70552.73     70354.87     70550.19
Germany (land area)          354626.80    356287.03    357600.00
Greenland (admin area)      2414716.20   2534771.03   2166086.00
Komsomolets Island             8724.11      8821.01      9006.00
Meighen Island                  934.37       925.45       955.00
Nordaustlandet                14186.02     14224.67     14443.00
Tarapaca (Chile)              42608.18     42547.26     41799.50
Saarland (Germany)             2570.34      2563.73      2570.00
Sakhalin (Russia)             74632.04     74316.81     72492.00
Victoria Island (Canada)     215938.80    218829.33    217291.00
Victoria Island (Russia)          5.98         5.97        10.80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant