question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testing turf.buffer accuracy

See original GitHub issue

I am getting a rather large difference comparing turf.buffer to the result of a buffer generated in GIS software. The GIS buffer was projected in MD state plane, then queried to a geoJson feature using SR 4326 via esri’s REST api. Using a leaflet measure tool to ground truth, the GIS buffer was accurate. Does anyone have a good explanation?

var point = turf.point([-76.675801, 38.935749]);
var buffered = turf.buffer(point, 10, {units: 'miles'});

turf

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
SteveClinecommented, Feb 6, 2018

Thanks @rowanwins

I think passing a spatial reference code as an option would be very helpful for the buffer and probably some other methods too. I would argue, if turf’s philosophy is to ‘just work as expected’, using proper spatial reference is vitally important to that expectation of working.

Mid latitude buffers will be off by 25% and running turf.circle will give a more accurate result in these parts of the globe.

If turf has the goal of being the geoprocessing engine of the future, which I hope it does, it can’t have inaccuracies this large and be used in serious GIS applications. Thanks again for your help and good work with Turf!

0reactions
chrispahmcommented, Oct 22, 2021

@SteveCline @JamesLMilner Trying to help clean up some older issues here: Similar to issues #1470, #1484, #1547 this issue has been fixed with Turf >v6.2.0.

Here’s a small notebook showcasing Turf’s buffer operation on the point and 10 mile buffer radius presented in @SteveCline’s original question for both Turf v6.5.0 and v5.1.6. The buffer is compared to a buffer calculated using GeoPandas (link to Jupyter notebook used for the calculation.

https://observablehq.com/@chrispahm/turf-issue-1246 image

Since the difference is arguably small, I guess this issue can be closed as well!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced geospatial analysis - Turf.js
Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees. Arguments. Argument, Type, Description. geojson ...
Read more >
Turf.js buffer distance not accurate - GIS Stack Exchange
I'm facing a strange behavior using buffers in Turf. js. When trying to do a 50m buffer around a point, the result is...
Read more >
Turf Tips: Soil Testing | Blog - Pioneer Athletics
Remove the vegetation from the sample before mixing the samples. Collect anywhere from 10-15 for an accurate representation of your field.
Read more >
Liming Turfgrass Areas - Penn State Extension
Liming Turfgrass Areas. Soil acidity is determined by a soil test, however, not all soil tests provide accurate information on how much lime ......
Read more >
Turf and Ornamental Soil Analysis - Spectrum Analytic
And with so much at stake, your test must be as accurate as possible. ... Soil pH; Buffer pH (when needed); Organic Matter;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found