|
||||||||||
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.Point2D
public class Point2D
2D point implementation.
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 static String |
COORDINATES_FIELD
|
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 | |
---|---|
Point2D(double x,
double y)
|
|
Point2D(GeometryType geometryType)
The constructor with the GeometryType like and argument is used by the GeometryType #create() to create the
geometry |
|
Point2D(int type,
int subtype)
|
|
Point2D(Point2D point)
|
Method Summary | |
---|---|
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)
|
boolean |
equals(Object other)
|
Rectangle |
getBounds()
|
Rectangle2D |
getBounds2D()
Returns this geometry's boundary rectangle. |
double |
getCoordinateAt(int dimension)
Gets the coordinate in a concrete dimension |
double[] |
getCoordinates()
Returns an array of coordinates. |
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. |
DirectPosition |
getDirectPosition()
Gets the of a point , that is
composed by a set of ordinates |
Envelope |
getEnvelope()
Returns the minimum bounding box for this Geometry. |
protected String |
getFullTypeName()
|
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it. |
double |
getOrdinate(int dim)
Returns the ordinate of the given dimension. |
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(AffineTransform affineTransform)
|
int |
getShapeType()
Gets the geometry type of this shape. |
Handler[] |
getStretchingHandlers()
Returns the handlers they utilized to stretch the geometries. |
double |
getX()
Returns the X coordinate |
double |
getY()
Returns the Y coordinate |
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. |
void |
reProject(org.cresques.cts.ICoordTrans ct)
Reprojects this geometry by the coordinate transformer passed as parameter. |
void |
setCoordinateAt(int dimension,
double value)
Sets a ordinate in a concrete dimension |
void |
setCoordinates(double[] values)
Sets the point coordinates |
void |
setX(double x)
Sets the X coordinate |
void |
setY(double y)
Sets the Y coordinate |
String |
toString()
|
void |
transform(AffineTransform at)
Aplica la transformaciónn de la matriz de transformación que se pasa como parámetro. |
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, fastIntersects, getGeometryType, getHandlers, getId, getInternalShape, getShape, getSRS, getType, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isSimple, moveGeom, overlaps, perimeter, rotateGeom, scaleGeom, 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, getType, intersection, intersects, invokeOperation, invokeOperation, isSimple, overlaps, perimeter, touches, union, within |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected static final String COORDINATES_FIELD
Constructor Detail |
---|
public Point2D(GeometryType geometryType)
GeometryType
#create()
to create the
geometry
type
- The geometry typepublic Point2D(double x, double y)
public Point2D(int type, int subtype)
public Point2D(Point2D point)
Method Detail |
---|
public void transform(AffineTransform at)
transform
in interface Geometry
transform
in interface FShape
at
- Matriz de transformación.AffineTransform
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 double getX()
Point
getX
in interface Point
public double getY()
Point
getY
in interface Point
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)
Geometry
intersects
in interface Shape
intersects
in interface Geometry
r
- Rectangle.
this
intersects r
.public Shape getShape(AffineTransform affineTransform)
getShape
in interface Geometry
getShape
in class AbstractPrimitive
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 int getShapeType()
FShape
getShapeType
in interface FShape
getShapeType
in class AbstractPrimitive
public FShape cloneFShape()
FShape
cloneFShape
in interface FShape
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 Handler[] getSelectHandlers()
FShape
getSelectHandlers
in interface FShape
public int getDimension()
Geometry
getDimension
in interface DirectPosition
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 DirectPosition getDirectPosition()
Point
of a point
, that is
composed by a set of ordinates
getDirectPosition
in interface Point
public double getOrdinate(int dim)
DirectPosition
getOrdinate
in interface DirectPosition
dim
- The dimension to retrieve
public boolean equals(Object other)
equals
in class AbstractPrimitive
public double[] getCoordinates()
Point
#setCoordinateAt(int, double))
, #setX(double))
or #setY(double))
methods instead.
getCoordinates
in interface Point
public double getCoordinateAt(int dimension)
Point
getCoordinateAt
in interface Point
dimension
- The ordinate dimension
public void setCoordinateAt(int dimension, double value)
Point
setCoordinateAt
in interface Point
dimension
- The dimension to setvalue
- The value to setpublic void setCoordinates(double[] values)
Point
setCoordinates
in interface Point
public void setX(double x)
Point
setX
in interface Point
x
- The value to setpublic void setY(double y)
Point
setY
in interface Point
y
- The value to setpublic String toString()
toString
in class AbstractPrimitive
protected String getFullTypeName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |