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 TypeFieldDescriptionfloatThe X coordinate of thisPoint.floatThe Y coordinate of thisPoint.Fields inherited from class com.kheops.jmap.spatial.Point
PRECISION_DOUBLE, PRECISION_FLOATFields 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.doublegetX()Returns the X coordinate of thisPointindoubleprecision.doublegetY()Returns the Y coordinate of thisPointindoubleprecision.Point[]Returns this geometry as an array of Point.voidsetLocation(double x, double y) Sets the location of thisPointto the specifieddoublecoordinates.voidsetLocation(float x, float y) Sets the location of thisPointto the specifiedfloatcoordinates.voidsetX(double x) Returns the X coordinate of thisPointindoubleprecision.voidsetX(float x) voidsetY(double y) Sets the Y coordinate of thisPointindoubleprecision.voidsetY(float y) intsizeOf()Returns an approximation in bytes of the memory used by this geometry.toString()Returns aStringthat represents the value of thisPoint.voidtranslate(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, translateMethods inherited from class com.kheops.jmap.spatial.DefaultGeometry
asText, spatiallyEqualsMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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 aPointwith coordinates (0, 0). -
Float
public Float(double x, double y) Constructs and initializes aPointwith the specified coordinates.- Parameters:
x- The X coordinate of thisPointy- The Y coordinate of thisPoint
-
Float
-
-
Method Details
-
clone
Description copied from class:PointClones this geometry. -
getX
public double getX()Returns the X coordinate of thisPointindoubleprecision. -
getY
public double getY()Returns the Y coordinate of thisPointindoubleprecision. -
setLocation
public void setLocation(double x, double y) Sets the location of thisPointto the specifieddoublecoordinates.- Specified by:
setLocationin classPoint- Parameters:
x- The X coordinate of thisPointy- The Y coordinate of thisPoint
-
setLocation
public void setLocation(float x, float y) Sets the location of thisPointto the specifiedfloatcoordinates.- Parameters:
x- The X coordinate of thisPointy- 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:PointReturns the X coordinate of thisPointindoubleprecision. -
setY
public void setY(double y) Description copied from class:PointSets the Y coordinate of thisPointindoubleprecision. -
toString
Returns aStringthat represents the value of thisPoint. -
getBounds
Description copied from interface:GeometryReturns 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:PointTranslates the point by the specified offset -
serialize
Description copied from interface:GeometryReturns 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.
-