Open max-mapper opened 10 years ago
cc @jerrysv
that is likely an issue with rtree not terreformer
oops meant to cc @jerrysievert
agreed with @calvinmetcalf, this rtree implementation starts to slow down on inserts as it attempts to balance the tree.
https://github.com/mourner/rbush may be a bit faster on some imports - but it currently only appears to support search
, whereas the version supported by terraformer supports both search
and within
.
either way, it's still much quicker than my reference rtree implementation that was built to be extremely naive :)
the big problem with rbush in this context is that it only supports matching and removing based on reference, not any sort of id, which is annoying when it comes to persisting stuff.
On Fri, Apr 11, 2014 at 2:05 PM, Jerry Sievert notifications@github.comwrote:
either way, it's still much quicker than my reference rtree implementation that was built to be extremely naive :)
Reply to this email directly or view it on GitHubhttps://github.com/maxogden/geojson2rtree/issues/1#issuecomment-40236007 .
-Calvin W. Metcalf
interesting to know about rbush, i hadn't dived in that deep yet.
i've been considering writing a very fast reference implementation of rtree, but have been having trouble finding the time - maybe we can talk while foss4g is going on.
i've also used a ton of other spatial indexes that have been more custom to the data.
to reproduce, convert
ftp://ftp02.portlandoregon.gov/CivicApps/Building_Footprints_pdx.zip
to geojson:then do
geojson2rtree buildings_pdx.geojson
and watch it slow down at around 100K