You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new with rtree (and R-trees in general) and I don't know how an R-tree is implemented (I just know the high-level theory), but I've found a weird behavior when trying to delete items from an index.
For an index with a few items, deleting some of them generally doesn't break anything. However, when complexity grows and I delete one item, points that before matched with other items stop doing it.
As I don't understand this behavior, I created a repo with a sample code to illustrate my problem. This code just:
Reads a list of countries geometries from a geojson file.
Adds every polygon bounds to an index (using a UUID for each polygon).
Generates one point for each polygon.
Checks every generated point has at least one match using the index.
Deletes the polygons of only one country.
Checks every generated point again.
Prints the data of every point without matches with its country.
In the example, I'm deleting all USA polygons, but all the points inside USA keeps matching. However, other points from other countries fail, even though I didn't remove its country from the index.
Maybe I'm missing something about R-trees, but I think this doesn't make sense. Chances are I'm using it wrong, but I don't know why. I'm sorry this issue involves some work to check, but would appreciate some help.
The text was updated successfully, but these errors were encountered:
Is this still an issue?
I have run the example code and the polygons seem to be deleted properly as no matching is found for points in USA:
POINT (-155.44621945363636 19.52346141835088) - United States of America
POINT (-156.61449434552648 20.945348638951337) - United States of America
POINT (-157.2490295045156 21.19656537921698) - United States of America
POINT (-157.80397172328637 21.379848936908118) - United States of America
POINT (-159.45269467626426 21.973077829200907) - United States of America
POINT (-116.9313632010097 45.680309082894034) - United States of America
POINT (-153.4176185266608 57.28947977584915) - United States of America
POINT (-166.02234950826792 59.91506536250986) - United States of America
POINT (-171.3743571862354 63.65961005953684) - United States of America
POINT (-162.98717532183196 68.77121797563544) - United States of America
I'm new with rtree (and R-trees in general) and I don't know how an R-tree is implemented (I just know the high-level theory), but I've found a weird behavior when trying to delete items from an index.
For an index with a few items, deleting some of them generally doesn't break anything. However, when complexity grows and I delete one item, points that before matched with other items stop doing it.
As I don't understand this behavior, I created a repo with a sample code to illustrate my problem. This code just:
In the example, I'm deleting all USA polygons, but all the points inside USA keeps matching. However, other points from other countries fail, even though I didn't remove its country from the index.
Maybe I'm missing something about R-trees, but I think this doesn't make sense. Chances are I'm using it wrong, but I don't know why. I'm sorry this issue involves some work to check, but would appreciate some help.
The text was updated successfully, but these errors were encountered: