Skip to content

Commit

Permalink
Merge pull request #180 from JuliaGeometry/sd/fixgeo
Browse files Browse the repository at this point in the history
use concrete points
  • Loading branch information
SimonDanisch authored Sep 16, 2022
2 parents 9b2d1fc + 67c080a commit 9c7060f
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 9c7060f

Please sign in to comment.