com.esri.core.geometry
Class Point

java.lang.Object
  extended by com.esri.core.geometry.Geometry
      extended by com.esri.core.geometry.Point
All Implemented Interfaces:
Serializable

public final class Point
extends Geometry
implements Serializable

A Point is a zero-dimensional object that represents a specific (X,Y) location in a two-dimensional XY-Plane. In case of Geographic Coordinate Systems, the X coordinate is the longitude and the Y is the latitude.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.esri.core.geometry.Geometry
Geometry.Type
 
Constructor Summary
Point()
          Creates an empty 2D point.
Point(double x, double y)
          Creates a 2D Point with specified X and Y coordinates.
Point(double x, double y, double z)
          Creates a 3D point with specified X, Y and Z coordinates.
 
Method Summary
 void applyTransformation(Transformation2D transform)
          Applies 2D affine transformation in XY plane.
 void copyTo(Geometry dst)
          Copies this geometry to another geometry of the same type.
 Geometry createInstance()
          Creates an instance of an empty geometry of the same type.
 boolean equals(Object _other)
          Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.
 int getDimension()
          Returns the topological dimension of the geometry object based on the geometry's type.
 Geometry.Type getType()
          Returns the geometry type.
 double getX()
          Returns the X coordinate of the point.
 double getY()
          Returns the Y coordinate of this point.
 int hashCode()
          Returns the hash code for the point.
 boolean isEmpty()
          Indicates if the geometry object contains geometric information.
 void queryEnvelope(Envelope env)
          Gets the axis aligned bounding box of the geometry.
 void setEmpty()
          Sets the geometry to its original initialization state by releasing all data referenced by the geometry.
 void setX(double x)
          Sets the X coordinate of the point.
 void setXY(double x, double y)
          Set the X and Y coordinate of the point.
 void setY(double y)
          Sets the Y coordinate of this point.
 
Methods inherited from class com.esri.core.geometry.Geometry
calculateArea2D, calculateLength2D, copy, getDimensionFromType, getStateFlag, isArea, isLinear, isMultiPath, isMultiVertex, isPoint, isSegment
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Point

public Point()
Creates an empty 2D point.


Point

public Point(double x,
             double y)
Creates a 2D Point with specified X and Y coordinates. In case of Geographic Coordinate Systems, the X coordinate is the longitude and the Y is the latitude.

Parameters:
x - The X coordinate of the new 2D point.
y - The Y coordinate of the new 2D point.

Point

public Point(double x,
             double y,
             double z)
Creates a 3D point with specified X, Y and Z coordinates. In case of Geographic Coordinate Systems, the X coordinate is the longitude and the Y is the latitude.

Parameters:
x - The X coordinate of the new 3D point.
y - The Y coordinate of the new 3D point.
z - The Z coordinate of the new 3D point.
Method Detail

getX

public final double getX()
Returns the X coordinate of the point.


setX

public void setX(double x)
Sets the X coordinate of the point.

Parameters:
x - The X coordinate to be set for this point.

getY

public final double getY()
Returns the Y coordinate of this point.


setY

public void setY(double y)
Sets the Y coordinate of this point.

Parameters:
y - The Y coordinate to be set for this point.

getType

public Geometry.Type getType()
Description copied from class: Geometry
Returns the geometry type.

Specified by:
getType in class Geometry
Returns:
Returns the geometry type.

getDimension

public int getDimension()
Description copied from class: Geometry
Returns the topological dimension of the geometry object based on the geometry's type.

Returns 0 for point and multipoint.

Returns 1 for lines and polylines.

Returns 2 for polygons and envelopes

Returns 3 for objects with volume

Specified by:
getDimension in class Geometry
Returns:
Returns the integer value of the dimension of geometry.

setEmpty

public void setEmpty()
Description copied from class: Geometry
Sets the geometry to its original initialization state by releasing all data referenced by the geometry.

Specified by:
setEmpty in class Geometry

applyTransformation

public void applyTransformation(Transformation2D transform)
Description copied from class: Geometry
Applies 2D affine transformation in XY plane.

Specified by:
applyTransformation in class Geometry
Parameters:
transform - The affine transformation to be applied to this geometry.

copyTo

public void copyTo(Geometry dst)
Description copied from class: Geometry
Copies this geometry to another geometry of the same type. The result geometry is an exact copy.

Specified by:
copyTo in class Geometry

createInstance

public Geometry createInstance()
Description copied from class: Geometry
Creates an instance of an empty geometry of the same type.


isEmpty

public boolean isEmpty()
Description copied from class: Geometry
Indicates if the geometry object contains geometric information. IsEmpty returns true when the geometry object does not contain geometric information beyond its original initialization state.

Specified by:
isEmpty in class Geometry
Returns:
boolean Returns true if this geometry is empty.

queryEnvelope

public void queryEnvelope(Envelope env)
Description copied from class: Geometry
Gets the axis aligned bounding box of the geometry.

Specified by:
queryEnvelope in class Geometry
Parameters:
env - The envelope to return the result in.

setXY

public void setXY(double x,
                  double y)
Set the X and Y coordinate of the point.

Parameters:
x - X coordinate of the point.
y - Y coordinate of the point.

equals

public boolean equals(Object _other)
Returns TRUE when this geometry has exactly same type, properties, and coordinates as the other geometry.

Overrides:
equals in class Object

hashCode

public int hashCode()
Returns the hash code for the point.

Overrides:
hashCode in class Object


Copyright © 2012. All Rights Reserved.