com.esri.arcgis.geometry
Interface IPoint

All Superinterfaces:
IGeometry, Serializable
All Known Implementing Classes:
Point

public interface IPoint
extends IGeometry, Serializable

Provides access to members that define two dimensional points.

Description

A Point is a zero-dimensional object that represents a specific (X, Y) location in a the two-dimensional XY-Plane. A Point may also have Z, M, and ID attributes associated with it. Existence of attributes does not alter the dimensionality of a Point nor does it alter geometric calculations performed on the Point. Attributes are only considered for attribute calculations when the Point is ZAware, MAware, or PointIDAware. Points may be constructed using PutCoords, individually setting the X and Y properties, or using the IConstructPoint interface.

Remarks

Point Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
IGeometry, IConstructPoint, IMultipoint

Method Summary
 int compare(IPoint otherPoint)
          Compares X, Y, M, Z, ID of this point (in that order) with that of the other point.
 void constrainAngle(double constraintAngle, IPoint anchor, boolean allowOpposite)
          Projects this point to the point on the infinite line defined by anchor and angle (in radians).
 void constrainDistance(double constraintRadius, IPoint anchor)
          Projects this point to the perimeter of the circle defined by radius and anchor.
 int getID()
          The Point ID attribute.
 double getM()
          The measure attribute.
 double getX()
          The X coordinate.
 double getY()
          The Y coordinate.
 double getZ()
          The Z attribute.
 void putCoords(double x, double y)
          Sets the X and Y coordinates.
 void queryCoords(double[] x, double[] y)
          Returns the X and Y coordinates.
 void setID(int pointID)
          The Point ID attribute.
 void setM(double m)
          The measure attribute.
 void setX(double x)
          The X coordinate.
 void setY(double y)
          The Y coordinate.
 void setZ(double z)
          The Z attribute.
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometry
geoNormalize, geoNormalizeFromLongitude, getDimension, getEnvelope, getGeometryType, getSpatialReference, isEmpty, project, queryEnvelope, setEmpty, setSpatialReferenceByRef, snapToSpatialReference
 

Method Detail

queryCoords

void queryCoords(double[] x,
                 double[] y)
                 throws IOException,
                        AutomationException
Returns the X and Y coordinates.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
x - The x (out: use single element array)
y - The y (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

putCoords

void putCoords(double x,
               double y)
               throws IOException,
                      AutomationException
Sets the X and Y coordinates.

Remarks

Use the IPoint::PutCoords method to set the X,Y coordinates for a Point. The coordinates can also be set by updating the X and Y properties for the point.
Point PutCoords Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
x - The x (in)
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getX

double getX()
            throws IOException,
                   AutomationException
The X coordinate.

Description

Returns and Sets the X coordinate of the Point. The X coordinate is the horizontal position of the point.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The x
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint.getZ(), IPoint.getM(), IPoint.getY()

setX

void setX(double x)
          throws IOException,
                 AutomationException
The X coordinate.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
x - The x (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getY

double getY()
            throws IOException,
                   AutomationException
The Y coordinate.

Description

Returns and Sets the Y coordinate of the Point. The Y coordinate is the vertical position of the point.

Remarks

Point Y Coord Example

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The y
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint.getZ(), IPoint.getM(), IPoint.getX()

setY

void setY(double y)
          throws IOException,
                 AutomationException
The Y coordinate.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
y - The y (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getZ

double getZ()
            throws IOException,
                   AutomationException
The Z attribute.

Description

Returns or Sets the Z attribute on the Point. Although the Z attribute refers to the 3-Dimensional depth of the point, the point still spatially exists in only 2-Dimensions with a Z attribute. Further, the point must be ZAware to make use of the Z attribute.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The z
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint.getZ(), IZAware, IPoint.getM(), IZCollection, IZ, IPoint.getX(), IPoint.getY()

setZ

void setZ(double z)
          throws IOException,
                 AutomationException
The Z attribute.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
z - The z (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getM

double getM()
            throws IOException,
                   AutomationException
The measure attribute.

Description

Returns or Sets the M attribute on the Point. The M attribute refers to the Point's measure (similar to an address). The point must be MAware to make use of the M attribute.

Remarks



Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The m
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint.getZ(), IPoint.getM(), IMSegmentation, IMSegmentation2, IMCollection, IMAware, IPoint.getX(), IPoint.getY()

setM

void setM(double m)
          throws IOException,
                 AutomationException
The measure attribute.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
m - The m (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getID

int getID()
          throws IOException,
                 AutomationException
The Point ID attribute.

Description

Returns or Sets the ID attribute of the Point. The ID attribute is a numeric label, but does not serve any computational purposes. The Point must be PointIDAware to make use of the ID attribute.

Remarks

To set the ID value for a point you need to define it to be ID aware.

Example:

IPoint pPoint
pPoint = new Point();
pPoint.putCoords( 100, 100);
IPointIDAware pIDA
pIDA = new IPointIDAwareProxy(pPoint);
pIDA.pointIDAware(true);
pPoint.setID(10);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
The pointID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setID

void setID(int pointID)
           throws IOException,
                  AutomationException
The Point ID attribute.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
pointID - The pointID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constrainDistance

void constrainDistance(double constraintRadius,
                       IPoint anchor)
                       throws IOException,
                              AutomationException
Projects this point to the perimeter of the circle defined by radius and anchor.

Description

Sets the base Point to a location a specified distance from the input anchor Point along the line between the two points. ConstrainDistance is used by the editor to fix the distance between an anchor point and an input Point. Thus, the input to be created must lie on the circumference defined by the anchor point and the fixed distance radius with the angle determined by the user.

Remarks

ConstrainDistance

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
constraintRadius - The constraintRadius (in)
anchor - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constrainAngle

void constrainAngle(double constraintAngle,
                    IPoint anchor,
                    boolean allowOpposite)
                    throws IOException,
                           AutomationException
Projects this point to the point on the infinite line defined by anchor and angle (in radians). If allowOpposite is true, then the point can also snap to angle + pi radians.

Description

Projects the base Point to to the nearest point on the line defined by an input anchor point and input angle. ConstrainAngle is used by the editor to force a newly created Point to be on the line between a fixed point and a specified angle.

Remarks

ContrainAngle

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
constraintAngle - The constraintAngle (in)
anchor - A reference to a com.esri.arcgis.geometry.IPoint (in)
allowOpposite - The allowOpposite (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint.constrainDistance(double, com.esri.arcgis.geometry.IPoint)

compare

int compare(IPoint otherPoint)
            throws IOException,
                   AutomationException
Compares X, Y, M, Z, ID of this point (in that order) with that of the other point. Returns -1 if this point's value is less, 1 if greater, and 0 otherwise. Useful for sorting a group of points.

Description

Compares the location and attributes of the base point with those of the input point to determine a relative ordering of the two points. Compares point properties in the following order: X, Y, M, Z, and ID. Returns 1 if the base point possesses the first greater property, and returns -1 if the input point possesses the first greater property. This method takes the resolution of the spatial reference into account.

Remarks

The method should not be used in order to determine equality of two points. Use IRelationalOperator::Equals or IClone::IsEqual. At 9.2, this method uses the resolution property of the point's spatial reference in order to determine (x,y) coordinate ordering. At 9.1, an untoleranced (exact) comparison was performed.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
otherPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Returns:
The result
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.