From 96c9c98b864b0392eaa7e854f8a52ca470925297 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Tue, 2 Apr 2024 20:08:10 -0400 Subject: [PATCH 1/3] Subscribe to FeatureTrait() for Shapefile.Row --- src/table.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/src/table.jl b/src/table.jl index fd9204d..55abaf5 100644 --- a/src/table.jl +++ b/src/table.jl @@ -26,6 +26,7 @@ end Base.propertynames(row::Row) = [:geometry, propertynames(getfield(row, :record))...] GeoInterface.isfeature(t::Row) = true +GeoInterface.trait(::Row) = GeoInterface.FeatureTrait() GeoInterface.geometry(t::Row) = getfield(t, :geometry) GeoInterface.properties(t::Row) = getfield(t, :record) From 84167e7d7b6239ff2b3dc7a26c7fe97b0ecc03b0 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Tue, 2 Apr 2024 20:08:39 -0400 Subject: [PATCH 2/3] Bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2d240c3..22c53eb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Shapefile" uuid = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4" license = "MIT" -version = "0.13.0" +version = "0.13.1" [deps] DBFTables = "75c7ada1-017a-5fb6-b8c7-2125ff2d6c93" From 823e83791d8b48890fc9e70d07fc011ea7c6b09b Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Wed, 3 Apr 2024 07:57:03 -0400 Subject: [PATCH 3/3] Add a test --- test/table.jl | 1 + 1 file changed, 1 insertion(+) diff --git a/test/table.jl b/test/table.jl index 1750b55..78fdbda 100644 --- a/test/table.jl +++ b/test/table.jl @@ -111,6 +111,7 @@ wkt = "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",637813 @test size(df_land) == (127, 4) @test names(df_land) == ["geometry", "featurecla", "scalerank", "min_zoom"] df_land.featurecla isa Vector{Union{String,Missing}} + @test GeoInterface.trait(GeoInterface.getfeature(ne_land, 1)) isa GeoInterface.FeatureTrait end @testset "ne_coastline" begin