public abstract class BaseMultiPrimitive extends AbstractPrimitive implements MultiPrimitive
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus| Modifier and Type | Field and Description |
|---|---|
protected List |
geometries |
geometryType, geomManager, id, projectionBEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W| Constructor and Description |
|---|
BaseMultiPrimitive(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 |
|---|---|
void |
addPrimitive(Primitive primitive)
Adds a new primitive to the primitive
|
FShape |
cloneFShape()
Creates and returns a shape equal and independent of this one.
|
boolean |
contains(double x,
double y) |
boolean |
contains(double x,
double y,
double w,
double h) |
boolean |
contains(Point2D p) |
boolean |
contains(Rectangle2D r) |
void |
ensureCapacity(int capacity) |
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.
|
Geometry[] |
getGeometries()
Deprecated.
|
Handler[] |
getHandlers(int type)
It returns the handlers of the geometry, these they can be of two types
is straightening and of selection.
|
Shape |
getInternalShape()
(non-Javadoc)
|
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.
|
Primitive |
getPrimitiveAt(int i)
Returns one of the
Primitive's that is in
a concrete position. |
int |
getPrimitivesNumber()
Returns the number of
Primitive's that composes
this multi geometry. |
Handler[] |
getSelectHandlers()
Returns the handlers used to select the geometries.
|
Handler[] |
getStretchingHandlers()
Returns the handlers they utilized to stretch the geometries.
|
Geometry |
intersection()
Returns a Primitive that is the intersection of all the geometries of the Aggregate.
|
boolean |
intersects(double x,
double y,
double w,
double h) |
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(ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as
parameter.
|
void |
transform(AffineTransform at)
It applies an affine transformation to the geometry.
|
Geometry |
union()
Returns a Primitive that is the union of all the geometries of the Aggregate.
|
area, buffer, centroid, cloneGeometry, closestPoints, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equals, getGeometryType, getId, getInteriorPoint, getShape, getShape, getShapeType, getSRS, getType, getValidationStatus, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isCCW, isValid, isWithinDistance, makeValid, move, overlaps, perimeter, rotate, scale, snapTo, toJTS, toString, touches, transform, union, withinclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitarea, buffer, centroid, cloneGeometry, closestPoints, contains, convertToEWKB, convertToEWKB, convertToEWKBForcingType, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, ensureOrientation, flip, getGeometryType, getInteriorPoint, getShape, getShape, getType, getValidationStatus, intersection, intersects, invokeOperation, invokeOperation, isCCW, isValid, isWithinDistance, makeValid, move, offset, out, overlaps, perimeter, rotate, scale, snapTo, toLines, toPoints, toPolygons, touches, union, withincompareToprotected List geometries
public BaseMultiPrimitive(GeometryType geometryType)
GeometryType#create() to create the geometrytype - The geometry typepublic boolean contains(double x,
double y,
double w,
double h)
public boolean contains(Rectangle2D r)
public int getDimension()
GeometrygetDimension in interface Geometrypublic boolean fastIntersects(double x,
double y,
double w,
double h)
GeometryfastIntersects in interface GeometryfastIntersects in class AbstractPrimitivex - 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 Rectangle2D getBounds2D()
GeometrygetBounds2D in interface ShapegetBounds2D in interface Geometrypublic Handler[] getHandlers(int type)
GeometrygetHandlers in interface GeometrygetHandlers in class AbstractPrimitivetype - Type of handlers.public Shape getInternalShape()
AbstractPrimitivegetInternalShape in interface GeometrygetInternalShape in class AbstractPrimitivecom.iver.cit.gvsig.fmap.core.Geometry#getInternalShape()public PathIterator getPathIterator(AffineTransform at)
GeometrygetPathIterator in interface ShapegetPathIterator in interface Geometryat - The transformation to apply.public PathIterator getPathIterator(AffineTransform at, double flatness)
GeometrygetPathIterator in interface ShapegetPathIterator in interface Geometryat - The affine transformation.public Primitive getPrimitiveAt(int i)
AggregatePrimitive's that is in
a concrete position.getPrimitiveAt in interface Aggregatei - Geometry position.public int getPrimitivesNumber()
AggregatePrimitive's that composes
this multi geometry.getPrimitivesNumber in interface AggregatePrimitive's that composes
this multi geometry.public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic boolean intersects(Rectangle2D r)
Geometryintersects in interface Shapeintersects in interface Geometryr - Rectangle.this intersects r.public boolean isSimple()
Geometrytrue 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 GeometryisSimple in class AbstractPrimitivepublic void reProject(ICoordTrans ct)
Geometrypublic void transform(AffineTransform at)
Geometrytransform in interface FShapetransform in interface Geometryat - The transformation to apply.AffineTransformpublic Envelope getEnvelope()
GeometryReturns 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 Geometrypublic Geometry[] getGeometries()
public FShape cloneFShape()
FShapecloneFShape in interface FShapepublic Handler[] getSelectHandlers()
FShapegetSelectHandlers in interface FShapepublic Handler[] getStretchingHandlers()
FShapegetStretchingHandlers in interface FShapepublic GeneralPathX getGeneralPath()
GeometrygetGeneralPath in interface Geometrypublic void addPrimitive(Primitive primitive)
MultiPrimitiveaddPrimitive in interface MultiPrimitiveprimitive - The primitive to addpublic Geometry union() throws GeometryOperationException, GeometryOperationNotSupportedException
Aggregateunion in interface AggregateGeometryOperationExceptionGeometryOperationNotSupportedExceptionpublic Geometry intersection() throws GeometryOperationException, GeometryOperationNotSupportedException
Aggregateintersection in interface AggregateGeometryOperationExceptionGeometryOperationNotSupportedExceptionpublic void ensureCapacity(int capacity)
ensureCapacity in interface MultiPrimitive