From c7a4a1e7694709e907681f12c38caf67eba32806 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Wed, 23 Oct 2024 15:08:17 -0700 Subject: [PATCH] Remove ambiguity and implement `getgeom`, `ngeom` for `Wrappers.Point` --- src/wrappers.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wrappers.jl b/src/wrappers.jl index 5ddfac0..2f36101 100644 --- a/src/wrappers.jl +++ b/src/wrappers.jl @@ -318,6 +318,10 @@ convert(::Type{Point}, ::PointTrait, geom) = Point(geom) convert(::Type{Point}, ::PointTrait, geom::Point) = geom extent(trait::PointTrait, geom::Point) = extent(trait, parent(geom)) +ngeom(::PointTrait, geom::Point) = 0 +getgeom(::PointTrait, geom::Point) = nothing +getgeom(::PointTrait, geom::Point, i) = nothing + x(trait::PointTrait, geom::Point) = x(trait, parent(geom)) y(trait::PointTrait, geom::Point) = y(trait, parent(geom)) z(trait::PointTrait, geom::Point{true}) = z(trait, parent(geom))