Package org.geotools.grid.oval
Class OvalImpl
- Object
-
- OvalImpl
-
- All Implemented Interfaces:
GridElement,Oval,PolygonElement
public class OvalImpl extends Object implements Oval
Default implementation ofOval.
-
-
Constructor Summary
Constructors Constructor Description OvalImpl(double minX, double minY, double width, double height, CoordinateReferenceSystem crs)Creates a new oblong.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetArea()Gets the area of this grid element.ReferencedEnvelopegetBounds()Gets the bounds of this grid element.CoordinategetCenter()Gets the center coordinates of this grid element.Coordinate[]getVertices()Gets the vertices of this grid element.GeometrytoDenseGeometry(double maxSpacing)Creates a new, densifiedGeometryfrom this grid element.GeometrytoGeometry()Creates a newGeometryfrom this grid element.
-
-
-
Constructor Detail
-
OvalImpl
public OvalImpl(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 Detail
-
getArea
public double getArea()
Gets the area of this grid element.- Specified by:
getAreain interfacePolygonElement- Returns:
- the area
-
getBounds
public ReferencedEnvelope getBounds()
Gets the bounds of this grid element.- Specified by:
getBoundsin interfaceGridElement- Returns:
- the bounding rectangle
-
getCenter
public Coordinate getCenter()
Gets the center coordinates of this grid element.- Specified by:
getCenterin interfacePolygonElement- Returns:
- the center coordinates
-
getVertices
public Coordinate[] 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:
getVerticesin interfaceGridElement- Returns:
- the vertices
-
toGeometry
public Geometry toGeometry()
Creates a newGeometryfrom this grid element.- Specified by:
toGeometryin interfaceGridElement- Returns:
- a new
Geometry
-
toDenseGeometry
public Geometry toDenseGeometry(double maxSpacing)
Creates a new, densifiedGeometryfrom this grid element.- Specified by:
toDenseGeometryin interfaceGridElement- Parameters:
maxSpacing- the maximum distance between adjacent vertices- Returns:
- a new
Geometry
-
-