Class GeoPolygonCollection

java.lang.Object
com.azure.core.models.GeoObject
com.azure.core.models.GeoPolygonCollection
All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoObject>

public final class GeoPolygonCollection extends GeoObject

Represents a collection of GeoPolygons in GeoJSON format.

This class encapsulates a list of GeoPolygon instances that form a collection of polygons. Each polygon is defined by a list of GeoLinearRing instances that form the boundary of the polygon.

This class also provides a toJson(JsonWriter) method to serialize the collection of polygons to JSON, and a fromJson(JsonReader) method to deserialize a collection of polygons from JSON.

This class is useful when you want to work with a collection of polygons in a geographic context. For example, you can use it to represent a complex geographic area on a map that is composed of multiple polygons.

Note: A polygon collection requires at least one ring for each polygon, and each ring requires at least 4 coordinates (with the first and last coordinates being the same to form a closed loop).

See Also: