Skip to content

Commit

Permalink
handle feature collections
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaqz committed Nov 24, 2023
1 parent 8f571bf commit 159f8b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/methods/extract.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ end
function _extract(A::RasterStackOrArray, ::GI.AbstractFeatureTrait, feature; kw...)
_extract(A, GI.geometry(feature); kw...)
end
function _extract(A::RasterStackOrArray, ::GI.FeatureCollection, fc; kw...)
# Fall back to the Array/iterator method for feature collections
_extract(A, [GI.geometry(f) for f in GI.getfeature(fc)]; kw...)
end
function _extract(A::RasterStackOrArray, ::GI.AbstractMultiPointTrait, geom; skipmissing=false, kw...)
rows = (_extract_point(A, g; kw...) for g in GI.getpoint(geom))
return skipmissing ? collect(_skip_missing_rows(rows)) : collect(rows)
Expand Down

0 comments on commit 159f8b2

Please sign in to comment.