Package org.geotools.grid.ortholine
Class OrthoLine
Object
OrthoLine
- All Implemented Interfaces:
GridElement
,LineElement
An ortho-line grid element.
- Since:
- 8.0
- Author:
- mbedward
-
Constructor Summary
ConstructorsConstructorDescriptionOrthoLine
(ReferencedEnvelope gridBounds, LineOrientation orientation, double ordinate, int level) Creates a new ortho-line element. -
Method Summary
Modifier and TypeMethodDescriptionGets the bounds of this grid element.int
getLevel()
Gets the level (precedence) associated with this line.Gets the orientation of this line.Gets the vertices of this grid element.toDenseGeometry
(double maxSpacing) Creates a new, densifiedGeometry
from this grid element.Creates a newGeometry
from this grid element.
-
Constructor Details
-
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.- Parameters:
gridBounds
- bounds of the area containing this lineorientation
- line orientationordinate
- position of the linelevel
- integer level associated with this line
-
-
Method Details
-
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 interfaceGridElement
- Returns:
- the bounding rectangle
-
getVertices
Gets the vertices of this grid element. These will be the end-points of the line element.- Specified by:
getVertices
in interfaceGridElement
- Returns:
- the vertices
-
getOrientation
Gets the orientation of this line.- Returns:
- the orientation
-
getLevel
public int getLevel()Gets the level (precedence) associated with this line.- Returns:
- the level
-
toGeometry
Description copied from interface:GridElement
Creates a newGeometry
from this grid element.- Specified by:
toGeometry
in interfaceGridElement
- Returns:
- a new
Geometry
-
toDenseGeometry
Description copied from interface:GridElement
Creates a new, densifiedGeometry
from this grid element.- Specified by:
toDenseGeometry
in interfaceGridElement
- Parameters:
maxSpacing
- the maximum distance between adjacent vertices- Returns:
- a new
Geometry
-