I have an sjoin function from geopandas that is behaving erratically: it works on some version of the "points" geodataframe but not others.
The error I get is always:
rtree.core.RTreeError: Coordinates must be in the form (minx, miny, maxx, maxy) or (x, y) for 2D indexes
The "polygons" geodataframe never changes. The size of the "points" geodataframe depends on how much data I want to include (in a parameter). Generally the join fails when I include more data (e.g. 100,000 rows), and succeeds on smaller datasets (e.g. 2,000 rows). I assume this is because some rows contain invalid data. However on visual inspection I cannot find anything wrong with any row.
Is there a way to quickly find out which rows are blocking the join, or to automatically ignore them?
I can't easily share the full code and data.