Class SimplePolygon

    • Constructor Detail

      • SimplePolygon

        public SimplePolygon​(List<HorizontalPosition> vertices)
        Construct a new SimplePolygon
        Parameters:
        vertices - An ordered list of vertices. Must all be in the same CoordinateReferenceSystem
    • Method Detail

      • contains

        public boolean contains​(double x,
                                double y)
        Description copied from class: AbstractPolygon

        This default implementation constructs a Path2D consisting of the vertices of the polygon, and uses this to test for containment. Subclasses may be able to override with a more efficient method.

        Overrides:
        contains in class AbstractPolygon
      • getCoordinateReferenceSystem

        public org.opengis.referencing.crs.CoordinateReferenceSystem getCoordinateReferenceSystem()
        Description copied from interface: Polygon
        Returns the two-dimensional horizontal coordinate reference system to which the vertices are referenced.
        Returns:
        the two-dimensional horizontal coordinate reference system to which the vertices are referenced.
      • getVertices

        public List<HorizontalPosition> getVertices()
        Description copied from interface: Polygon
        Returns the list of vertices that define this polygon in the horizontal plane. The coordinates of the vertices are defined in this object's coordinate reference system. The HorizontalPositions must have the same CRS as this object. Points returned here are in clockwise order. The polygon is considered closed.
        Returns:
        the list of vertices that define this polygon in the horizontal plane.