This commit is contained in:
Alex Roitman 2018-05-09 16:02:06 -07:00
parent c00dcc6632
commit 92032f05f1
1 changed files with 2 additions and 4 deletions

View File

@ -219,10 +219,8 @@ func (g MultiPolygon) Clipped(bbox BBox) Object {
var new_coordinates [][][]Position var new_coordinates [][][]Position
for _, polygon := range g.polygons { for _, polygon := range g.polygons {
clippedMultiPolygon, _ := polygon.Clipped(bbox).(MultiPolygon) clippedPolygon, _ := polygon.Clipped(bbox).(Polygon)
for _, pg := range clippedMultiPolygon.Coordinates { new_coordinates = append(new_coordinates, clippedPolygon.Coordinates)
new_coordinates = append(new_coordinates, pg)
}
} }
res, _ := fillMultiPolygon(new_coordinates, nil, nil) res, _ := fillMultiPolygon(new_coordinates, nil, nil)