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 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(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(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(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
|
String |
toString() |
void |
transform(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, transform, 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, withincompareToprotected static final 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(Point2D point)
public void transform(AffineTransform at)
transform in interface FShapetransform in interface Geometryat - Matriz de transformación.AffineTransformpublic boolean contains(double x,
double y,
double w,
double h)
public boolean intersects(double x,
double y,
double w,
double h)
intersects in interface Shapepublic double getX()
Pointpublic double getY()
Pointpublic Rectangle2D getBounds2D()
GeometrygetBounds2D in interface ShapegetBounds2D in interface Geometrypublic boolean contains(Rectangle2D r)
public boolean intersects(Rectangle2D r)
Geometryintersects 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)
GeometrygetPathIterator in interface ShapegetPathIterator in interface Geometryat - The transformation to apply.public PathIterator getPathIterator(AffineTransform at, double flatness)
GeometrygetPathIterator in interface 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(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 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.public MultiPoint toPoints() throws GeometryException
GeometrytoPoints in interface GeometryGeometryException