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, projection
BEST, 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, within
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
area, buffer, canBeReprojected, canBeTransformed, 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, within
compareTo
cloneFShape
protected 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 Shape
public Rectangle2D getBounds2D()
Geometry
getBounds2D
in interface Shape
getBounds2D
in interface Geometry
public boolean contains(Rectangle2D r)
public boolean intersects(Rectangle2D r)
intersects
in interface Shape
intersects
in interface Geometry
r
- Rect�ngulo.public PathIterator getPathIterator(AffineTransform at)
Geometry
getPathIterator
in interface Shape
getPathIterator
in interface Geometry
at
- The transformation to apply.public PathIterator getPathIterator(AffineTransform at, double flatness)
Geometry
getPathIterator
in interface Shape
getPathIterator
in interface Geometry
at
- The affine transformation.public void transform(AffineTransform at)
transform
in interface FShape
transform
in interface Geometry
at
- DOCUMENT ME!AffineTransform
public void reProject(ICoordTrans ct)
Geometry
public Handler[] getStretchingHandlers()
FShape
getStretchingHandlers
in interface FShape
public double getCoordinateAt(int index, int dimension)
OrientablePrimitive
getCoordinateAt
in interface OrientablePrimitive
index
- The index of the direct position to set.dimension
- The dimension of the direct position.public Handler[] getSelectHandlers()
FShape
getSelectHandlers
in interface FShape
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
public GeneralPathX getGeneralPath()
Geometry
getGeneralPath
in interface Geometry
public int getNumVertices()
OrientablePrimitive
getNumVertices
in interface OrientablePrimitive
public void addVertex(Point point)
OrientablePrimitive
addVertex
in interface OrientablePrimitive
point
- The new point to addpublic void addVertex(double x, double y)
OrientablePrimitive
addVertex
in interface OrientablePrimitive
OrientablePrimitive.addVertex(Point)
public void addVertex(double x, double y, double z)
OrientablePrimitive
addVertex
in interface OrientablePrimitive
OrientablePrimitive.addVertex(Point)
public void addMoveToVertex(Point point)
OrientablePrimitive
addMoveToVertex
in interface OrientablePrimitive
point
- The new point to addpublic void closePrimitive()
OrientablePrimitive
closePrimitive
in interface OrientablePrimitive
public void setVertex(int index, Point p)
OrientablePrimitive
setVertex
in interface OrientablePrimitive
index
- The index of the vertex where the new point has to be replaced.p
- The vertex to set.public Point getVertex(int index)
OrientablePrimitive
getVertex
in interface OrientablePrimitive
index
- The index of the vertex to getpublic void insertVertex(int index, Point p)
OrientablePrimitive
insertVertex
in interface OrientablePrimitive
index
- The index of the vertex where the new point has to be added.p
- The vertex to add.public void removeVertex(int index)
OrientablePrimitive
removeVertex
in interface OrientablePrimitive
index
- The index of the vertex to removepublic void setCoordinateAt(int index, int dimension, double value)
OrientablePrimitive
setCoordinateAt
in interface OrientablePrimitive
index
- The index of the direct position to setdimension
- The dimension of the direct positionvalue
- The value to setpublic void setGeneralPath(GeneralPathX generalPathX)
OrientablePrimitive
setGeneralPath
in interface OrientablePrimitive
generalPathX
- The generalPath that contains all the coordinatespublic Shape getShape()
getShape
in interface Geometry
getShape
in class AbstractPrimitive
public Shape getShape(AffineTransform affineTransform)
getShape
in interface Geometry
getShape
in class AbstractPrimitive
public void ensureCapacity(int capacity)
ensureCapacity
in interface OrientablePrimitive