com.esri.arcgis.datasourcesraster
Class MapPoint

java.lang.Object
  extended by com.esri.arcgis.datasourcesraster.MapPoint
All Implemented Interfaces:
IMapPoint, IGeometry, IPoint, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class MapPoint
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IMapPoint

Implements interface IMapPoint (a point in map space).

Product Availability

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

See Also:
Serialized Form

Constructor Summary
MapPoint()
          Constructs a MapPoint using ArcGIS Engine.
MapPoint(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapPoint theMapPoint = (MapPoint) obj;
 
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.
 boolean equals(Object o)
          Compare this object with another
 void geoNormalize()
          Shifts longitudes, if need be, into a continuous range of 360 degrees.
 void geoNormalizeFromLongitude(double longitude)
          Normalizes longitudes into a continuous range containing the longitude.
static String getClsid()
          getClsid.
 int getDimension()
          The topological dimension of this geometry.
 IEnvelope getEnvelope()
          Creates a copy of this geometry's envelope and returns it.
 int getGeometryType()
          The type of this geometry.
 int getID()
          The Point ID attribute.
 String getImageID()
          The image ID of this IMapPoint.
 double getM()
          The measure attribute.
 String getMapPointID()
          The identification string of this IMapPoint.
 IDoubleArray getPointingErrorCovarianceMatrix()
          The pointing error covariance matrix that is associated with this IMapPoint.
 ISpatialReference getSpatialReference()
          The spatial reference associated with this geometry.
 double getX()
          The X coordinate.
 double getY()
          The Y coordinate.
 double getZ()
          The Z attribute.
 int hashCode()
          the hashcode for this object
 boolean isEmpty()
          Indicates whether this geometry contains any points.
 void project(ISpatialReference newReferenceSystem)
          Projects this geometry into a new spatial reference.
 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 queryEnvelope(IEnvelope outEnvelope)
          Copies this geometry's envelope properties into the specified envelope.
 void setEmpty()
          Removes all points from this geometry.
 void setID(int pointID)
          The Point ID attribute.
 void setImageID(String pImageID)
          The image ID of this IMapPoint.
 void setM(double m)
          The measure attribute.
 void setMapPointID(String pMapPointID)
          The identification string of this IMapPoint.
 void setPointingErrorCovarianceMatrix(IDoubleArray ppPointingErrCovMatrix)
          The pointing error covariance matrix that is associated with this IMapPoint.
 void setSpatialReferenceByRef(ISpatialReference spatialRef)
          The spatial reference associated with this geometry.
 void setX(double x)
          The X coordinate.
 void setY(double y)
          The Y coordinate.
 void setZ(double z)
          The Z attribute.
 void snapToSpatialReference()
          Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

MapPoint

public MapPoint()
         throws IOException,
                UnknownHostException
Constructs a MapPoint using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

MapPoint

public MapPoint(Object obj)
         throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
MapPoint theMapPoint = (MapPoint) obj;

Construct a MapPoint using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to MapPoint.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getImageID

public String getImageID()
                  throws IOException,
                         AutomationException
The image ID of this IMapPoint.

Product Availability

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

Specified by:
getImageID in interface IMapPoint
Returns:
The pImageID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setImageID

public void setImageID(String pImageID)
                throws IOException,
                       AutomationException
The image ID of this IMapPoint.

Product Availability

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

Specified by:
setImageID in interface IMapPoint
Parameters:
pImageID - The pImageID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMapPointID

public String getMapPointID()
                     throws IOException,
                            AutomationException
The identification string of this IMapPoint.

Product Availability

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

Specified by:
getMapPointID in interface IMapPoint
Returns:
The pMapPointID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMapPointID

public void setMapPointID(String pMapPointID)
                   throws IOException,
                          AutomationException
The identification string of this IMapPoint.

Product Availability

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

Specified by:
setMapPointID in interface IMapPoint
Parameters:
pMapPointID - The pMapPointID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointingErrorCovarianceMatrix

public IDoubleArray getPointingErrorCovarianceMatrix()
                                              throws IOException,
                                                     AutomationException
The pointing error covariance matrix that is associated with this IMapPoint.

Product Availability

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

Specified by:
getPointingErrorCovarianceMatrix in interface IMapPoint
Returns:
A reference to a com.esri.arcgis.system.IDoubleArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setPointingErrorCovarianceMatrix

public void setPointingErrorCovarianceMatrix(IDoubleArray ppPointingErrCovMatrix)
                                      throws IOException,
                                             AutomationException
The pointing error covariance matrix that is associated with this IMapPoint.

Product Availability

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

Specified by:
setPointingErrorCovarianceMatrix in interface IMapPoint
Parameters:
ppPointingErrCovMatrix - A reference to a com.esri.arcgis.system.IDoubleArray (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryCoords

public 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

Specified by:
queryCoords in interface IPoint
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

public 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

Specified by:
putCoords in interface IPoint
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

public 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

Specified by:
getX in interface IPoint
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

public 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

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

getY

public 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

Specified by:
getY in interface IPoint
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

public 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

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

getZ

public 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

Specified by:
getZ in interface IPoint
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

public 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

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

getM

public 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

Specified by:
getM in interface IPoint
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

public 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

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

getID

public 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

Specified by:
getID in interface IPoint
Returns:
The pointID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setID

public 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

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

constrainDistance

public 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

Specified by:
constrainDistance in interface IPoint
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

public 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

Specified by:
constrainAngle in interface IPoint
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

public 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

Specified by:
compare in interface IPoint
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.

getGeometryType

public int getGeometryType()
                    throws IOException,
                           AutomationException
The type of this geometry.

Remarks

esriGeometryNull          = 0
esriGeometryPoint = 1
esriGeometryMultipoint = 2
esriGeometryPolyline = 3
esriGeometryPolygon = 4
esriGeometryEnvelope = 5
esriGeometryPath = 6
esriGeometryAny = 7
esriGeometryMultiPatch = 9
esriGeometryRing = 11
esriGeometryLine = 13
esriGeometryCircularArc = 14
esriGeometryBezier3Curve = 15
esriGeometryEllipticArc = 16
esriGeometryBag = 17
esriGeometryTriangleStrip = 18
esriGeometryTriangleFan = 19
esriGeometryRay = 20
esriGeometrySphere = 21
Geometry Type Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getGeometryType in interface IGeometry
Returns:
A com.esri.arcgis.geometry.esriGeometryType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDimension

public int getDimension()
                 throws IOException,
                        AutomationException
The topological dimension of this geometry.

Description

Returns the dimension of the geometry object based on the geometry's type.

Remarks


Note: At 9.0, Multipatches are now considered as two dimensional geometry. esriGeometry3Dimension will be used for an upcoming new geometry type.
Supported esriGeometryDimensions:

-1 esriGeometryNoDimension
1 esriGeometry0Dimension
2 esriGeometry1Dimension
4 esriGeometry2Dimension
5 esriGeometry25Dimension
6 esriGeometry3Dimension

Dimension Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDimension in interface IGeometry
Returns:
A com.esri.arcgis.geometry.esriGeometryDimension constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSpatialReference

public ISpatialReference getSpatialReference()
                                      throws IOException,
                                             AutomationException
The spatial reference associated with this geometry.

Description

Returns and sets the Spatial Reference in which the geometry exists. If the spatial reference has not been set the property will return an empty ISpatialReference instance.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSpatialReference in interface IGeometry
Returns:
A reference to a com.esri.arcgis.geometry.ISpatialReference
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setSpatialReferenceByRef

public void setSpatialReferenceByRef(ISpatialReference spatialRef)
                              throws IOException,
                                     AutomationException
The spatial reference associated with this geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setSpatialReferenceByRef in interface IGeometry
Parameters:
spatialRef - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isEmpty

public boolean isEmpty()
                throws IOException,
                       AutomationException
Indicates whether this geometry contains any points.

Description

IsEmpty returns TRUE when the Geometry object does not contain geometric information beyond its original initialization state. An object may be returned to its original initialization (IsEmpty = TRUE) state using SetEmpty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEmpty in interface IGeometry
Returns:
The isEmpty
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setEmpty

public void setEmpty()
              throws IOException,
                     AutomationException
Removes all points from this geometry.

Description

SetEmpty returns the Geometry to its original initialization state by releasing all data referenced by the Geometry.

Remarks


Use the SetEmpty method to clear geometries and release memory. For example, a polygon with 100 rings will have an internal array of 100 pointers to ring objects. That array will go away and Release will be called on each ring. If that polygon had the only reference on those rings, then they'll go away, which releases all their segments, which may also then go away.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setEmpty in interface IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryEnvelope

public void queryEnvelope(IEnvelope outEnvelope)
                   throws IOException,
                          AutomationException
Copies this geometry's envelope properties into the specified envelope.

Description

Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.

Remarks

Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryEnvelope Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryEnvelope in interface IGeometry
Parameters:
outEnvelope - A reference to a com.esri.arcgis.geometry.IEnvelope (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getEnvelope

public IEnvelope getEnvelope()
                      throws IOException,
                             AutomationException
Creates a copy of this geometry's envelope and returns it.

Description

Returns the unique Envelope that binds the Geometry object. This is the smallest Envelope that Contains the object.

Remarks

Envelope Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getEnvelope in interface IGeometry
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

project

public void project(ISpatialReference newReferenceSystem)
             throws IOException,
                    AutomationException
Projects this geometry into a new spatial reference.

Description

To Project, the geometry needs to have a Spatial Reference set, and not have an UnknownCoordinateSystem. The new spatial reference system passed to the method defines the output coordinate system. If either spatial reference is Unknown, the coordinates are not changed. The Z and measure values are not changed by the Project method.

A geometry is not densified before it is projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Use IGeometry2::ProjectEx if you want to densify the geometries while they are projected.

The Project method must be applied on high-level geometries only. High-Level geometries are point, multipoint, polyline and polygon. To use this method with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped into high-level geometry types.

If a geometry is projected to a projected coordinate system that can't represent the geographic area where the geometry is located (or if trying to move an xy coordinate from outside the projected coordinate system back into geographic), the geometry will be set to empty.

Remarks

Note: This method can only be called upon the top level geometries (Points, Multipoints, Polylines and Polygons). If the from/to spatial references have different geographic coordinate systems, the Project method looks for a GeoTransformationsOperationSet. If the set of Geotransformations is present in memory, Project will use it to perform a geographic/datum Transformation. To use a specific geotransformation, use the IGeometry2::ProjectEx method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
project in interface IGeometry
Parameters:
newReferenceSystem - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

snapToSpatialReference

public void snapToSpatialReference()
                            throws IOException,
                                   AutomationException
Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.

Remarks

SnapToSpatialReference rounds all coordinates to the resolution defined by the geometry's spatial reference system. This has a similar effect on the geometry as storing the geometry in a Geodatabase.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
snapToSpatialReference in interface IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geoNormalize

public void geoNormalize()
                  throws IOException,
                         AutomationException
Shifts longitudes, if need be, into a continuous range of 360 degrees.

Remarks

GeoNormalize acts on geometries whose geographic system coordinates are below -180 degrees longitude or over +180 degrees longitude or on geometries that span the +-180 degrees longitude.
This method requires the geometry to have a valid spatial reference (geographic or projected coordinate system).
This method is used internally as part of the projection process for polygons and polylines. It is typically not used by itself.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
geoNormalize in interface IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geoNormalizeFromLongitude

public void geoNormalizeFromLongitude(double longitude)
                               throws IOException,
                                      AutomationException
Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.

Remarks

This method is obsolete. Use IGeometry::GeoNormalize instead.
This method requires the geometry to have a valid spatial reference (geographic or projected coordinate system).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
geoNormalizeFromLongitude in interface IGeometry
Parameters:
longitude - The longitude (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.