Class OrthoLine

    • Constructor Detail

      • OrthoLine

        public OrthoLine​(ReferencedEnvelope gridBounds,
                         LineOrientation orientation,
                         double ordinate,
                         int level)
        Creates a new ortho-line element. The line position is specified by a single ordinate which will be its X-ordinate if vertical, or its Y-ordinate if horizontal.
        gridBounds - bounds of the area containing this line
        orientation - line orientation
        ordinate - position of the line
        level - integer level associated with this line
    • Method Detail

      • getBounds

        public ReferencedEnvelope getBounds()
        Gets the bounds of this grid element. Note that this will be a degenerate rectangle with either 0 width, if the line is vertical, or zero height, if horizontal.
        Specified by:
        getBounds in interface GridElement
        the bounding rectangle
      • getVertices

        public Coordinate[] getVertices()
        Gets the vertices of this grid element. These will be the end-points of the line element.
        Specified by:
        getVertices in interface GridElement
        the vertices
      • getOrientation

        public LineOrientation getOrientation()
        Gets the orientation of this line.
        the orientation
      • getLevel

        public int getLevel()
        Gets the level (precedence) associated with this line.
        the level
      • toGeometry

        public Geometry toGeometry()
        Description copied from interface: GridElement
        Creates a new Geometry from this grid element.
        Specified by:
        toGeometry in interface GridElement
        a new Geometry
      • toDenseGeometry

        public Geometry toDenseGeometry​(double maxSpacing)
        Description copied from interface: GridElement
        Creates a new, densified Geometry from this grid element.
        Specified by:
        toDenseGeometry in interface GridElement
        maxSpacing - the maximum distance between adjacent vertices
        a new Geometry