public abstract class OrientedRectangle extends Polygon
| Modifier and Type | Class and Description |
|---|---|
static class |
OrientedRectangle.Double |
static class |
OrientedRectangle.Float |
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| Modifier | Constructor and Description |
|---|---|
protected |
OrientedRectangle(LinearRing ring) |
| Modifier and Type | Method and Description |
|---|---|
OrientedRectangle |
add(OrientedRectangle rect) |
OrientedRectangle |
add(Rectangle rect)
Adds the specified rectangle to this one.
|
Point |
centroid()
Computes the centroid (center of mass) of the polygon, considering
possibles holes in it.
|
boolean |
contains(Point coord)
Deprecated.
|
boolean |
contains(Point coord,
PrecisionModel precisionModel) |
void |
createBounds()
creates the bounding box
called in the constructor, not needed from outside |
Point |
getCoord0() |
Point |
getCoord1() |
Point |
getCoord2() |
Point |
getCoord3() |
Point |
getCoord4() |
abstract double |
getHeight() |
abstract double |
getWidth() |
OrientedRectangle |
inflate(double factor) |
boolean |
intersects(OrientedRectangle rect)
Deprecated.
|
boolean |
intersects(OrientedRectangle rect,
PrecisionModel precisionModel) |
boolean |
intersects(Rectangle rect)
Deprecated.
|
boolean |
intersects(Rectangle rect,
PrecisionModel precisionModel) |
Point[] |
serialize()
This polygon as an array of Point
|
abstract void |
setBounds(Rectangle bounds) |
void |
setCoord0(Point coord0) |
void |
setCoord1(Point coord1) |
void |
setCoord2(Point coord2) |
void |
setCoord3(Point coord3) |
void |
setCoord4(Point coord) |
abstract void |
setHeight(double height) |
abstract void |
setWidth(double width) |
Geometry |
transform(Transformation tr)
Creates a clone of the current oriented rectangle and returns
the new instance tranformed with the specified geometry transformation.
The returned geometry can be of any geometry types after the transformation. |
area, asText, boundary, clone, equals, exteriorRing, getBounds, getCenteredPoint, getGeometryId, getGeometryType, getRings, hasHoles, interiorRingN, length, numInteriorRing, pointOnSurface, polygonIterator, setRings, sizeOf, spatiallyEquals, toString, translate, validatespatiallyEqualsfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitspatiallyEqualsprotected OrientedRectangle(LinearRing ring)
public void setCoord0(Point coord0)
point - public void setCoord1(Point coord1)
point - public void setCoord2(Point coord2)
point - public void setCoord3(Point coord3)
point - public void setCoord4(Point coord)
point - public Point centroid()
Polygonpublic Point getCoord0()
public Point getCoord1()
public Point getCoord2()
public Point getCoord3()
public Point getCoord4()
public OrientedRectangle add(Rectangle rect)
rect - the rectangle to addpublic OrientedRectangle add(OrientedRectangle rect)
@Deprecated public boolean contains(Point coord)
coord - public boolean contains(Point coord, PrecisionModel precisionModel)
@Deprecated public boolean intersects(Rectangle rect)
rect - public boolean intersects(Rectangle rect, PrecisionModel precisionModel)
@Deprecated public boolean intersects(OrientedRectangle rect)
rect - public boolean intersects(OrientedRectangle rect, PrecisionModel precisionModel)
public OrientedRectangle inflate(double factor)
public abstract double getWidth()
public abstract double getHeight()
public abstract void setWidth(double width)
public abstract void setHeight(double height)
public Point[] serialize()
Polygonpublic abstract void setBounds(Rectangle bounds)
public void createBounds()
PolygoncreateBounds in interface GeometrycreateBounds in class Polygonpublic Geometry transform(Transformation tr)