class GeoJSON::MultiPolygon
- GeoJSON::MultiPolygon
- GeoJSON::Object
- Reference
- Object
Overview
A MultiPolygon is a Geometry representing several Polygons.
This class corresponds to the GeoJSON MultiPolygon.
Defined in:
geojson/multi_polygon.crConstructors
-
.new(pull : JSON::PullParser)
A
MultiPolygonis aGeometryrepresenting severalPolygons. -
.new(coordinates : Array(Polygon), *, bbox = nil)
Create a new
MultiPolygonwith the given coordinates and optional bounding box bbox. -
.new(coordinates : Array(Array(Array(Array(Float64)))), *, bbox = nil)
Create a new
MultiPolygonwith the given coordinates and optional bounding box bbox.
Instance Method Summary
-
#<<(polygon : Array(Polygon))
Adds the given polygon to this MultiPolygon.
-
#<<(coordinate : Array(Array(Array(Float64))))
Adds the given coordinate to this MultiPolygon.
-
#[](*args, **options)
Gets the
Polygonat the given index. -
#[](*args, **options, &)
Gets the
Polygonat the given index. -
#bbox
Calculates the bounding box for any GeoJSON object, including
FeatureCollection. -
#coordinates : Array(Array(Array(GeoJSON::Coordinates)))
Returns an array of this MultiPolygon's coordinates.
-
#type : String
Gets this MultiPolygon's GeoJSON type ("MultiPolygon")
Instance methods inherited from class GeoJSON::Object
bbox
bbox,
type : String
type
Constructor methods inherited from class GeoJSON::Object
new(pull : JSON::PullParser)
new
Constructor Detail
A MultiPolygon is a Geometry representing several Polygons.
This class corresponds to the GeoJSON MultiPolygon.
Create a new MultiPolygon with the given coordinates and optional
bounding box bbox.
Create a new MultiPolygon with the given coordinates and optional
bounding box bbox.
Instance Method Detail
Calculates the bounding box for any GeoJSON object, including FeatureCollection.
Returns an array of this MultiPolygon's coordinates.