geokdbush
geokdbush copied to clipboard
compatibility with kdbush 4.x
kdbush 4.x changed the internal interface so that index.points no longer exists, but the latest version of geokdbush still relies on it.
I was able to work around it by manually setting index.points to an array matching what I wanted (lng/lat points).
It might make sense to just return an index.
I forked the geokdbush and updated it to work with kdbush 4.x (and also to use ES6 and modules): https://www.npmjs.com/package/geokdbush-tk
Cc @mourner
@tkafka does your lib require ESM? I am getting the following error:
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/xxx/node_modules/geokdbush-tk/index.js from /home/xxx/file.ts not supported
@tkafka Thanks for the fork, works well. Would you be able to create a PR with the necessary changes to propagate it back here?
Apologies for the delay. I'm now releasing geokdbush v2 that works with KDBush v4, and updated the readme example on how to use it.
@mourner Thank you for the update! I added a notice about geokdbush now being updated to my fork and deprecated it :).
@mourner Thanks! 🙌
@tkafka thank you for maintaining a fork until I got to this!