public class Ellipse extends DefaultGeometry implements Surface, EllipseTypeGeometry
GEOMETRY_ANNOTATION, GEOMETRY_COMPLEX, GEOMETRY_ELLIPSE, GEOMETRY_LINE, GEOMETRY_LINEAR_RING, GEOMETRY_LINESTRING, GEOMETRY_MULTI_ANNOTATION, GEOMETRY_MULTI_LINESTRING, GEOMETRY_MULTI_POINT, GEOMETRY_MULTI_POLYGON, GEOMETRY_POINT, GEOMETRY_POLYGON, GEOMETRY_RECTANGLE| Constructor and Description |
|---|
Ellipse(Point coord,
Dimension semiAxes,
float angle)
Creates a new Ellipse using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
double |
area()
Computes and returns the surface area.
|
Geometry |
boundary()
Returns the boundary of this geometry as a line string.
|
Point |
centroid()
Returns the centroid of the current surface.
|
Ellipse |
clone()
Clones this geometry.
|
Point[] |
computeEndPoints(double a,
double b,
double cosTheta,
double sinTheta) |
Point[] |
computeFocusPoints(double a,
double b,
double cosTheta,
double sinTheta) |
void |
createBounds()
Updates the geometry bounds from the current geometry.
|
EllipseGeometryIterator |
ellipseIterator() |
boolean |
equals(java.lang.Object o) |
float |
getAngle() |
Rectangle |
getBounds()
Returns the minimum bounding rectangle of this geometry.
|
Point |
getCenteredPoint()
This method returns a point that is typically centered on the geometry.
|
Point |
getCoord()
Returns the ellipse origin.
Note that the origin may not be included in the ellipse surface. |
short |
getGeometryId()
Returns the geometry class id.
|
int |
getGeometryType()
Returns the geometry type for this geometry.
|
Dimension |
getSemiAxes() |
int |
hashCode() |
double |
length()
Returns the perimeter approximation, according to Ramanujan's formula.
|
Point |
pointOnSurface()
Returns a point that is located in the interior of this surface geometry.
|
Point[] |
serialize()
Returns this geometry as an array of Point.
|
void |
setCoord(Point coord) |
void |
setSemiAxes(Dimension semiAxes) |
int |
sizeOf()
Returns an approximation in bytes of the memory used by this geometry.
|
boolean |
spatiallyEquals(Geometry geometry,
PrecisionModel precisionModel)
Tests if this geometry is equal to the argument, on a topological point of view.
|
Polygon |
toPolygon() |
java.lang.String |
toString()
Returns informations about the current geometry.
|
Geometry |
transform(Transformation tr)
Creates a clone of the current geometry and returns
the new instance transformed with the specified geometry transformation.
The returned geometry can be of any geometry types after the transformation. |
void |
translate(double dx,
double dy)
Translate this geometry with the specified values.
|
asText, spatiallyEqualsfinalize, getClass, notify, notifyAll, wait, wait, waitasText, spatiallyEqualspublic Ellipse clone()
clone in interface Geometryclone in class DefaultGeometrypublic EllipseGeometryIterator ellipseIterator()
ellipseIterator in interface EllipseTypeGeometrypublic short getGeometryId()
getGeometryId in interface Geometrypublic int getGeometryType()
getGeometryType in interface Geometryfor more details.public Geometry boundary()
public void createBounds()
GeometrycreateBounds in interface Geometrypublic Rectangle getBounds()
public Point getCenteredPoint()
getCenteredPoint in interface Geometrypublic Point[] serialize()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic boolean spatiallyEquals(Geometry geometry, PrecisionModel precisionModel)
spatiallyEquals in interface Geometrygeometry - the geometry to be tested.precisionModel - the precision model to use while comparing geometries.public Geometry transform(Transformation tr)
public void translate(double dx,
double dy)
public double area()
public double length()
public Point centroid()
centroid in interface EllipseTypeGeometrycentroid in interface Surfacepublic Point pointOnSurface()
pointOnSurface in interface EllipseTypeGeometrypointOnSurface in interface Surfacepublic float getAngle()
public Dimension getSemiAxes()
public void setSemiAxes(Dimension semiAxes)
public Point getCoord()
public void setCoord(Point coord)
public Point[] computeFocusPoints(double a, double b, double cosTheta, double sinTheta)
public Point[] computeEndPoints(double a, double b, double cosTheta, double sinTheta)
public Polygon toPolygon()
public java.lang.String toString()
Geometry