Package org.geotools.grid.oblong
Class OblongImpl
Object
OblongImpl
- All Implemented Interfaces:
GridElement
,Oblong
,PolygonElement
Default implementation of
Oblong
.- Since:
- 2.7
- Author:
- mbedward
-
Constructor Summary
ConstructorsConstructorDescriptionOblongImpl
(double minX, double minY, double width, double height, CoordinateReferenceSystem crs) Creates a new oblong. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getArea()
Gets the area of this grid element.Gets the bounds of this grid element.Gets the center coordinates of this grid element.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
-
OblongImpl
public OblongImpl(double minX, double minY, double width, double height, CoordinateReferenceSystem crs) Creates a new oblong.- Parameters:
minX
- minimum X ordinateminY
- minimum Y ordinatewidth
- span in the X directionheight
- span in the Y directioncrs
- coordinate reference system (may benull
)
-
-
Method Details
-
getArea
public double getArea()Gets the area of this grid element.- Specified by:
getArea
in interfacePolygonElement
- Returns:
- the area
-
getBounds
Gets the bounds of this grid element.- Specified by:
getBounds
in interfaceGridElement
- Returns:
- the bounding rectangle
-
getCenter
Gets the center coordinates of this grid element.- Specified by:
getCenter
in interfacePolygonElement
- Returns:
- the center coordinates
-
getVertices
Gets the vertices of this grid element.Vertex 0 is at the min X and Y coordinate (lower left) with the subsequent vertices being indexed clockwise.
- Specified by:
getVertices
in interfaceGridElement
- Returns:
- the vertices
-
toGeometry
Creates a newGeometry
from this grid element.- Specified by:
toGeometry
in interfaceGridElement
- Returns:
- a new
Geometry
-
toDenseGeometry
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
-