Skip to content

Commit

Permalink
Support extraction of a set of features (#76)
Browse files Browse the repository at this point in the history
e.g., `fc[1]; fc[1:10]; fc[[1,20,30,40,50]]`
  • Loading branch information
ConnectedSystems committed Jul 12, 2023
1 parent f88f2c1 commit 2dd6116
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/geojson_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ Base.length(fc::AbstractFeatureCollection) = length(features(fc))
Base.lastindex(fc::AbstractFeatureCollection) = length(features(fc))
Base.IteratorSize(::Type{<:AbstractFeatureCollection}) = Base.HasLength()
Base.size(fc::AbstractFeatureCollection) = size(features(fc))
Base.getindex(fc::AbstractFeatureCollection, i::Int) = features(fc)[i]
Base.getindex(fc::AbstractFeatureCollection, i::Union{Int,UnitRange,Vector}) = features(fc)[i]
Base.IndexStyle(::AbstractFeatureCollection) = IndexLinear()

bbox(x::GeoJSONT) = getfield(x, :bbox)
Expand Down

0 comments on commit 2dd6116

Please sign in to comment.