@@ -60,8 +60,7 @@ GeoInterface.getgeom(::MultiPointTrait, g::MultiPoint, i::Int) = g[i]
6060function GeoInterface. ngeom (:: MultiLineStringTrait , g:: MultiLineString )
6161 return length (g)
6262end
63- function GeoInterface. getgeom (:: MultiLineStringTrait , g:: MultiLineString ,
64- i:: Int )
63+ function GeoInterface. getgeom (:: MultiLineStringTrait , g:: MultiLineString , i:: Int )
6564 return g[i]
6665end
6766GeoInterface. ncoord (:: MultiLineStringTrait , g:: MultiLineString{Dim} ) where {Dim} = Dim
@@ -123,7 +122,7 @@ function GeoInterface.convert(::Type{Polygon}, type::PolygonTrait, geom)
123122 if GeoInterface. nhole (geom) == 0
124123 return Polygon (exterior)
125124 else
126- interiors = GeoInterface. convert . (LineString, Ref (t ), GeoInterface. gethole (geom))
125+ interiors = map (h -> GeoInterface. convert (LineString, t, h ), GeoInterface. gethole (geom))
127126 return Polygon (exterior, interiors)
128127 end
129128end
@@ -143,10 +142,10 @@ end
143142
144143function GeoInterface. convert (:: Type{MultiLineString} , type:: MultiLineStringTrait , geom)
145144 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)) )
147146end
148147
149148function GeoInterface. convert (:: Type{MultiPolygon} , type:: MultiPolygonTrait , geom)
150149 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)) )
152151end
0 commit comments