Class GeoPolygon


  • public final class GeoPolygon
    extends GeoObject
    Represents a geometric polygon.
    • Constructor Detail

      • GeoPolygon

        public GeoPolygon​(GeoLinearRing ring)
        Constructs a geometric polygon.
        Parameters:
        ring - The ring that defines the polygon.
        Throws:
        NullPointerException - If ring is null.
      • GeoPolygon

        public GeoPolygon​(GeoLinearRing ring,
                          GeoBoundingBox boundingBox,
                          Map<String,​Object> customProperties)
        Constructs a geometric polygon.
        Parameters:
        ring - The ring that defines the polygon.
        boundingBox - Bounding box for the polygon.
        customProperties - Additional properties of the polygon.
        Throws:
        NullPointerException - If ring is null.
      • GeoPolygon

        public GeoPolygon​(List<GeoLinearRing> rings,
                          GeoBoundingBox boundingBox,
                          Map<String,​Object> customProperties)
        Constructs a geometric polygon.
        Parameters:
        rings - The rings that define the polygon.
        boundingBox - Bounding box for the polygon.
        customProperties - Additional properties of the polygon.
        Throws:
        NullPointerException - If rings is null.
    • Method Detail

      • getOuterRing

        public GeoLinearRing getOuterRing()
        Gets the outer ring of the polygon.
        Returns:
        Outer ring of the polygon.
      • getType

        public GeoObjectType getType()
        Description copied from class: GeoObject
        Gets the GeoJSON type for this object.
        Specified by:
        getType in class GeoObject
        Returns:
        The GeoJSON type for this object.