geokdbush icon indicating copy to clipboard operation
geokdbush copied to clipboard

compatibility with kdbush 4.x

Open quarl opened this issue 2 years ago • 3 comments
trafficstars

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.

quarl avatar Jul 02 '23 16:07 quarl

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 avatar Jul 06 '23 18:07 tkafka

@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

ChrisLahaye avatar Aug 04 '23 15:08 ChrisLahaye

@tkafka Thanks for the fork, works well. Would you be able to create a PR with the necessary changes to propagate it back here?

zakjan avatar Aug 09 '23 12:08 zakjan

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 avatar Jul 01 '24 09:07 mourner

@mourner Thank you for the update! I added a notice about geokdbush now being updated to my fork and deprecated it :).

tkafka avatar Jul 01 '24 22:07 tkafka

@mourner Thanks! 🙌

zakjan avatar Jul 02 '24 04:07 zakjan

@tkafka thank you for maintaining a fork until I got to this!

mourner avatar Jul 02 '24 14:07 mourner