diff --git a/src/fallbacks.jl b/src/fallbacks.jl index 2792161..9c501ad 100644 --- a/src/fallbacks.jl +++ b/src/fallbacks.jl @@ -95,6 +95,7 @@ issimple(t::AbstractMultiPointTrait, geom) = allunique((getgeom(t, geom))) issimple(t::AbstractMultiCurveTrait, geom) = all(issimple.(getgeom(t, geom))) isclosed(t::AbstractMultiCurveTrait, geom) = all(isclosed.(getgeom(t, geom))) +crs(::Nothing, geom) = nothing crs(::AbstractTrait, geom) = nothing # FeatureCollection diff --git a/test/test_primitives.jl b/test/test_primitives.jl index d20d911..3a1cfa0 100644 --- a/test/test_primitives.jl +++ b/test/test_primitives.jl @@ -478,6 +478,11 @@ end end +@testset "extent and crs fallback to nothing on unknown objects" begin + @test isnothing(GeoInterface.crs(nothing)) + @test isnothing(GeoInterface.extent(nothing)) +end + module ConvertTestModule using GeoInterface struct TestPolygon end