Class PolygonCoordinates



  • public final class PolygonCoordinates
    extends java.lang.Object
    Coordinates for a GeoJSON Polygon.
    Since:
    3.1
    • Constructor Summary

      Constructors 
      Constructor Description
      PolygonCoordinates​(java.util.List<Position> exterior, java.util.List<Position>... holes)
      Construct an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.List<Position> getExterior​()
      Gets the exterior of the polygon.
      java.util.List<java.util.List<Position>> getHoles​()
      Gets the holes in the polygon.
      int hashCode​()  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PolygonCoordinates

        public PolygonCoordinates​(java.util.List<Position> exterior,
                                  java.util.List<Position>... holes)
        Construct an instance.
        Parameters:
        exterior - the exterior ring of the polygon
        holes - optional interior rings of the polygon
    • Method Detail

      • getExterior

        public java.util.List<Position> getExterior​()
        Gets the exterior of the polygon.
        Returns:
        the exterior of the polygon
      • getHoles

        public java.util.List<java.util.List<Position>> getHoles​()
        Gets the holes in the polygon.
        Returns:
        the holes in the polygon, which will not be null but may be empty
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object