Package com.kheops.jmap.spatial
Class Point.Float
java.lang.Object
com.kheops.jmap.spatial.DefaultGeometry
com.kheops.jmap.spatial.Point
com.kheops.jmap.spatial.Point.Float
- All Implemented Interfaces:
Geometry
,PointTypeGeometry
,Serializable
,Cloneable
- Enclosing class:
Point
The
Float
class defines a point specified in float
precision.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.kheops.jmap.spatial.Point
Point.Double, Point.Float
-
Field Summary
FieldsModifier and TypeFieldDescriptionfloat
The X coordinate of thisPoint
.float
The Y coordinate of thisPoint
.Fields inherited from class com.kheops.jmap.spatial.Point
PRECISION_DOUBLE, PRECISION_FLOAT
Fields inherited from interface com.kheops.jmap.spatial.Geometry
GEOMETRY_ANNOTATION, GEOMETRY_COMPLEX, GEOMETRY_ELLIPSE, GEOMETRY_LINE, GEOMETRY_LINEAR_RING, GEOMETRY_LINESTRING, GEOMETRY_MULTI_ANNOTATION, GEOMETRY_MULTI_LINESTRING, GEOMETRY_MULTI_POINT, GEOMETRY_MULTI_POLYGON, GEOMETRY_POINT, GEOMETRY_POLYGON, GEOMETRY_RECTANGLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
Clones this geometry.Returns the minimum bounding rectangle of this geometry.double
getX()
Returns the X coordinate of thisPoint
indouble
precision.double
getY()
Returns the Y coordinate of thisPoint
indouble
precision.Point[]
Returns this geometry as an array of Point.void
setLocation
(double x, double y) Sets the location of thisPoint
to the specifieddouble
coordinates.void
setLocation
(float x, float y) Sets the location of thisPoint
to the specifiedfloat
coordinates.void
setX
(double x) Returns the X coordinate of thisPoint
indouble
precision.void
setX
(float x) void
setY
(double y) Sets the Y coordinate of thisPoint
indouble
precision.void
setY
(float y) int
sizeOf()
Returns an approximation in bytes of the memory used by this geometry.toString()
Returns aString
that represents the value of thisPoint
.void
translate
(double dx, double dy) Translates the point by the specified offsetMethods inherited from class com.kheops.jmap.spatial.Point
area, boundary, createBounds, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, equals, getCenteredPoint, getGeometryId, getGeometryType, hashCode, length, pointIterator, setLocation, spatiallyEquals, spatiallyEquals, transform, translate
Methods inherited from class com.kheops.jmap.spatial.DefaultGeometry
asText, spatiallyEquals
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.kheops.jmap.spatial.Geometry
asText, spatiallyEquals
-
Field Details
-
x
public float xThe X coordinate of thisPoint
. -
y
public float yThe Y coordinate of thisPoint
.
-
-
Constructor Details
-
Float
public Float()Constructs and initializes aPoint
with coordinates (0, 0). -
Float
public Float(double x, double y) Constructs and initializes aPoint
with the specified coordinates.- Parameters:
x
- The X coordinate of thisPoint
y
- The Y coordinate of thisPoint
-
Float
-
-
Method Details
-
clone
Description copied from class:Point
Clones this geometry. -
getX
public double getX()Returns the X coordinate of thisPoint
indouble
precision. -
getY
public double getY()Returns the Y coordinate of thisPoint
indouble
precision. -
setLocation
public void setLocation(double x, double y) Sets the location of thisPoint
to the specifieddouble
coordinates.- Specified by:
setLocation
in classPoint
- Parameters:
x
- The X coordinate of thisPoint
y
- The Y coordinate of thisPoint
-
setLocation
public void setLocation(float x, float y) Sets the location of thisPoint
to the specifiedfloat
coordinates.- Parameters:
x
- The X coordinate of thisPoint
y
- The Y coordinate of thisPoint
-
setX
public void setX(float x) -
setY
public void setY(float y) -
setX
public void setX(double x) Description copied from class:Point
Returns the X coordinate of thisPoint
indouble
precision. -
setY
public void setY(double y) Description copied from class:Point
Sets the Y coordinate of thisPoint
indouble
precision. -
toString
Returns aString
that represents the value of thisPoint
. -
getBounds
Description copied from interface:Geometry
Returns the minimum bounding rectangle of this geometry.- Returns:
- the bounding box of this geometry.
-
translate
public void translate(double dx, double dy) Description copied from class:Point
Translates the point by the specified offset -
serialize
Description copied from interface:Geometry
Returns this geometry as an array of Point.- Returns:
- this geometry as an array of Point.
-
sizeOf
public int sizeOf()Returns an approximation in bytes of the memory used by this geometry.- Returns:
- the memory used by this geometry.
-