turf.area gives incorrect result
See original GitHub issuePlease provide the following when reporting an issue:
I’m trying to find the area of the same polygon, via Turf and PostGIS. I Get varying outputs from both.
Turf gives: 2822907.8214477254
while PostGIS gives 2816602.27320234
for spherical area
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Turf.js length gives incorrect result - GIS Stack Exchange
I'm trying to calculate the distance between 2 points given by GPS coordinates using the turf.js library.
Read more >Turf.js and PostGIS 'difference' function giving unexpected result
1 Answer 1 · I found that turf/truncate still gave me the odd northmost & southmost point. I ended up doing a string...
Read more >7 Problems With Artificial Grass and How to Solve Them
Improper installation is the most common culprit for holes and tears in your turf. Water buildup from a lack of drainage, noticeable seams, ......
Read more >18 Common Mistakes DIY Turf Installers Make - MPR Supply
Failure to remove soft spots may potentially result in certain areas of your lawn sinking. Solution: Remove any soft spots during the excavation...
Read more >18 Artificial Grass Installation Mistakes (and How to Solve Them)
After excavating your existing lawn, check the subgrade/soil for soft spots. Soft spots are areas in which the ground begins to sink under...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Turfjs Area is wrong to the point that it is actively causing harm in multiple applications where I work and we are having to delegate area calculation to other libraries. The area calculation seems very close to the result given by projecting to ESRI 54009, but still, the precision fluctuates alot.
I needed this area calculation to be the same as QGIS/MSQL/POSTGRES for work so I’ve tried a bunch of things and eventually found this post:
Post About Postgres
Which references this library geographiclib-js.
Appears to be written by the author referenced in the code ( Charles Karney) to this article/document article
So temporarily i’m using this
Docs can be found here: GeographicLib Js Docs
It would be great if we could get the formula derivatives implemented in turf. I’ve followed several algorithms before (shoelace, gauss, vincenty) but having a bit of trouble with the referenced document in terms of the formulas actually needed to get this done.