Package mil.nga.sf
Class Point
- java.lang.Object
-
- mil.nga.sf.Geometry
-
- mil.nga.sf.Point
-
- All Implemented Interfaces:
Serializable
public class Point extends Geometry
A single location in space. Each point has an X and Y coordinate. A point MAY optionally also have a Z and/or an M value.- Author:
- osbornb
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Point()
ConstructorPoint(boolean hasZ, boolean hasM, double x, double y)
ConstructorPoint(double x, double y)
ConstructorPoint(double x, double y, Double z)
ConstructorPoint(double x, double y, Double z, Double m)
ConstructorPoint(Point point)
Copy Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
copy()
Copy the geometryboolean
equals(Object obj)
boolean
equalsX(Point point)
Indicates if x values are equalboolean
equalsXY(Point point)
Indicates if x and y values are equalboolean
equalsY(Point point)
Indicates if y values are equalDouble
getM()
Get mdouble
getX()
Get xdouble
getY()
Get yDouble
getZ()
Get zint
hashCode()
boolean
isEmpty()
Is the Geometry emptyboolean
isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangencyvoid
setM(Double m)
Set mvoid
setX(double x)
Set xvoid
setY(double y)
Set yvoid
setZ(Double z)
Set z-
Methods inherited from class mil.nga.sf.Geometry
expandEnvelope, getCentroid, getDegreesCentroid, getDimension, getEnvelope, getGeometryType, hasM, hasZ, is3D, isMeasured, setHasM, setHasZ, updateZM
-
-
-
-
Constructor Detail
-
Point
public Point()
Constructor
-
Point
public Point(double x, double y)
Constructor- Parameters:
x
- x coordinatey
- y coordinate
-
Point
public Point(double x, double y, Double z)
Constructor- Parameters:
x
- x coordinatey
- y coordinatez
- z coordinate
-
Point
public Point(double x, double y, Double z, Double m)
Constructor- Parameters:
x
- x coordinatey
- y coordinatez
- z coordinatem
- m coordinate
-
Point
public Point(boolean hasZ, boolean hasM, double x, double y)
Constructor- Parameters:
hasZ
- has zhasM
- has mx
- x coordinatey
- y coordinate
-
Point
public Point(Point point)
Copy Constructor- Parameters:
point
- point to copy
-
-
Method Detail
-
getX
public double getX()
Get x- Returns:
- x
-
setX
public void setX(double x)
Set x- Parameters:
x
- x coordinate
-
getY
public double getY()
Get y- Returns:
- y
-
setY
public void setY(double y)
Set y- Parameters:
y
- y coordinate
-
getZ
public Double getZ()
Get z- Returns:
- z
-
setZ
public void setZ(Double z)
Set z- Parameters:
z
- z coordinate
-
getM
public Double getM()
Get m- Returns:
- m
-
setM
public void setM(Double m)
Set m- Parameters:
m
- m coordinate
-
copy
public Geometry copy()
Copy the geometry
-
isEmpty
public boolean isEmpty()
Is the Geometry empty
-
isSimple
public boolean isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency
-
equalsX
public boolean equalsX(Point point)
Indicates if x values are equal- Parameters:
point
- point to compare- Returns:
- true if x is equal
- Since:
- 2.2.1
-
equalsY
public boolean equalsY(Point point)
Indicates if y values are equal- Parameters:
point
- point to compare- Returns:
- true if y is equal
- Since:
- 2.2.1
-
equalsXY
public boolean equalsXY(Point point)
Indicates if x and y values are equal- Parameters:
point
- point to compare- Returns:
- true if x and y are equal
- Since:
- 2.2.1
-
-