GeoJSON.jl
GeoJSON.jl copied to clipboard
Allow `write` for ` Vector` or even other itererables of geometries.
It would be nice if arrays/iterables of geometries would just write as a GeometryCollection without having to explicitly wrap them as that, as its a common way to hold and manipulate geometries you are working on.
Wouldn't the correct handling for this be a FeatureCollection with no attributes?
Probably!
function vec2fc(vec)
@assert all(x -> !isnothing(GI.geomtrait(x)), vec)
fc = GI.FeatureCollection(GI.Feature.(vec; properties = (;))
end
ought to work as the core conversion method, if someone wants to take this up.