peterstace/simplefeatures

Make the `rtree` package internal

peterstace opened this issue · 3 comments

The rtree package is exposed publically, making it part of the module interface contract. This reduces the amount of flexibility with changing the interface and implementation of that package. We can modify the package's interface without breaking users by first making it internal. This assumes that users aren't already using the rtree package, which I think is a reasonable assumption.

Before we do this, I think it would be a good idea to expose GEOS's RTree implementation via the geos package so that users have something to migrate over to before the existing RTree implementation is cut off.

I had a look at the GEOS RTree implementation, which is a bit bleh to work with.

The main complexity of the simplefeatures RTree is actually the insert/delete methods. They're also the parts that are stopping modifications to the RTree storage layout. Perhaps as a compromise, we could just remove those methods (they're not used internally). Hopefully they're not used by many users.

Rather than making the whole package internal, I've instead opted to remove the Insert and Delete methods.