public class DefaultNullGeometry extends AbstractPrimitive implements NullGeometry
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus
logger
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
Constructor and Description |
---|
DefaultNullGeometry(GeometryType geometryType)
The constructor with the GeometryType like and argument is used by the
GeometryType #create() to create the geometry |
Modifier and Type | Method and Description |
---|---|
boolean |
canBeReprojected(ICoordTrans ct)
Return true if the geometry can be reprojected by the coordinate transformation
|
boolean |
canBeTransformed(AffineTransform at)
Return true if the geometry can be transformed by the affine transform
|
Geometry |
cloneGeometry()
Creates a clone of this geometry.
|
boolean |
contains(double arg0,
double arg1) |
boolean |
contains(double arg0,
double arg1,
double arg2,
double arg3) |
boolean |
contains(Point2D arg0) |
boolean |
contains(Rectangle2D arg0) |
boolean |
fastIntersects(double x,
double y,
double w,
double h)
Used by the drawing strategies to quickly test whether this geometry
intersects with the visible rectangle.
|
void |
flip()
Flip the coordinates of the geometry.
|
Rectangle |
getBounds() |
Rectangle2D |
getBounds2D()
Returns this geometry's boundary rectangle.
|
int |
getDimension()
Returns the largest number n such that each direct position in a
geometric set can be associated with a subset that has the direct
position in its interior and is similar (isomorphic) to Rn, Euclidean
n-space.
|
Envelope |
getEnvelope()
Returns the minimum bounding box for this Geometry.
|
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it.
|
Handler[] |
getHandlers(int type)
It returns the handlers of the geometry, these they can be of two types
is straightening and of selection.
|
Geometry |
getJTS() |
PathIterator |
getPathIterator(AffineTransform at)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
PathIterator |
getPathIterator(AffineTransform at,
double flatness)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
Shape |
getShape() |
Shape |
getShape(AffineTransform affineTransform) |
Geometry.ValidationStatus |
getValidationStatus()
Check if the geometry is valid and returns the validation status.
|
boolean |
intersects(double arg0,
double arg1,
double arg2,
double arg3) |
boolean |
intersects(Rectangle2D r)
Returns true if this geometry intersects the rectangle passed as
parameter.
|
boolean |
is3D() |
boolean |
isSimple()
Returns
true if this Geometry has no interior point of
self-intersection or self-tangency. |
boolean |
isValid()
Check if the geometry is valid.
|
Geometry |
offset(double distance) |
void |
reProject(ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as
parameter.
|
MultiLine |
toLines()
Converts the geometry to be lines and makes with them a multiLine
|
MultiPoint |
toPoints()
Converts the geometry to be points and makes with them a multiPoint
|
MultiPolygon |
toPolygons()
Converts the geometry to be polygons and makes with them a multiPolygon
|
void |
transform(AffineTransform at)
It applies an affine transformation to the geometry.
|
area, buffer, centroid, closestPoints, compareTo, contains, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, equals, getGeometryType, getInteriorPoint, getInternalShape, getManager, getType, intersection, intersects, invokeOperation, invokeOperation, isCCW, isWithinDistance, makeValid, move, notifyDeprecated, out, overlaps, perimeter, rotate, scale, snapTo, toString, touches, union, within
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
area, buffer, centroid, closestPoints, contains, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, getGeometryType, getInteriorPoint, getInternalShape, getType, intersection, intersects, invokeOperation, invokeOperation, isCCW, isWithinDistance, makeValid, move, out, overlaps, perimeter, rotate, scale, snapTo, touches, union, within
compareTo
public DefaultNullGeometry(GeometryType geometryType)
GeometryType
#create()
to create the geometrytype
- The geometry typepublic Shape getShape()
public Shape getShape(AffineTransform affineTransform)
public boolean intersects(Rectangle2D r)
Geometry
intersects
in interface Shape
intersects
in interface Geometry
intersects
in class AbstractGeometry
r
- Rectangle.this
intersects r
.public Rectangle2D getBounds2D()
Geometry
getBounds2D
in interface Shape
getBounds2D
in interface Geometry
getBounds2D
in class AbstractGeometry
public Geometry cloneGeometry()
Geometry
cloneGeometry
in interface Geometry
public void reProject(ICoordTrans ct)
Geometry
public PathIterator getPathIterator(AffineTransform at)
Geometry
getPathIterator
in interface Shape
getPathIterator
in interface Geometry
at
- The transformation to apply.Geometry.getPathIterator(AffineTransform)
public boolean fastIntersects(double x, double y, double w, double h)
Geometry
fastIntersects
in interface Geometry
fastIntersects
in class AbstractGeometry
x
- The minimum X coordinate.y
- The minimum Y coordinate.w
- The width of the envelope.h
- The height of the envelope.this
intersects the rectangle defined by the
parameters.public Handler[] getHandlers(int type)
Geometry
getHandlers
in interface Geometry
getHandlers
in class AbstractPrimitive
type
- Type of handlers.public void transform(AffineTransform at)
Geometry
public PathIterator getPathIterator(AffineTransform at, double flatness)
Geometry
getPathIterator
in interface Shape
getPathIterator
in interface Geometry
at
- The affine transformation.public boolean contains(double arg0, double arg1)
contains
in interface Shape
contains
in class AbstractGeometry
public boolean contains(double arg0, double arg1, double arg2, double arg3)
contains
in interface Shape
contains
in class AbstractGeometry
public boolean intersects(double arg0, double arg1, double arg2, double arg3)
intersects
in interface Shape
intersects
in class AbstractGeometry
public Rectangle getBounds()
getBounds
in interface Shape
getBounds
in class AbstractGeometry
public boolean contains(Point2D arg0)
contains
in interface Shape
contains
in class AbstractGeometry
public boolean contains(Rectangle2D arg0)
contains
in interface Shape
contains
in class AbstractGeometry
public boolean isSimple()
Geometry
true
if this Geometry has no interior point of
self-intersection or self-tangency. In mathematical formalisms, this
means that every point in the interior of the object must have a metric
neighborhood whose intersection with the object is isomorphic to an
n-sphere, where n is the dimension of this Geometry.isSimple
in interface Geometry
isSimple
in class AbstractGeometry
public int getDimension()
Geometry
getDimension
in interface Geometry
public Envelope getEnvelope()
Geometry
Returns the minimum bounding box for this Geometry. This shall be the coordinate region spanning the minimum and maximum value for each ordinate taken on by DirectPositions in this Geometry. The simplest representation for an envelope consists of two DirectPositions, the first one containing all the minimums for each ordinate, and second one containing all the maximums.
getEnvelope
in interface Geometry
getEnvelope
in class AbstractGeometry
public GeneralPathX getGeneralPath()
Geometry
getGeneralPath
in interface Geometry
public boolean isValid()
Geometry
isValid
in interface Geometry
isValid
in class AbstractGeometry
public Geometry.ValidationStatus getValidationStatus()
Geometry
getValidationStatus
in interface Geometry
getValidationStatus
in class AbstractGeometry
public MultiPoint toPoints() throws GeometryException
Geometry
toPoints
in interface Geometry
GeometryException
public MultiLine toLines() throws GeometryException
Geometry
toLines
in interface Geometry
GeometryException
public MultiPolygon toPolygons() throws GeometryException
Geometry
toPolygons
in interface Geometry
GeometryException
public Geometry getJTS()
getJTS
in interface GeometryJTS
public boolean is3D()
is3D
in interface GeometryJTS
public void flip() throws GeometryOperationNotSupportedException, GeometryOperationException
Geometry
flip
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public Geometry offset(double distance) throws GeometryOperationNotSupportedException, GeometryOperationException
offset
in interface Geometry
GeometryOperationNotSupportedException
GeometryOperationException
public boolean canBeTransformed(AffineTransform at)
Geometry
canBeTransformed
in interface Geometry
at
- the affine transformpublic boolean canBeReprojected(ICoordTrans ct)
Geometry
canBeReprojected
in interface Geometry
ct
- the coordinate transformation