Hacker News new | ask | show | jobs
by jjevanoorschot 1221 days ago
I've been working on a geospatial application, and one of the use cases was finding intersections between large sets of polygons. For some use cases you might not need a separate data store like this.

I used an in-memory RTree in Golang [0]. It's super fast and efficient.

[0] https://github.com/tidwall/rtree

1 comments

is it possible to get only N closest points that match the distance predicate?
Yes. That library has a flexible kNN method built in. https://pkg.go.dev/github.com/tidwall/rtree#RTree.Nearby