Skip to content

Commit e708dd1

Browse files
committed
Back to Dict and original performance.
1 parent e3df4c7 commit e708dd1

File tree

4 files changed

+236
-26
lines changed

4 files changed

+236
-26
lines changed

src/geojson_types.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ end
163163
A Feature with `D` dimensional geometry.
164164
"""
165165
struct Feature{D,T} <: GeoJSONT{D,T}
166-
id::Union{Nothing,String,Int}
166+
id::Any
167167
bbox::Union{Nothing,Vector{T}}
168168
geometry::Union{Nothing,AbstractGeometry{D,T}}
169-
properties::Union{Nothing,NamedTuple}
169+
properties::Union{Nothing,Dict{Symbol,Any}}
170170
Feature{D,T}(id, bbox, geometry, properties) where {D,T} = new{D,T}(id, bbox, geometry, properties)
171171
Feature{D,T}(; id=nothing, bbox=nothing, geometry=nothing, properties=NamedTuple()) where {D,T} = Feature{D,T}(id, bbox, geometry, properties)
172172
end
@@ -176,7 +176,7 @@ id(f::Feature) = getfield(f, :id)
176176
geometry(f::Feature) = getfield(f, :geometry)
177177
function properties(f::Feature)
178178
props = getfield(f, :properties)
179-
return isnothing(props) ? (;) : props
179+
return isnothing(props) ? Dict{Symbol,Any}() : props
180180
end
181181

182182
coordinates(f::Feature) = coordinates(geometry(f))

0 commit comments

Comments
 (0)