Skip to content

Commit cd363a9

Browse files
committed
Collect all LinearRingTrant to LineStringTrait
1 parent 86fc11c commit cd363a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/GeometryBasicsGeoInterfaceExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ geointerface_geomtype(::GeoInterface.PointTrait) = Point
3434
geointerface_geomtype(::GeoInterface.MultiPointTrait) = MultiPoint
3535
geointerface_geomtype(::GeoInterface.LineTrait) = Line
3636
geointerface_geomtype(::GeoInterface.LineStringTrait) = LineString
37+
geointerface_geomtype(::GeoInterface.LinearRingTrait) = LineString
3738
geointerface_geomtype(::GeoInterface.MultiLineStringTrait) = MultiLineString
3839
geointerface_geomtype(::GeoInterface.PolygonTrait) = Polygon
3940
geointerface_geomtype(::GeoInterface.MultiPolygonTrait) = MultiPolygon
@@ -111,7 +112,7 @@ function GeoInterface.convert(::Type{Point}, type::PointTrait, geom)
111112
return Point{2,T}(x, y)
112113
end
113114
end
114-
function GeoInterface.convert(::Type{LineString}, type::LineStringTrait, geom)
115+
function GeoInterface.convert(::Type{LineString}, type::Union{LineStringTrait, LinearRingTrait}, geom)
115116
g1 = getgeom(geom, 1)
116117
x, y = GeoInterface.x(g1), GeoInterface.y(g1)
117118
if GeoInterface.is3d(geom)

0 commit comments

Comments
 (0)