Class: MultiPolygon

.Geo. MultiPolygon


new MultiPolygon(positions [, boundaryBox])

A GeoJSON MultiPolygon object

Parameters:
Name Type Argument Description
positions Array

An array of Polygon position arrays

boundaryBox Array <optional>

An array with [min. longitude, min. latitude, max. longitude, max. latitude]

Example
var polygons = new jsonOdm.Geo.MultiPolygon([
   [
     [[51.2,32],[51.4,21],[51.6,21],[51.2,21]],
     [[51.5,32],[51.6,21],[51.7,21],[51.5,21]]
   ],
   [
     [[51.2,32],[51.4,21],[51.6,21],[51.2,21]],
     [[51.5,32],[51.6,21],[51.7,21],[51.5,21]]
   ]
]);

Methods


<static> intersects(multiPolygon, geometry)

Checks whether a MultiPolygon intersects another geometry

Parameters:
Name Type Description
multiPolygon jsonOdm.Geo.MultiPolygon
geometry jsonOdm.Geo.Point | jsonOdm.Geo.BoundaryBox | jsonOdm.Geo.MultiPoint | jsonOdm.Geo.LineString | jsonOdm.Geo.MultiLineString | jsonOdm.Geo.Polygon | jsonOdm.Geo.MultiPolygon | jsonOdm.Geo.GeometryCollection

Any jsonOdm.Geo.<geometry> object

Returns:
Type
boolean

<static> within(multiPolygon, geometry)

Checks whether a MultiPolygon is inside of another geometry

Parameters:
Name Type Description
multiPolygon jsonOdm.Geo.MultiPolygon
geometry jsonOdm.Geo.Point | jsonOdm.Geo.BoundaryBox | jsonOdm.Geo.MultiPoint | jsonOdm.Geo.LineString | jsonOdm.Geo.MultiLineString | jsonOdm.Geo.Polygon | jsonOdm.Geo.MultiPolygon | jsonOdm.Geo.GeometryCollection

Any jsonOdm.Geo.<geometry> object

Returns:
Type
boolean