Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use concrete points #180

Merged
merged 1 commit into from
Sep 16, 2022
Merged
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
6 changes: 3 additions & 3 deletions src/geointerface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ GeoInterface.getgeom(::PolyhedralSurfaceTrait, g::AbstractMesh, i) = g[i]

function GeoInterface.convert(::Type{Point}, type::PointTrait, geom)
dim = Int(ncoord(geom))
return Point{dim}(GeoInterface.coordinates(geom))
return Point{dim, Float64}(GeoInterface.coordinates(geom))
end

function GeoInterface.convert(::Type{LineString}, type::LineStringTrait, geom)
dim = Int(ncoord(geom))
return LineString([Point{dim}(GeoInterface.coordinates(p)) for p in getgeom(geom)])
return LineString([Point{dim, Float64}(GeoInterface.coordinates(p)) for p in getgeom(geom)])
end

function GeoInterface.convert(::Type{Polygon}, type::PolygonTrait, geom)
Expand All @@ -101,7 +101,7 @@ end

function GeoInterface.convert(::Type{MultiPoint}, type::MultiPointTrait, geom)
dim = Int(ncoord(geom))
return MultiPoint([Point{dim}(GeoInterface.coordinates(p)) for p in getgeom(geom)])
return MultiPoint([Point{dim, Float64}(GeoInterface.coordinates(p)) for p in getgeom(geom)])
end

function GeoInterface.convert(::Type{MultiLineString}, type::MultiLineStringTrait, geom)
Expand Down