mourner / geokdbush

The fastest spatial index for geographic locations in JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Range method that handles date line wrapping

mourner opened this issue · comments

KDBush already has a range method, but geokdbush should have a wrapper around it that handles the date line wrapping.

I would also love to see this

I would love this too. For now as I don't need an exact orthogonal range (I'm only using this to reduce the set of items I need to process for efficiency) I'm changing my bounding box into a bounding circle by calculating the distance between my southWest and northEast points dividing by two and using that as my radius for the "around" function.

Just putting this comment here in case this workaround might be of help to others.