GeoInterface.jl icon indicating copy to clipboard operation
GeoInterface.jl copied to clipboard

Add operations for `Extent` type

Open henrik-wolf opened this issue 2 years ago • 3 comments
trafficstars

Would it be possible to add the appropriate GeoInterface methods (intersects, intersection, contains, union...) for the Extents.Extent type to this package? It feels a bit strange to have GeoInterface everywhere, except when working with extents, where you have to qualify the operations.

Ideally, this should go into Extents itself, but that does not seem possible. (and would this be considered type piracy? I am not sure, since GeoInterface owns the methods...)

henrik-wolf avatar Jul 24 '23 18:07 henrik-wolf

Yeah, we should add those methods here. Good catch.

evetion avatar Jul 24 '23 19:07 evetion

We should fill out all these methods in Extents.jl for just comparing extents with each other, which we partly have already and I'm extending in https://github.com/rafaqz/Extents.jl/pull/13

Then we can use those to build GeoInterface methods here on geometries with extents.

Extents.jl cant add GeoInterface methods because the dependency is the other way around

rafaqz avatar Aug 02 '23 07:08 rafaqz

Nice, this is exactly what I wanted to make an issue about, missing methods (within, etc) in Extents, that I can cover with GeoInterface. Will have a draft PR up soon for related work here.

evetion avatar Aug 02 '23 08:08 evetion

This is now covered to some extent in GeometryOps, at least for the predicates. At some point GO will also support extents in boolean ops (intersection, union, etc.).

asinghvi17 avatar May 15 '25 01:05 asinghvi17