|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive org.gvsig.fmap.geom.primitive.impl.OrientablePrimitive2D
public abstract class OrientablePrimitive2D
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.gvsig.fmap.geom.Geometry |
---|
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES |
Field Summary | |
---|---|
protected GeneralPathX |
gp
|
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 | |
---|---|
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,
org.cresques.cts.IProjection projection,
GeneralPathX gp)
|
Method Summary | |
---|---|
void |
addMoveToVertex(Point point)
Adds a vertex (or direct position) to the curve |
void |
addVertex(Point point)
Adds a vertex (or direct position) to the curve |
void |
addVertexes(List vertexes)
Adds a list of vertexes (or direct positions) 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)
|
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. |
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(org.cresques.cts.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! |
Methods inherited from class org.gvsig.fmap.geom.primitive.impl.AbstractPrimitive |
---|
area, buffer, centroid, cloneGeometry, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, equals, fastIntersects, getGeometryType, getHandlers, getId, getInternalShape, getShape, getShape, getShapeType, getSRS, getType, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isSimple, 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, cloneGeometry, contains, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, fastIntersects, getGeometryType, getHandlers, getInternalShape, getShape, getShape, getType, intersection, intersects, invokeOperation, invokeOperation, isSimple, overlaps, perimeter, touches, union, within |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Methods inherited from interface org.gvsig.fmap.geom.primitive.FShape |
---|
cloneFShape |
Field Detail |
---|
protected GeneralPathX gp
Constructor Detail |
---|
public OrientablePrimitive2D(GeometryType geometryType)
GeometryType
#create()
to create the geometry
type
- The geometry typepublic OrientablePrimitive2D(GeometryType geometryType, String id, org.cresques.cts.IProjection projection, GeneralPathX gp)
Method Detail |
---|
public GeneralPathX getGeneralPathX()
public boolean contains(double x, double y)
contains
in interface Shape
public boolean contains(double x, double y, double w, double h)
contains
in interface Shape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface Shape
public Rectangle getBounds()
getBounds
in interface Shape
public boolean contains(Point2D p)
contains
in interface Shape
public Rectangle2D getBounds2D()
Geometry
getBounds2D
in interface Shape
getBounds2D
in interface Geometry
public boolean contains(Rectangle2D r)
contains
in interface Shape
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 Geometry
transform
in interface FShape
at
- DOCUMENT ME!AffineTransform
public void reProject(org.cresques.cts.ICoordTrans ct)
Geometry
reProject
in interface Geometry
reProject
in interface FShape
ct
- Coordinate Transformer.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 addVertexes(List vertexes)
OrientablePrimitive
addVertexes
in interface OrientablePrimitive
vertexes
- The new points to addpublic 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 get
public 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 void setPoints(Point startPoint, Point endPoint)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |