Convert a {@link MultiPolygon} to a {@link MultiPolygonOptions}

@param multiPolygon multi polygon
@return multi polygon options
426409
public MultiPolygonOptions toPolygons(MultiPolygon multiPolygon) {

        MultiPolygonOptions polygons = new MultiPolygonOptions();

        for (Polygon polygon : multiPolygon.getPolygons()) {
            PolygonOptions polygonOptions = toPolygon(polygon);
            polygons.add(polygonOptions);
        }

        return polygons;
    }
72645
public static List<WayDataBlock> toWayDataBlockList(Geometry geometry) {
        List<WayDataBlock> res = new ArrayList<>();
        if (geometry instanceof MultiPolygon) {
            MultiPolygon mp = (MultiPolygon) geometry;
            for (int i = 0; i < mp.getNumGeometries(); i++) {
                Polygon p = (Polygon) mp.getGeometryN(i);
                List<Integer> outer = toCoordinateList(p.getExteriorRing());
                if (outer.size() / 2 > 0) {
                    List<List<Integer>> inner = new ArrayList<>();
                    for (int j = 0; j < p.getNumInteriorRing(); j++) {
                        List<Integer> innr = toCoordinateList(p.getInteriorRingN(j));
                        if (innr.size() / 2 > 0) {
                            inner.add(innr);
                        }
                    }
                    res.add(new WayDataBlock(outer, inner));
                }
            }
        } else if (geometry instanceof Polygon) {
            Polygon p = (Polygon) geometry;
            List<Integer> outer = toCoordinateList(p.getExteriorRing());
            if (outer.size() / 2 > 0) {
                List<List<Integer>> inner = new ArrayList<>();
                for (int i = 0; i < p.getNumInteriorRing(); i++) {
                    List<Integer> innr = toCoordinateList(p.getInteriorRingN(i));
                    if (innr.size() / 2 > 0) {
                        inner.add(innr);
                    }
                }
                res.add(new WayDataBlock(outer, inner));
            }
        } else if (geometry instanceof MultiLineString) {
            MultiLineString ml = (MultiLineString) geometry;
            for (int i = 0; i < ml.getNumGeometries(); i++) {
                LineString l = (LineString) ml.getGeometryN(i);
                List<Integer> outer = toCoordinateList(l);
                if (outer.size() / 2 > 0) {
                    res.add(new WayDataBlock(outer, null));
                }
            }
        } else if (geometry instanceof LinearRing || geometry instanceof LineString) {
            List<Integer> outer = toCoordinateList(geometry);
            if (outer.size() / 2 > 0) {
                res.add(new WayDataBlock(outer, null));
            }
        } else if (geometry instanceof GeometryCollection) {
            GeometryCollection gc = (GeometryCollection) geometry;
            for (int i = 0; i < gc.getNumGeometries(); i++) {
                List<WayDataBlock> recursiveResult = toWayDataBlockList(gc.getGeometryN(i));
                for (WayDataBlock wayDataBlock : recursiveResult) {
                    List<Integer> outer = wayDataBlock.getOuterWay();
                    if (outer.size() / 2 > 0) {
                        res.add(wayDataBlock);
                    }
                }
            }
        }

        return res;
    }
865483
public static <K, V extends Comparable> SortedSetMultimap<K, V> createSortedSetMultiValueMap() {
		return MultimapBuilder.hashKeys().treeSetValues().build();
	}
555446
public static MultiPoint createMultiPoint(Geometry geom) {
        if (geom != null) {
            return GEOMETRY_FACTORY.createMultiPoint(geom.getCoordinates());
        } else {
            return null;
        }
    }
333557
function MultiPolygon(input){
    if(input && input.type === "MultiPolygon" && input.coordinates){
      extend(this, input);
    } else if(isArray(input)) {
      this.coordinates = input;
    } else {
      throw "Terraformer: invalid input for Terraformer.MultiPolygon";
    }

    this.type = "MultiPolygon";
  }
1312301
function(node) {
            var nodeList = this.getElementsByTagNameNS(node, this.gmlns,
                                                       "Polygon");
            var components = [];
            if(nodeList.length > 0) {
                var polygon;
                for(var i=0; i<nodeList.length; ++i) {
                    polygon = this.parseGeometry.polygon.apply(this,
                                                               [nodeList[i]]);
                    if(polygon) {
                        components.push(polygon);
                    }
                }
            }
            return new OpenLayers.Geometry.MultiPolygon(components);
        }
976592
public static double[] bbox(MultiPolygon multiPolygon) {
    List<Point> resultCoords = TurfMeta.coordAll(multiPolygon, false);
    return bboxCalculator(resultCoords);
  }
1020329
public Polygon toPolygon(List<LatLng> latLngs, List<List<LatLng>> holes) {
        return toPolygon(latLngs, holes, false, false);
    }
70509
private function readMultiPolygon(WKBBuffer $buffer, CoordinateSystem $cs) : MultiPolygon
    {
        $numPolygons = $buffer->readUnsignedLong();
        $polygons = [];

        for ($i = 0; $i < $numPolygons; $i++) {
            $polygons[] = $this->readGeometry($buffer, $cs->SRID());
        }

        return new MultiPolygon($cs, ...$polygons);
    }
1085434
public FillOptions withLatLngs(List<List<LatLng>> latLngs) {
    List<List<Point>> points = new ArrayList<>();
    for (List<LatLng> innerLatLngs : latLngs) {
      List<Point>innerList = new ArrayList<>();
      for (LatLng latLng : innerLatLngs) {
        innerList.add(Point.fromLngLat(latLng.getLongitude(), latLng.getLatitude()));
      }
      points.add(innerList);
    }
    geometry = Polygon.fromLngLats(points);
    return this;
  }
554043
public List<Polygon> polygons() {
    List<List<List<Point>>> coordinates = coordinates();
    List<Polygon> polygons = new ArrayList<>(coordinates.size());
    for (List<List<Point>> points : coordinates) {
      polygons.add(Polygon.fromLngLats(points));
    }
    return polygons;
  }
967910
public MultiPolygon toMultiPolygon(
            List<com.google.android.gms.maps.model.Polygon> polygonList) {
        return toMultiPolygon(polygonList, false, false);
    }
109930
function MultiPolygon(multiPolygon) {
        crs(multiPolygon);
        bbox(multiPolygon);
        if (!requiredProperty(multiPolygon, 'coordinates', 'array')) {
            if (!positionArray(multiPolygon.coordinates, 'LinearRing', 3)) {
                rightHandRule(multiPolygon, errors);
            }
        }
    }
1163263
public Multiset<O> intersection(Multiset<O> multiset) throws ParameterException {
		Validate.notNull(multiset);
		Multiset<O> result = new Multiset<>();
		for (O o : support()) {
			if (multiset.multiplicity(o) > 0) {
				result.setMultiplicity(o, Math.min(multiplicity(o), multiset.multiplicity(o)));
			}
		}
		return result;
	}
208241
public static Polygon getMultiTilePolygon (MisoSceneMetrics metrics,
                                               Point sp1, Point sp2)
    {
        int x = Math.min(sp1.x, sp2.x), y = Math.min(sp1.y, sp2.y);
        int width = Math.abs(sp1.x-sp2.x)+1, height = Math.abs(sp1.y-sp2.y)+1;
        return getFootprintPolygon(metrics, x, y, width, height);
    }
840378
public static JTSPolygonExpression<Polygon> polygonOperation(Operator op, Expression<?>... args) {
        return new JTSPolygonOperation<Polygon>(Polygon.class, op, args);
    }
93932
public static MultiPolygon of(Iterable<Polygon> polygons) {
        MultiDimensionalPositions.Builder positionsBuilder = MultiDimensionalPositions.builder();
        for(Polygon polygon : polygons) {
            positionsBuilder.addAreaPosition(polygon.positions());
        }

        return new MultiPolygon(positionsBuilder.build());
    }