diff --git a/src/base.jl b/src/base.jl index acd299ea..60238078 100644 --- a/src/base.jl +++ b/src/base.jl @@ -28,7 +28,7 @@ GeoInterface.coordnames(::PointTrait, geom::NamedTuple{Keys,NTuple{N,T}}) where # Default features using NamedTuple and AbstractArray -const NamedTupleFeature = NamedTuple{(:geometry,:properties)} +const NamedTupleFeature = NamedTuple{(:geometry, :properties)} GeoInterface.isfeature(::Type{<:NamedTupleFeature}) = true GeoInterface.trait(::NamedTupleFeature) = FeatureTrait() @@ -41,3 +41,4 @@ GeoInterface.isfeaturecollection(::Type{<:ArrayFeatureCollection}) = true GeoInterface.trait(::ArrayFeatureCollection) = FeatureCollectionTrait() GeoInterface.nfeature(::FeatureCollectionTrait, fc::ArrayFeatureCollection) = Base.length(fc) GeoInterface.getfeature(::FeatureCollectionTrait, fc::ArrayFeatureCollection, i::Integer) = fc[i] +GeoInterface.geometrycolumns(fc::ArrayFeatureCollection) = (:geometry,) diff --git a/src/interface.jl b/src/interface.jl index 646eb8f7..5800e9de 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -39,7 +39,7 @@ isfeaturecollection(x::T) where {T} = isfeaturecollection(T) isfeaturecollection(::Type{T}) where {T} = false """ - GeoInterface.geometrycolumns(featurecollection) => (:geom,) + GeoInterface.geometrycolumns(featurecollection) => (:geometry,) Retrieve the geometrycolumn(s) of `featurecollection`; the fields (or columns in a table) which contain geometries that support GeoInterface. diff --git a/test/test_primitives.jl b/test/test_primitives.jl index 8197aebc..37c16949 100644 --- a/test/test_primitives.jl +++ b/test/test_primitives.jl @@ -75,7 +75,7 @@ using Test GeoInterface.isfeature(::Type{<:MyFeature}) = true GeoInterface.trait(feature::MyFeature) = FeatureTrait() - GeoInterface.geometry(f::MyFeature) = f.geometry + GeoInterface.geometry(f::MyFeature) = f.geometry GeoInterface.properties(f::MyFeature) = f.properties GeoInterface.extent(f::MyFeature) = nothing