org.gvsig.fmap.geom.primitive.impl
Class DefaultNullGeometry

java.lang.Object
  extended by org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
      extended by org.gvsig.fmap.geom.primitive.impl.DefaultNullGeometry
All Implemented Interfaces:
Shape, Serializable, Comparable, Geometry, FShape, NullGeometry, Primitive
Direct Known Subclasses:
Geometry2D

public class DefaultNullGeometry
extends AbstractPrimitive
implements NullGeometry

DOCUMENT ME!

Author:
Vicente Caballero Navarro
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.gvsig.fmap.geom.Geometry
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES
 
Field Summary
 
Fields inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
geometryType, geomManager, id, projection
 
Fields inherited from interface org.gvsig.fmap.geom.Geometry
BEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W
 
Constructor Summary
DefaultNullGeometry(GeometryType geometryType)
          The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry
 
Method Summary
 FShape cloneFShape()
          Creates and returns a shape equal and independent of this one.
 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.
 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.
 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.
 Handler[] getSelectHandlers()
          Returns the handlers used to select the geometries.
 Handler[] getStretchingHandlers()
          Returns the handlers they utilized to stretch the geometries.
 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 isSimple()
          Returns true if this Geometry has no interior point of self-intersection or self-tangency.
 void reProject(org.cresques.cts.ICoordTrans ct)
          Reprojects this geometry by the coordinate transformer passed as parameter.
 void transform(AffineTransform at)
          It applies an affine transformation to the geometry.
 
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive
area, buffer, centroid, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, equals, getGeometryType, getId, getInternalShape, getShape, getShape, getShapeType, getSRS, getType, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, moveGeom, overlaps, perimeter, rotateGeom, scaleGeom, toString, touches, transform, union, within
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.gvsig.fmap.geom.Geometry
area, buffer, centroid, contains, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, getGeometryType, getInternalShape, getShape, getShape, getType, intersection, intersects, invokeOperation, invokeOperation, overlaps, perimeter, touches, union, within
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

DefaultNullGeometry

public DefaultNullGeometry(GeometryType geometryType)
The constructor with the GeometryType like and argument is used by the GeometryType#create() to create the geometry

Parameters:
type - The geometry type
Method Detail

intersects

public boolean intersects(Rectangle2D r)
Description copied from interface: Geometry
Returns true if this geometry intersects the rectangle passed as parameter.

Specified by:
intersects in interface Shape
Specified by:
intersects in interface Geometry
Parameters:
r - Rectangle.
Returns:
True, if this intersects r.

getBounds2D

public Rectangle2D getBounds2D()
Description copied from interface: Geometry
Returns this geometry's boundary rectangle.

Specified by:
getBounds2D in interface Shape
Specified by:
getBounds2D in interface Geometry
Returns:
Boundary rectangle.

cloneGeometry

public Geometry cloneGeometry()
Description copied from interface: Geometry
Creates a clone of this geometry.

Specified by:
cloneGeometry in interface Geometry
Overrides:
cloneGeometry in class AbstractPrimitive
Returns:
A clone of this geometry.

reProject

public void reProject(org.cresques.cts.ICoordTrans ct)
Description copied from interface: Geometry
Reprojects this geometry by the coordinate transformer passed as parameter.

Specified by:
reProject in interface Geometry
Specified by:
reProject in interface FShape
Parameters:
ct - Coordinate Transformer.

getPathIterator

public PathIterator getPathIterator(AffineTransform at)
Description copied from interface: Geometry
If applies an affine transformation and returns the GeneralPathXIterator with this geometry's information.

Specified by:
getPathIterator in interface Shape
Specified by:
getPathIterator in interface Geometry
Parameters:
at - The transformation to apply.
Returns:
The GeneralPathXIterator with this geometry's information.
See Also:
Geometry.getPathIterator(AffineTransform)

fastIntersects

public boolean fastIntersects(double x,
                              double y,
                              double w,
                              double h)
Description copied from interface: Geometry
Used by the drawing strategies to quickly test whether this geometry intersects with the visible rectangle.

Specified by:
fastIntersects in interface Geometry
Overrides:
fastIntersects in class AbstractPrimitive
Parameters:
x - The minimum X coordinate.
y - The minimum Y coordinate.
w - The width of the envelope.
h - The height of the envelope.
Returns:
true if this intersects the rectangle defined by the parameters.

getHandlers

public Handler[] getHandlers(int type)
Description copied from interface: Geometry
It returns the handlers of the geometry, these they can be of two types is straightening and of selection.

Specified by:
getHandlers in interface Geometry
Overrides:
getHandlers in class AbstractPrimitive
Parameters:
type - Type of handlers.
Returns:
The handlers.

transform

public void transform(AffineTransform at)
Description copied from interface: Geometry
It applies an affine transformation to the geometry.

Specified by:
transform in interface Geometry
Specified by:
transform in interface FShape
Parameters:
at - The transformation to apply.
See Also:
AffineTransform

getPathIterator

public PathIterator getPathIterator(AffineTransform at,
                                    double flatness)
Description copied from interface: Geometry
If applies an affine transformation and returns the GeneralPathXIterator with this geometry's information.

Specified by:
getPathIterator in interface Shape
Specified by:
getPathIterator in interface Geometry
Parameters:
at - The affine transformation.
Returns:
The GeneralPathXIterator with this geometry's information.

contains

public boolean contains(double arg0,
                        double arg1)
Specified by:
contains in interface Shape

contains

public boolean contains(double arg0,
                        double arg1,
                        double arg2,
                        double arg3)
Specified by:
contains in interface Shape

intersects

public boolean intersects(double arg0,
                          double arg1,
                          double arg2,
                          double arg3)
Specified by:
intersects in interface Shape

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape

contains

public boolean contains(Point2D arg0)
Specified by:
contains in interface Shape

contains

public boolean contains(Rectangle2D arg0)
Specified by:
contains in interface Shape

isSimple

public boolean isSimple()
Description copied from interface: Geometry
Returns 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.

Specified by:
isSimple in interface Geometry
Overrides:
isSimple in class AbstractPrimitive
Returns:
If the geometry is simple.

getDimension

public int getDimension()
Description copied from interface: Geometry
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.

Specified by:
getDimension in interface Geometry
Returns:
The dimension.

cloneFShape

public FShape cloneFShape()
Description copied from interface: FShape
Creates and returns a shape equal and independent of this one.

Specified by:
cloneFShape in interface FShape
Returns:
the new shape.

getSelectHandlers

public Handler[] getSelectHandlers()
Description copied from interface: FShape
Returns the handlers used to select the geometries.

Specified by:
getSelectHandlers in interface FShape
Returns:
Handlers the handlers used to select the geometries

getStretchingHandlers

public Handler[] getStretchingHandlers()
Description copied from interface: FShape
Returns the handlers they utilized to stretch the geometries.

Specified by:
getStretchingHandlers in interface FShape
Returns:
Handlers the handlers used to stretch the geometries

getEnvelope

public Envelope getEnvelope()
Description copied from interface: 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.

Specified by:
getEnvelope in interface Geometry
Returns:
The minimum bounding box for this Geometry.

getGeneralPath

public GeneralPathX getGeneralPath()
Description copied from interface: Geometry
Get GeneralPathIterator, to do registered operations to it.

Specified by:
getGeneralPath in interface Geometry
Returns:
The GeneralPathX.


Copyright © 2004-2012 gvSIG. All Rights Reserved.