public class OblongImpl extends Object implements Oblong
Oblong
.Constructor and Description |
---|
OblongImpl(double minX,
double minY,
double width,
double height,
CoordinateReferenceSystem crs)
Creates a new oblong.
|
Modifier and Type | Method and Description |
---|---|
double |
getArea()
Gets the area of this grid element.
|
ReferencedEnvelope |
getBounds()
Gets the bounds of this grid element.
|
Coordinate |
getCenter()
Gets the center coordinates of this grid element.
|
Coordinate[] |
getVertices()
Gets the vertices of this grid element.
|
Geometry |
toDenseGeometry(double maxSpacing)
Creates a new, densified
Geometry from this grid element. |
Geometry |
toGeometry()
Creates a new
Geometry from this grid element. |
public OblongImpl(double minX, double minY, double width, double height, CoordinateReferenceSystem crs)
minX
- minimum X ordinateminY
- minimum Y ordinatewidth
- span in the X directionheight
- span in the Y directioncrs
- coordinate reference system (may be null
)public double getArea()
getArea
in interface PolygonElement
public ReferencedEnvelope getBounds()
getBounds
in interface GridElement
public Coordinate getCenter()
getCenter
in interface PolygonElement
public Coordinate[] getVertices()
Vertex 0 is at the min X and Y coordinate (lower left) with the subsequent vertices being indexed clockwise.
getVertices
in interface GridElement
public Geometry toGeometry()
Geometry
from this grid element.toGeometry
in interface GridElement
Geometry
public Geometry toDenseGeometry(double maxSpacing)
Geometry
from this grid element.toDenseGeometry
in interface GridElement
maxSpacing
- the maximum distance between adjacent verticesGeometry
Copyright © 1996–2019 Geotools. All rights reserved.