public abstract class OrientablePrimitive2D extends AbstractPrimitive implements OrientablePrimitive
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus| Modifier and Type | Field and Description |
|---|---|
protected GeneralPathX |
gp |
geometryType, geomManager, id, logger, projectionBEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W| Constructor and Description |
|---|
OrientablePrimitive2D(GeometryType geometryType)
The constructor with the GeometryType like and argument
is used by the
GeometryType#create()
to create the geometry |
OrientablePrimitive2D(GeometryType geometryType,
String id,
IProjection projection,
GeneralPathX gp) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMoveToVertex(Point point)
Adds a vertex (or direct position) to the curve
|
void |
addVertex(double x,
double y)
Utility method for add a vertex
|
void |
addVertex(double x,
double y,
double z)
Utility method for add a vertex
|
void |
addVertex(Point point)
Adds a vertex (or direct position) to the curve
|
void |
closePrimitive()
Closes the geometry
|
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) |
Rectangle |
getBounds() |
Rectangle2D |
getBounds2D()
Returns this geometry's boundary rectangle.
|
double |
getCoordinateAt(int index,
int dimension)
Gets the one of the values of a coordinate (direct position) in a
concrete dimension.
|
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.
|
GeneralPathX |
getGeneralPathX()
TODO método creado para dar visibilidad a gp despues de la refactorización
|
int |
getNumVertices()
Gets the number of vertices (direct positions) of the curve
|
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.
|
Shape |
getShape() |
Shape |
getShape(AffineTransform affineTransform) |
Handler[] |
getStretchingHandlers()
Returns the handlers they utilized to stretch the geometries.
|
Point |
getVertex(int index)
Gets a vertex (direct position)
|
void |
insertVertex(int index,
Point p)
Inserts a vertex (direct position) to the curve.
|
boolean |
intersects(double x,
double y,
double w,
double h) |
boolean |
intersects(Rectangle2D r)
El m�todo intersects de java.awt.Shape que define la intersecci�n entre
una polil�nea y un Rectangle2D considera la polil�nea como un Shape
gen�rico y se producen errores en la selecci�n de polil�neas.
|
void |
removeVertex(int index)
Remove a vertex (direct position) to the curve
|
void |
reProject(ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as
parameter.
|
void |
setCoordinateAt(int index,
int dimension,
double value)
Sets the value of a coordinate (direct position) in a concrete dimension
|
void |
setGeneralPath(GeneralPathX generalPathX)
Sets all the coordinates of the curve
|
void |
setPoints(Point startPoint,
Point endPoint) |
void |
setVertex(int index,
Point p)
Sets a vertex in a concrete position and replaces the
previous one that was in this position.
|
void |
transform(AffineTransform at)
DOCUMENT ME!
|
area, buffer, centroid, cloneGeometry, closestPoints, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, equals, fastIntersects, getGeometryType, getHandlers, getId, getInteriorPoint, getInternalShape, getShapeType, getSRS, getType, getValidationStatus, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isCCW, isSimple, 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, fastIntersects, flip, getGeometryType, getHandlers, getInteriorPoint, getInternalShape, getType, getValidationStatus, intersection, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, offset, out, overlaps, perimeter, rotate, scale, snapTo, toLines, toPoints, toPolygons, touches, union, withincompareTocloneFShapeprotected GeneralPathX gp
public OrientablePrimitive2D(GeometryType geometryType)
GeometryType#create()
to create the geometrytype - The geometry typepublic OrientablePrimitive2D(GeometryType geometryType, String id, IProjection projection, GeneralPathX gp)
public GeneralPathX getGeneralPathX()
public boolean contains(double x,
double y,
double w,
double h)
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic Rectangle2D getBounds2D()
GeometrygetBounds2D in interface ShapegetBounds2D in interface Geometrypublic boolean contains(Rectangle2D r)
public boolean intersects(Rectangle2D r)
intersects in interface Shapeintersects in interface Geometryr - Rect�ngulo.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 void transform(AffineTransform at)
transform in interface FShapetransform in interface Geometryat - DOCUMENT ME!AffineTransformpublic void reProject(ICoordTrans ct)
Geometrypublic Handler[] getStretchingHandlers()
FShapegetStretchingHandlers in interface FShapepublic double getCoordinateAt(int index,
int dimension)
OrientablePrimitivegetCoordinateAt in interface OrientablePrimitiveindex - The index of the direct position to set.dimension - The dimension of the direct position.public Handler[] getSelectHandlers()
FShapegetSelectHandlers in interface FShapepublic int getDimension()
GeometrygetDimension in interface Geometrypublic 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 GeneralPathX getGeneralPath()
GeometrygetGeneralPath in interface Geometrypublic int getNumVertices()
OrientablePrimitivegetNumVertices in interface OrientablePrimitivepublic void addVertex(Point point)
OrientablePrimitiveaddVertex in interface OrientablePrimitivepoint - The new point to addpublic void addVertex(double x,
double y)
OrientablePrimitiveaddVertex in interface OrientablePrimitiveOrientablePrimitive.addVertex(Point)public void addVertex(double x,
double y,
double z)
OrientablePrimitiveaddVertex in interface OrientablePrimitiveOrientablePrimitive.addVertex(Point)public void addMoveToVertex(Point point)
OrientablePrimitiveaddMoveToVertex in interface OrientablePrimitivepoint - The new point to addpublic void closePrimitive()
OrientablePrimitiveclosePrimitive in interface OrientablePrimitivepublic void setVertex(int index,
Point p)
OrientablePrimitivesetVertex in interface OrientablePrimitiveindex - The index of the vertex where the new point has to be replaced.p - The vertex to set.public Point getVertex(int index)
OrientablePrimitivegetVertex in interface OrientablePrimitiveindex - The index of the vertex to getpublic void insertVertex(int index,
Point p)
OrientablePrimitiveinsertVertex in interface OrientablePrimitiveindex - The index of the vertex where the new point has to be added.p - The vertex to add.public void removeVertex(int index)
OrientablePrimitiveremoveVertex in interface OrientablePrimitiveindex - The index of the vertex to removepublic void setCoordinateAt(int index,
int dimension,
double value)
OrientablePrimitivesetCoordinateAt in interface OrientablePrimitiveindex - The index of the direct position to setdimension - The dimension of the direct positionvalue - The value to setpublic void setGeneralPath(GeneralPathX generalPathX)
OrientablePrimitivesetGeneralPath in interface OrientablePrimitivegeneralPathX - The generalPath that contains all the coordinatespublic Shape getShape()
getShape in interface GeometrygetShape in class AbstractPrimitivepublic Shape getShape(AffineTransform affineTransform)
getShape in interface GeometrygetShape in class AbstractPrimitivepublic void ensureCapacity(int capacity)
ensureCapacity in interface OrientablePrimitive