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
Add a TGGeometry extension for fast inexact geometric predicates (#271)
- Add a TGGeometry extension
- Centralize the definition of extension algorithms GEOS, PROJ, and TG (GDAL can be later)
TGGeometry.jl is a Julia wrapper around the [tg](https://github.com/tidwall/tg) C library for planar geometric predicates. It doesn't use exact computation, but the indexing ideas there are extremely efficient and I thought it would be nice to at least have it accessible.
It's ridiculously fast - 100 ns for point in polygon if you convert the geometry to a TGGeometry first.
Accessible by `predicate(GO.TG(), geom1, geom2)` for all GI/Simple Features planar geometry.
This also refactors GEOS to work under the algorithm interface as well as laying the foundation for a future hypothetical PROJ algorithm, that we could use for reproject or segmentize.
> [!NOTE]
> I'm deliberately not testing TG along with GO in the operations since I don't want to deal with our tests, that require exact predicates, returning the wrong values from the inexact `tg`. However, I should and will add some tests elsewhere. This PR will also be a good proving ground for the new extension interface should there be one.
0 commit comments