Skip to content
Open
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
17 changes: 17 additions & 0 deletions src/geointerface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,21 @@ let pointtypes = (wkbPoint, wkbPoint25D, wkbPointM, wkbPointZM),
function GeoInterface.geomtrait(geom::AbstractGeometry{wkbTriangle})
return GeoInterface.TriangleTrait()
end

# coordtype implementations - guarded against old GeoInterface versions
if :coordtype in names(GeoInterface; all = true)
# ArchGDAL always uses Float64 for coordinates
function GeoInterface.coordtype(::GeoInterface.AbstractGeometryTrait, ::AbstractGeometry)
return Float64
end

function GeoInterface.coordtype(::GeoInterface.FeatureTrait, ::AbstractFeature)
return Float64
end

# AbstractFeatureLayer acts like a FeatureCollection in ArchGDAL
function GeoInterface.coordtype(::GeoInterface.FeatureCollectionTrait, ::AbstractFeatureLayer)
return Float64
end
end
end
Loading