diff --git a/Project.toml b/Project.toml index fc6c61a..8dd2370 100644 --- a/Project.toml +++ b/Project.toml @@ -3,7 +3,7 @@ uuid = "0f680547-7be7-4555-8820-bb198eeb646b" authors = [ "Maarten Pronk and contributors." ] -version = "0.2.5" +version = "0.2.6" [deps] GeoFormatTypes = "68eda718-8dee-11e9-39e7-89f7f65f511f" diff --git a/src/wkb.jl b/src/wkb.jl index 0e31981..d0c7faa 100644 --- a/src/wkb.jl +++ b/src/wkb.jl @@ -146,6 +146,7 @@ function check_endianness(data) end GI.isgeometry(::WKBtype) = true +GI.isgeometry(::Type{<:GFT.WellKnownBinary}) = true function GI.geomtrait(geom::WKBtype) check_endianness(geom.val) diff --git a/src/wkt.jl b/src/wkt.jl index 9dd7c30..74efa19 100644 --- a/src/wkt.jl +++ b/src/wkt.jl @@ -118,6 +118,7 @@ end # Implement GeoInterface for WKT, as wrapped by GeoFormatTypes const WKTtype = GFT.WellKnownText{GFT.Geom} GI.isgeometry(::WKTtype) = true +GI.isgeometry(::Type{<:GFT.WellKnownText{GFT.Geom}}) = true Base.getindex(wkt::WKTtype, i) = GFT.WellKnownText(gftgeom, wkt.val[i]) Base.lastindex(wkt::WKTtype) = lastindex(wkt.val) diff --git a/test/runtests.jl b/test/runtests.jl index 7fa2018..2b98f5d 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -98,7 +98,9 @@ import LibGEOS wkb = GFT.WellKnownBinary(GFT.Geom(), [0x0]) @test GI.isgeometry(wkt) + @test GI.isgeometry(typeof(wkt)) @test GI.isgeometry(wkb) + @test GI.isgeometry(typeof(wkb)) wkt = GFT.WellKnownText(GFT.Geom(), "POINT (30 10)") @test GI.testgeometry(wkt)