Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/geointerface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,19 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM),
)
return f(GeoInterface.coordinates(geom))
end
function GeoInterface.convert(
::Type{T},
type::GeoInterface.GeometryCollectionTrait,
geom,
) where {T<:IGeometry}
collection = creategeomcollection()
map(GeoInterface.getgeom(geom)) do g
trait = GeoInterface.geomtrait(g)
t = geointerface_geomtype(trait)
addgeom!(collection, GeoInterface.convert(t, trait, g))
end
return collection
end

function GeoInterface.geomtrait(
geom::Union{map(T -> AbstractGeometry{T}, pointtypes)...},
Expand Down
Loading