Simple overrides
This file contains simple overrides for GEOS, essentially only those functions which have direct counterparts in LG and only require conversion before calling.
Polygon set operations
Difference
julia
function GO.difference(::GEOS, geom_a, geom_b; target=nothing, calc_extent = false)
return _wrap(LG.difference(GI.convert(LG, geom_a), GI.convert(LG, geom_b)); crs = GI.crs(geom_a), calc_extent)
endUnion
julia
function GO.union(::GEOS, geom_a, geom_b; target=nothing, calc_extent = false)
return _wrap(LG.union(GI.convert(LG, geom_a), GI.convert(LG, geom_b)); crs = GI.crs(geom_a), calc_extent)
endIntersection
julia
function GO.intersection(::GEOS, geom_a, geom_b; target=nothing, calc_extent = false)
return _wrap(LG.intersection(GI.convert(LG, geom_a), GI.convert(LG, geom_b)); crs = GI.crs(geom_a), calc_extent)
endSymmetric difference
julia
function GO.symdifference(::GEOS, geom_a, geom_b; target=nothing, calc_extent = false)
return _wrap(LG.symmetric_difference(GI.convert(LG, geom_a), GI.convert(LG, geom_b)); crs = GI.crs(geom_a), calc_extent)
endDE-9IM boolean methods
Equals
julia
function GO.equals(::GEOS, geom_a, geom_b)
return LG.equals(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endDisjoint
julia
function GO.disjoint(::GEOS, geom_a, geom_b)
return LG.disjoint(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endTouches
julia
function GO.touches(::GEOS, geom_a, geom_b)
return LG.touches(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endCrosses
julia
function GO.crosses(::GEOS, geom_a, geom_b)
return LG.crosses(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endWithin
julia
function GO.within(::GEOS, geom_a, geom_b)
return LG.within(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endContains
julia
function GO.contains(::GEOS, geom_a, geom_b)
return LG.contains(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endOverlaps
julia
function GO.overlaps(::GEOS, geom_a, geom_b)
return LG.overlaps(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endCovers
julia
function GO.covers(::GEOS, geom_a, geom_b)
return LG.covers(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endCoveredBy
julia
function GO.coveredby(::GEOS, geom_a, geom_b)
return LG.coveredby(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endIntersects
julia
function GO.intersects(::GEOS, geom_a, geom_b)
return LG.intersects(GI.convert(LG, geom_a), GI.convert(LG, geom_b))
endConvex hull
julia
function GO.convex_hull(::GEOS, geoms)
chull = LG.convexhull(
LG.MultiPoint(
collect(
GO.flatten(
x -> GI.convert(LG.Point, x),
GI.PointTrait,
geoms
)
)
)
);
return _wrap(
chull;
crs = GI.crs(geoms),
calc_extent = false
)
endThis page was generated using Literate.jl.