@fil This is slow! For now just increasing circle's precision to make it still usable. Should be discussed with the whole team on Monday.
The turf.js version is much faster but fails on antimeridian situation.
If you have any ideas...
hmm sorry I didn't look at your code close enough. A better suggestion is to compute the distance directly!
dataWithinRadius = dataNuclide.filter(
(d) => d3.geoDistance([d.lon, d.lat], center) < kms / 6371
)
Which makes much more sense indeed -:) Why bother checking against a geojson while I am just dealing with a circle!
Would have expected it to be faster though... But there are ~100K measurements to loop over. For sure there are better way to make this selection I guess. But I think it does the job perfectly for what I want to present next Monday. Thanks a lot Philippe for your help once again.