|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectHexagonImpl
public class HexagonImpl
Default implementation of Hexagon
.
Constructor Summary | |
---|---|
HexagonImpl(double minX,
double minY,
double sideLen,
HexagonOrientation orientation,
CoordinateReferenceSystem crs)
Creates a new hexagon. |
Method Summary | |
---|---|
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. |
HexagonOrientation |
getOrientation()
Gets the orientation of this hexagon. |
double |
getSideLength()
Gets the side length of this hexagon. |
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. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HexagonImpl(double minX, double minY, double sideLen, HexagonOrientation orientation, CoordinateReferenceSystem crs)
minX
- the min X ordinate of the bounding rectangleminY
- the min Y ordinate of the bounding rectanglesideLen
- the side lengthorientation
- either Hexagon.Orientation.FLAT
or
Hexagon.Orientation.ANGLED
crs
- the coordinate reference system (may be null
)Method Detail |
---|
public double getSideLength()
getSideLength
in interface Hexagon
public double getArea()
getArea
in interface PolygonElement
public HexagonOrientation getOrientation()
getOrientation
in interface Hexagon
public Coordinate[] getVertices()
getVertices
in interface GridElement
Coordinates
public ReferencedEnvelope getBounds()
getBounds
in interface GridElement
public Coordinate getCenter()
getCenter
in interface PolygonElement
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 vertices
Geometry
IllegalArgumentException
- if maxSpacing
is not a positive value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |