From 92032f05f1b788a38cfd4937c5c9efb560646a04 Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Wed, 9 May 2018 16:02:06 -0700 Subject: [PATCH] Fix --- pkg/geojson/multipolygon.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/geojson/multipolygon.go b/pkg/geojson/multipolygon.go index 806f9ca1..2243b202 100644 --- a/pkg/geojson/multipolygon.go +++ b/pkg/geojson/multipolygon.go @@ -219,10 +219,8 @@ func (g MultiPolygon) Clipped(bbox BBox) Object { var new_coordinates [][][]Position for _, polygon := range g.polygons { - clippedMultiPolygon, _ := polygon.Clipped(bbox).(MultiPolygon) - for _, pg := range clippedMultiPolygon.Coordinates { - new_coordinates = append(new_coordinates, pg) - } + clippedPolygon, _ := polygon.Clipped(bbox).(Polygon) + new_coordinates = append(new_coordinates, clippedPolygon.Coordinates) } res, _ := fillMultiPolygon(new_coordinates, nil, nil)