public class Point2D extends AbstractPrimitive implements Point, DirectPosition
Geometry.DIMENSIONS, Geometry.OPERATIONS, Geometry.SUBTYPES, Geometry.TYPES, Geometry.ValidationStatus| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
COORDINATES_FIELD |
protected double |
x |
protected double |
y |
geometryType, geomManager, id, logger, projectionBEST, E, EXTENDED_GEOMSUBTYPE_OFFSET, EXTENDED_GEOMTYPE_OFFSET, N, NE, NW, S, SE, SELECTHANDLER, STRETCHINGHANDLER, SW, W| Constructor and Description |
|---|
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(java.awt.geom.Point2D point) |
| Modifier and Type | Method and Description |
|---|---|
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(java.awt.geom.Point2D p) |
boolean |
contains(java.awt.geom.Rectangle2D r) |
boolean |
equals(java.lang.Object other) |
java.awt.Rectangle |
getBounds() |
java.awt.geom.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 java.lang.String |
getFullTypeName() |
GeneralPathX |
getGeneralPath()
Get GeneralPathIterator, to do registered operations to it.
|
double |
getOrdinate(int dim)
Returns the ordinate of the given dimension.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
If applies an affine transformation and returns the GeneralPathXIterator
with this geometry's information.
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.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.
|
java.awt.Shape |
getShape(java.awt.geom.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(java.awt.geom.Rectangle2D r)
Returns true if this geometry intersects the rectangle passed as
parameter.
|
void |
reProject(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
|
MultiPoint |
toPoints()
Converts the geometry to be points and makes with them a multiPoint
|
java.lang.String |
toString() |
void |
transform(java.awt.geom.AffineTransform at)
Aplica la transformaciónn de la matriz de transformación que se pasa como
parámetro.
|
area, buffer, centroid, cloneGeometry, closestPoints, compareTo, contains, containsPoint, containsRectangle, convertToWKB, convertToWKB, convertToWKBForcingType, convertToWKT, convexHull, coveredBy, covers, crosses, difference, disjoint, distance, fastIntersects, getGeometryType, getHandlers, getId, getInteriorPoint, getInternalShape, getShape, getSRS, getValidationStatus, intersection, intersects, intersectsRectangle, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, overlaps, perimeter, rotate, scale, snapTo, toJTS, touches, 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, getShape, getValidationStatus, intersection, intersects, invokeOperation, invokeOperation, isCCW, isSimple, isValid, isWithinDistance, makeValid, move, offset, out, overlaps, perimeter, rotate, scale, snapTo, toLines, toPolygons, touches, union, withinprotected static final java.lang.String COORDINATES_FIELD
protected double x
protected double y
public Point2D(GeometryType geometryType)
GeometryType#create() to create the
geometrytype - The geometry typepublic Point2D(double x,
double y)
public Point2D(GeometryType geometryType, double x, double y)
public Point2D(int type,
int subtype)
public Point2D(java.awt.geom.Point2D point)
public void transform(java.awt.geom.AffineTransform at)
public boolean contains(double x,
double y)
contains in interface java.awt.Shapepublic boolean contains(double x,
double y,
double w,
double h)
contains in interface java.awt.Shapepublic boolean intersects(double x,
double y,
double w,
double h)
intersects in interface java.awt.Shapepublic java.awt.Rectangle getBounds()
getBounds in interface java.awt.Shapepublic double getX()
Pointpublic double getY()
Pointpublic boolean contains(java.awt.geom.Point2D p)
contains in interface java.awt.Shapepublic java.awt.geom.Rectangle2D getBounds2D()
GeometrygetBounds2D in interface java.awt.ShapegetBounds2D in interface Geometrypublic boolean contains(java.awt.geom.Rectangle2D r)
contains in interface java.awt.Shapepublic boolean intersects(java.awt.geom.Rectangle2D r)
Geometryintersects in interface java.awt.Shapeintersects in interface Geometryr - Rectangle.this intersects r.public java.awt.Shape getShape(java.awt.geom.AffineTransform affineTransform)
getShape in interface GeometrygetShape in class AbstractPrimitivepublic java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface Geometryat - The transformation to apply.public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
GeometrygetPathIterator in interface java.awt.ShapegetPathIterator in interface Geometryat - The affine transformation.public int getShapeType()
FShapegetShapeType in interface FShapegetShapeType in class AbstractPrimitivepublic FShape cloneFShape()
FShapecloneFShape in interface FShapepublic void reProject(ICoordTrans ct)
Geometrypublic Handler[] getStretchingHandlers()
FShapegetStretchingHandlers in interface FShapepublic Handler[] getSelectHandlers()
FShapegetSelectHandlers in interface FShapepublic int getDimension()
GeometrygetDimension 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()
GeometrygetGeneralPath in interface Geometrypublic DirectPosition getDirectPosition()
Pointof a point, that is
composed by a set of ordinatesgetDirectPosition in interface Pointpublic double getOrdinate(int dim)
DirectPositiongetOrdinate in interface DirectPositiondim - The dimension to retrievepublic boolean equals(java.lang.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)
PointgetCoordinateAt in interface Pointdimension - The ordinate dimensionpublic void setCoordinateAt(int dimension,
double value)
PointsetCoordinateAt in interface Pointdimension - The dimension to setvalue - The value to setpublic void setCoordinates(double[] values)
PointsetCoordinates in interface Pointpublic void setX(double x)
Pointpublic void setY(double y)
Pointpublic java.lang.String toString()
toString in class AbstractPrimitiveprotected java.lang.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.public MultiPoint toPoints() throws GeometryException
GeometrytoPoints in interface GeometryGeometryException