|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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
|
protected double |
x
|
protected double |
y
|
| 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(GeometryType geometryType,
double x,
double y)
|
|
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. |
int |
getType()
If this geometry is a predefined interface then this method returns one of Geometry.TYPES contants. |
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, closestPoints, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, fastIntersects, getGeometryType, getHandlers, getId, getInteriorPoint, getInternalShape, getShape, getSRS, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isSimple, isWithinDistance, move, overlaps, perimeter, rotate, scale, snapTo, 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, closestPoints, contains, convertToWKB, convertToWKT, convexHull, coveredBy, crosses, difference, disjoint, distance, fastIntersects, getGeometryType, getHandlers, getInteriorPoint, getInternalShape, getShape, intersection, intersects, invokeOperation, invokeOperation, isSimple, isWithinDistance, move, overlaps, perimeter, rotate, scale, snapTo, touches, union, within |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
protected static final String COORDINATES_FIELD
protected double x
protected double y
| Constructor Detail |
|---|
public Point2D(GeometryType geometryType)
GeometryType#create() to create the
geometry
type - The geometry type
public Point2D(double x,
double y)
public Point2D(GeometryType geometryType,
double x,
double y)
public Point2D(int type,
int subtype)
public Point2D(Point2D point)
| Method Detail |
|---|
public void transform(AffineTransform at)
transform in interface Geometrytransform in interface FShapeat - 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 Shapepublic Rectangle getBounds()
getBounds in interface Shapepublic double getX()
Point
getX in interface Pointpublic double getY()
Point
getY in interface Pointpublic boolean contains(Point2D p)
contains in interface Shapepublic Rectangle2D getBounds2D()
Geometry
getBounds2D in interface ShapegetBounds2D in interface Geometrypublic boolean contains(Rectangle2D r)
contains in interface Shapepublic boolean intersects(Rectangle2D r)
Geometry
intersects in interface Shapeintersects in interface Geometryr - Rectangle.
this intersects r.public Shape getShape(AffineTransform affineTransform)
getShape in interface GeometrygetShape in class AbstractPrimitivepublic PathIterator getPathIterator(AffineTransform at)
Geometry
getPathIterator in interface ShapegetPathIterator in interface Geometryat - The transformation to apply.
public PathIterator getPathIterator(AffineTransform at,
double flatness)
Geometry
getPathIterator in interface ShapegetPathIterator in interface Geometryat - The affine transformation.
public int getShapeType()
FShape
getShapeType in interface FShapegetShapeType in class AbstractPrimitivepublic FShape cloneFShape()
FShape
cloneFShape in interface FShapepublic void reProject(org.cresques.cts.ICoordTrans ct)
Geometry
reProject in interface GeometryreProject in interface FShapect - Coordinate Transformer.public Handler[] getStretchingHandlers()
FShape
getStretchingHandlers in interface FShapepublic Handler[] getSelectHandlers()
FShape
getSelectHandlers in interface FShapepublic int getDimension()
Geometry
getDimension in interface DirectPositiongetDimension 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()
Geometry
getGeneralPath in interface Geometrypublic DirectPosition getDirectPosition()
Pointof a point, that is
composed by a set of ordinates
getDirectPosition in interface Pointpublic double getOrdinate(int dim)
DirectPosition
getOrdinate in interface DirectPositiondim - The dimension to retrieve
public boolean equals(Object other)
equals in class AbstractPrimitivepublic double[] getCoordinates()
Point#setCoordinateAt(int, double))
, #setX(double)) or #setY(double)) methods instead.
getCoordinates in interface Pointpublic double getCoordinateAt(int dimension)
Point
getCoordinateAt in interface Pointdimension - The ordinate dimension
public void setCoordinateAt(int dimension,
double value)
Point
setCoordinateAt in interface Pointdimension - The dimension to setvalue - The value to setpublic void setCoordinates(double[] values)
Point
setCoordinates in interface Pointpublic void setX(double x)
Point
setX in interface Pointx - The value to setpublic void setY(double y)
Point
setY in interface Pointy - The value to setpublic String toString()
toString in class AbstractPrimitiveprotected String getFullTypeName()
public int getType()
GeometryGeometry.TYPES contants.
getType in interface GeometrygetType in class AbstractPrimitiveGeometry.TYPES or a runtime constant if it is an extended
type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||