@@ -60,8 +60,7 @@ GeoInterface.getgeom(::MultiPointTrait, g::MultiPoint, i::Int) = g[i]
60
60
function GeoInterface. ngeom (:: MultiLineStringTrait , g:: MultiLineString )
61
61
return length (g)
62
62
end
63
- function GeoInterface. getgeom (:: MultiLineStringTrait , g:: MultiLineString ,
64
- i:: Int )
63
+ function GeoInterface. getgeom (:: MultiLineStringTrait , g:: MultiLineString , i:: Int )
65
64
return g[i]
66
65
end
67
66
GeoInterface. ncoord (:: MultiLineStringTrait , g:: MultiLineString{Dim} ) where {Dim} = Dim
@@ -123,7 +122,7 @@ function GeoInterface.convert(::Type{Polygon}, type::PolygonTrait, geom)
123
122
if GeoInterface. nhole (geom) == 0
124
123
return Polygon (exterior)
125
124
else
126
- interiors = GeoInterface. convert . (LineString, Ref (t ), GeoInterface. gethole (geom))
125
+ interiors = map (h -> GeoInterface. convert (LineString, t, h ), GeoInterface. gethole (geom))
127
126
return Polygon (exterior, interiors)
128
127
end
129
128
end
@@ -143,10 +142,10 @@ end
143
142
144
143
function GeoInterface. convert (:: Type{MultiLineString} , type:: MultiLineStringTrait , geom)
145
144
t = LineStringTrait ()
146
- return MultiLineString ([ GeoInterface. convert (LineString, t, l) for l in getgeom (geom)] )
145
+ return MultiLineString (map (l -> GeoInterface. convert (LineString, t, l), getgeom (geom)) )
147
146
end
148
147
149
148
function GeoInterface. convert (:: Type{MultiPolygon} , type:: MultiPolygonTrait , geom)
150
149
t = PolygonTrait ()
151
- return MultiPolygon ([ GeoInterface. convert (Polygon, t, poly) for poly in getgeom (geom)] )
150
+ return MultiPolygon (map (poly -> GeoInterface. convert (Polygon, t, poly), getgeom (geom)) )
152
151
end
0 commit comments