com.esri.arcgis.geometry
Class GeometryBag

java.lang.Object
  extended by com.esri.arcgis.geometry.GeometryBag
All Implemented Interfaces:
IConstructGeometryCollection, IEnumGeometry, IGeometry, IGeometry2, IGeometry3, IGeometry4, IGeometry5, IGeometryBag, IGeometryCollection, IRelationalOperator, IRelationalOperator2, ISpatialIndex, ITopologicalOperator, ITransform2D, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, ISupportErrorInfo, Externalizable, Serializable

public class GeometryBag
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGeometry, IGeometry2, IGeometry3, IGeometry4, IGeometry5, IGeometryBag, IRelationalOperator, IRelationalOperator2, ITopologicalOperator, IGeometryCollection, IEnumGeometry, IConstructGeometryCollection, ISupportErrorInfo, IClone, IPersist, IPersistStream, ITransform2D, ISpatialIndex, Externalizable

An ordered collection of objects that support the IGeometry interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
GeometryBag()
          Constructs a GeometryBag using ArcGIS Engine.
GeometryBag(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeometryBag theGeometryBag = (GeometryBag) obj;
 
Method Summary
 void addGeometries(int count, IGeometry newGeometries)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]).
 void addGeometry(IGeometry inGeometry, Object before, Object after)
          Adds a reference to the input geometry either at the end, or before, or after the specified index.
 void addGeometryCollection(IGeometryCollection newGeometries)
          Adds references to geometries in the input collection.
 void assign(IClone src)
          Assigns the properties of src to the receiver.
 IGeometry buffer(double distance)
          Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.
 void clip(IEnvelope clipperEnvelope)
          Constructs the intersection of this geometry and the specified envelope.
 void clipDense(IEnvelope clipperEnvelope, double denseDistance)
          Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.
 void constructDivideEqual(IPolyline divideSource, int numDivisions, int divideHow)
          Locates additional points equally spaced along the input polyline, and create either new segments, parts or polylines depending on the value of divideHow.
 void constructDivideLength(IPolyline divideSource, double length, boolean asRatio, int divideHow)
          Locates additional points along the input polyline, spaced at a specified interval, and create either new segments, parts, or polylines depending on the value of divideHow.
 void constructUnion(IEnumGeometry geometries)
          Defines this geometry to be the union of the inputs.
 boolean contains(IGeometry other)
          Indicates if this geometry contains the other geometry.
 boolean containsEx(IGeometry pOther, int relation)
          Indicates if this geometry contains the other geometry, optionally using Celementini's definition.
 IGeometry convexHull()
          Constructs the convex hull of this geometry.
 boolean crosses(IGeometry other)
          Indicates if the two geometries intersect in a geometry of lesser dimension.
 void cut(IPolyline cutter, IGeometry[] leftGeom, IGeometry[] rightGeom)
          Splits this geometry into a part left of the cutting polyline, and a part right of it.
 IGeometry difference(IGeometry other)
          Constructs the geometry containing points from this geometry but not the other geometry.
 boolean disjoint(IGeometry other)
          Indicates if the two geometries share no points in common.
 boolean equals(Object o)
          Compare this object with another
 IClone esri_clone()
          Clones the receiver and assigns the result to *clone.
 boolean esri_equals(IGeometry other)
          Indicates if the two geometries are of the same type and define the same set of points in the plane.
 void geometriesChanged()
          Tells this geometry collection that some of its geometries have been altered.
 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.
 IGeometry getBoundary()
          The boundary of this geometry.
 IPoint getCentroidEx()
          The center of gravity (centroid).
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 int getCount()
          The number of geometries in the enumeration.
 int getDimension()
          The topological dimension of this geometry.
 IEnvelope getEnvelope()
          Creates a copy of this geometry's envelope and returns it.
 IGeometry getGeometry(int index)
          A reference to the ith geometry.
 int getGeometryCount()
          The number of geometries in this collection.
 int getGeometryType()
          The type of this geometry.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 ISpatialReference getSpatialReference()
          The spatial reference associated with this geometry.
 int hashCode()
          the hashcode for this object
 void insertGeometries(int index, int count, IGeometry newGeometries)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[]).
 void insertGeometryCollection(int index, IGeometryCollection newGeometries)
          Inserts at the specified index references to all if the geometries in the input collection.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 IGeometry intersect(IGeometry other, int resultDimension)
          Constructs the geometry that is the set-theoretic intersection of the input geometries.
 void invalidate()
          Invalidate the spatial index.
 boolean isAllowIndexing()
          Indicates whether to allow a spatial index to be created for this geometry.
 boolean isChanged()
          Indicates if a geometry has been changed (edited, projected, etc).
 void isDirty()
          isDirty
 boolean isEmpty()
          Indicates whether this geometry contains any points.
 boolean isEqual(IClone other)
          Indicates if the receiver and other have the same properties.
 boolean isIdentical(IClone other)
          Indicates if the receiver and other are the same object.
 boolean isKnownSimple()
          Indicates whether this geometry is known (or assumed) to be topologically correct.
 boolean isLosslessExport()
          Indicates if this geometry bag exported itself to a shapefile buffer with no loss of information.
 boolean isNear(IGeometry pOther, double distance)
          Indicates if this geometry is within distance from the other geometry.
 boolean isSimple()
          Indicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.
 void load(IStream pstm)
          load
 void move(double dx, double dy)
          Moves dx units horizontally and dy units vertically.
 void moveVector(ILine v)
          Moves a direction and distance v.
 IGeometry next()
          Returns the next geometry in the enumeration.
 boolean overlaps(IGeometry other)
          Indicates if the intersection of the two geometries has the same dimension as one of the input geometries.
 void project(ISpatialReference newReferenceSystem)
          Projects this geometry into a new spatial reference.
 void project5(ISpatialReference newSpatialReference, int projectionHint)
          Same as Project, but with additional parameter projectionHint.
 void projectEx(ISpatialReference newReferenceSystem, int direction, IGeoTransformation geoTransformation, boolean bAngularDensify, double maxSegmentLength, double maxDeviation)
          Projects a geometry, optionally applies a GeoTransformation, and optionally densifies the geometry.
 void projectEx5(ISpatialReference newReferenceSystem, int direction, ITransformation transformation, boolean bAngularDensify, double maxSegmentLength, double maxDeviation, int projectionHint)
          Same as ProjectEx, but with additional parameter projectionHint.
 void queryClipped(IEnvelope clipperEnvelope, IGeometry clippedGeometry)
          Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope.
 void queryClippedDense(IEnvelope clipperEnvelope, double denseDistance, IGeometry clippedGeometry)
          Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.
 void queryEnvelope(IEnvelope outEnvelope)
          Copies this geometry's envelope properties into the specified envelope.
 void queryGeometries(int index, int count, IGeometry[] geometries)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[][]).
 void queryWKSEnvelope(_WKSEnvelope[] e)
          Defines the specified wksenvelope to be the current extent of this geometry in the x-y plane.
 void readExternal(ObjectInput in)
           
 boolean relation(IGeometry other, String relationDescription)
          Indicates if the defined relationship exists.
 void removeGeometries(int index, int count)
          Removes references to some geometries from this collection.
 void reset()
          Starts the enumeration at the beginning.
 void rotate(IPoint origin, double rotationAngle)
          Rotates about the specified origin point.
 void save(IStream pstm, int fClearDirty)
          save
 void scale(IPoint origin, double sx, double sy)
          Scales about the specified origin using seperate horizonal and vertical scales.
 void setAllowIndexing(boolean allowIndexing)
          Indicates whether to allow a spatial index to be created for this geometry.
 void setChanged(boolean isChanged)
          Indicates if a geometry has been changed (edited, projected, etc).
 void setEmpty()
          Removes all points from this geometry.
 void setGeometries(int count, IGeometry newGeometries)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]).
 void setGeometryCollection(IGeometryCollection newParts)
          Replaces all geometries in the collection with references to geometries from the input collection.
 void setSpatialReferenceByRef(ISpatialReference spatialRef)
          The spatial reference associated with this geometry.
 void simplify()
          Makes this geometry topologically correct.
 void snapToSpatialReference()
          Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
 IGeometry symmetricDifference(IGeometry other)
          Constructs the geometry that contains points from either but not both input geometries.
 boolean touches(IGeometry other)
          Indicates if the boundaries of the geometries intersect.
 void transform(int direction, ITransformation transformation)
          Applies an arbitrary transformation.
 IGeometry union(IGeometry other)
          Constructs the geometry that is the set-theoretic union of the input geometries.
 boolean within(IGeometry other)
          Indicates if this geometry is contained (is within) another geometry.
 boolean withinEx(IGeometry pOther, int relation)
          Indicates if this geometry contains the other geometry, optionally using Celementini's definition.
 void writeExternal(ObjectOutput out)
           
 
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

GeometryBag

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

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

GeometryBag

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

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

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

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.

projectEx

public void projectEx(ISpatialReference newReferenceSystem,
                      int direction,
                      IGeoTransformation geoTransformation,
                      boolean bAngularDensify,
                      double maxSegmentLength,
                      double maxDeviation)
               throws IOException,
                      AutomationException
Projects a geometry, optionally applies a GeoTransformation, and optionally densifies the geometry.

Remarks

By default, ProjectEx will not densify geometries as they are 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. Set the bAngularDensify parameter if you want to densify the geometries while they are projected.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
projectEx in interface IGeometry2
Parameters:
newReferenceSystem - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
geoTransformation - A reference to a com.esri.arcgis.geometry.IGeoTransformation (in)
bAngularDensify - The bAngularDensify (in)
maxSegmentLength - The maxSegmentLength (in)
maxDeviation - The maxDeviation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryWKSEnvelope

public void queryWKSEnvelope(_WKSEnvelope[] e)
                      throws IOException,
                             AutomationException
Defines the specified wksenvelope to be the current extent of this geometry in the x-y plane.

Description

The QueryWKSEnvelope method returns a WKSEnvelope structure corresponding to the envelope of the geometry. Use that method to quickly get the XMin, XMax, YMin and YMax values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryWKSEnvelope in interface IGeometry3
Parameters:
e - A Structure: com.esri.arcgis.system._WKSEnvelope (A com.esri.arcgis.system._WKSEnvelope COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isChanged

public boolean isChanged()
                  throws IOException,
                         AutomationException
Indicates if a geometry has been changed (edited, projected, etc).

Description

The Changed method returns whether or not the geometry has been modified. If the geometry always stays in memory that method only returns 'false' immediately after its creation. However if the shape came from disk the Changed method will return 'false' until de geometry is modified in memory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setChanged

public void setChanged(boolean isChanged)
                throws IOException,
                       AutomationException
Indicates if a geometry has been changed (edited, projected, etc).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

project5

public void project5(ISpatialReference newSpatialReference,
                     int projectionHint)
              throws IOException,
                     AutomationException
Same as Project, but with additional parameter projectionHint.

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 projectionHint parameter contains information about whether a geometry will cross the coordinate system horizons. If it doesn't, parts of the code that check this and intersect the geometry with the horizons can be omitted. This can dramatically improve performance. Use ISpatialReference3::ProjectionHint to initialize this parameter.

Product Availability

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

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

projectEx5

public void projectEx5(ISpatialReference newReferenceSystem,
                       int direction,
                       ITransformation transformation,
                       boolean bAngularDensify,
                       double maxSegmentLength,
                       double maxDeviation,
                       int projectionHint)
                throws IOException,
                       AutomationException
Same as ProjectEx, but with additional parameter projectionHint.

Description

The projectionHint parameter contains information about whether a geometry will cross the coordinate system horizons. If it doesn't, parts of the code that check this and intersect the geometry with the horizons can be omitted. This can dramatically improve performance. Use ISpatialReference3::ProjectionHint to initialize this parameter.

Remarks

By default, ProjectEx will not densify geometries as they are 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. Set the bAngularDensify parameter if you want to densify the geometries while they are projected.

Product Availability

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

Specified by:
projectEx5 in interface IGeometry5
Parameters:
newReferenceSystem - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
bAngularDensify - The bAngularDensify (in)
maxSegmentLength - The maxSegmentLength (in)
maxDeviation - The maxDeviation (in)
projectionHint - The projectionHint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getCentroidEx

public IPoint getCentroidEx()
                     throws IOException,
                            AutomationException
The center of gravity (centroid).

Product Availability

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

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

isLosslessExport

public boolean isLosslessExport()
                         throws IOException,
                                AutomationException
Indicates if this geometry bag exported itself to a shapefile buffer with no loss of information. Currently always returns false.

Remarks

currently not implemented; always returns FALSE.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

esri_equals

public boolean esri_equals(IGeometry other)
                    throws IOException,
                           AutomationException
Indicates if the two geometries are of the same type and define the same set of points in the plane.

Product Availability

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

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

touches

public boolean touches(IGeometry other)
                throws IOException,
                       AutomationException
Indicates if the boundaries of the geometries intersect.

Description

Two geometries are said to touch when the intersection of the geometries is non-empty, but the intersection of their interiors is empty. Touches is a Clementini operator. For example, a point touches a polyline only if the point is coincident with one of the polyline end points.

Touches examples. Only "true" relationships are showed in this picture.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Touch does not apply for point/point comparison.

If either one of the two geometries is empty, the geometries are not touched.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

contains

public boolean contains(IGeometry other)
                 throws IOException,
                        AutomationException
Indicates if this geometry contains the other geometry.

Description

The base geometry contains the comparison geometry (other) if the comparison geometry is a subset of the base geometry and the intersection of their interiors is not empty. Therefore a polygon does not contain any part of its 1D boundary. Contains is the opposite operator of Within.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

If geometry1 Contains geometry2, then geometry2 is Within geometry1.

An empty geometry does not contain another geometry. On the other hand, an empty geometry is contained in another geometry, unless the other geometry is empty.

Contains examples. Only "true" relationships are showed in this picture.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

within

public boolean within(IGeometry other)
               throws IOException,
                      AutomationException
Indicates if this geometry is contained (is within) another geometry.

Description

The base geometry is within the comparison geometry if the base geometry is the intersection of the geometries and the intersection of their interiors is not empty. Within is a Clementini operator. Within is the opposite operator of contains.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

If geometry1 is Within geometry2, then geometry2 Contains geometry1.

An empty geometry is within another geometry, unless the other geometry is empty.

Within examples. Only "true" relationships are showed in this picture.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

disjoint

public boolean disjoint(IGeometry other)
                 throws IOException,
                        AutomationException
Indicates if the two geometries share no points in common. Negate this result to compute the Intersect relation.

Description

Two geometries are disjoint if their intersection is empty. Two geometries intersect if disjoint is "false". Disjoint is a Clementini operator.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Two geometries are disjoint if either one is empty.

Disjoint example. Only "true" relationships are showed in this picture.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

crosses

public boolean crosses(IGeometry other)
                throws IOException,
                       AutomationException
Indicates if the two geometries intersect in a geometry of lesser dimension.

Description

Two polylines cross if they share only points in common, at least one of which is not an endpoint. A polyline and an polygon cross if they share a polyline or a point (for vertical line) in common on the interior of the polygon which is not equivalent to the entire polyline. Cross is a Clementini operator.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Cross only applies to polyline/polyline, polyline/polygon, or polygon/polyline relations.

If either one of the geometries is empty, the geometries do not cross.

Crosses examples. Only "true" relationships are showed in this picture.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

overlaps

public boolean overlaps(IGeometry other)
                 throws IOException,
                        AutomationException
Indicates if the intersection of the two geometries has the same dimension as one of the input geometries.

Description

Two geometries overlap if the region of their intersection is of the same dimension as the geometries involved and is not equivalent to either of the geometries. Overlaps is a Clementini operator.

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Overlaps only applies to polyline/polyline, polygon/polygon and multipoint/multipoint relations.

Two geometries do not overlap if either one is empty.

Overlaps examples. Only "true" relationships are showed in this picture.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

relation

public boolean relation(IGeometry other,
                        String relationDescription)
                 throws IOException,
                        AutomationException
Indicates if the defined relationship exists.

Description

Relation allows a general relation defined using the Shape Comparison Language to be determined between two input geometries. The Shape Comparison Language is based on the Calculus-Based Method (CBM), as described and defined by Clementini and Felice, but has some extensions specific to working with vertex-based geometries and is fully described in the Technical Documents section of the ArcObjects Developer Help. Please refer to the Shape Comparison Language documentation for proper syntax and available functionality.

Note that at the current release, Relation only operates with straight lines.

Remarks

Here is a VBA example of using the "RELATE" function to detect overlapping polylines. It assumes two polyline features are selected. G1 and G2 are placeholders for, in this example, the VBA variables r1 and r2.

Option Explicit

Public Sub overlapstest()
Dim ef As IEnumFeature
Dim d As IMxDocument
Set d = ThisDocument
Set ef = d.FocusMap.FeatureSelection
Dim r1 As IRelationalOperator, r2 As IRelationalOperator
Set r1 = ef.Next.Shape
Set r2 = ef.Next.Shape

Debug.Print "relation:", r1.Relation(r2, "RELATE(G1, G2, ""1********"")")

End Sub

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
relation in interface IRelationalOperator
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
relationDescription - The relationDescription (in)
Returns:
The relationResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

containsEx

public boolean containsEx(IGeometry pOther,
                          int relation)
                   throws IOException,
                          AutomationException
Indicates if this geometry contains the other geometry, optionally using Celementini's definition.

Product Availability

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

Specified by:
containsEx in interface IRelationalOperator2
Parameters:
pOther - A reference to a com.esri.arcgis.geometry.IGeometry (in)
relation - A com.esri.arcgis.geometry.esriSpatialRelationExEnum constant (in)
Returns:
The pbContains
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

withinEx

public boolean withinEx(IGeometry pOther,
                        int relation)
                 throws IOException,
                        AutomationException
Indicates if this geometry contains the other geometry, optionally using Celementini's definition.

Product Availability

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

Specified by:
withinEx in interface IRelationalOperator2
Parameters:
pOther - A reference to a com.esri.arcgis.geometry.IGeometry (in)
relation - A com.esri.arcgis.geometry.esriSpatialRelationExEnum constant (in)
Returns:
The pbWithin
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isNear

public boolean isNear(IGeometry pOther,
                      double distance)
               throws IOException,
                      AutomationException
Indicates if this geometry is within distance from the other geometry.

Product Availability

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

Specified by:
isNear in interface IRelationalOperator2
Parameters:
pOther - A reference to a com.esri.arcgis.geometry.IGeometry (in)
distance - The distance (in)
Returns:
The pbNear
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isSimple

public boolean isSimple()
                 throws IOException,
                        AutomationException
Indicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.

Description

Returns TRUE if the geometry is topologically Simple (refer to the discussion for the Simplify method). If the geometry is not Simple, it may be necessary to call Simplify to enforce topological consistency. Editing a geometry can change the IsSimple state of the geometry.

Remarks

ITopologicalOperator methods 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 geometries types.

The xy cluster tolerance value of the geometry's associated spatial reference is used by this method. If the goal of this method is to determine if a geometry can be persisted in an sde (or other integer-based) layer without alteration, you may wish to use the minimum xy cluster tolerance value (ISpatialReferenceTolerance::SetMinimumXYTolerance) before applying this method (don't forget to set it back).

This method does not support GeometryBags.

ITopologicalOperator IsSimple SimplePolygon Example

ITopologicalOperator IsSimple SimplePolyline Example

ITopologicalOperator IsSimple SimplePoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isKnownSimple

public boolean isKnownSimple()
                      throws IOException,
                             AutomationException
Indicates whether this geometry is known (or assumed) to be topologically correct.

Description

Returns TRUE when the geometry is aware that it is Simple. IsKnownSimple may return FALSE even if the geometry is simple as long as the geometry is not aware of its IsSimple state. Calling either IsSimple or Simplify makes the IsSimple state known to the geometry. Topologically altering the geometry makes the IsKnownSimple state FALSE until the IsSimple state is again checked.

Remarks

Here is the status of the IsKnownSimple flag in some common situations:


IsKnownSimple = 'False'
- A non-empty newly created geometry. For example, creating a polygon using IPointCollection sets the flag IsKnownSimple = 'false' on that geometry.
- Geometry after projection (IGeometry::Project )
- Geometry after generalization (IPolycurve::Generalize ) or smoothing(IPolycurve::Smooth )
- …

IsKnownSimple = 'True'
- A geometry coming directly from a feature class
- An empty geometry
- Output geometry of any method on ITopologicalOperator
- …

This method does not support GeometryBags.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

simplify

public void simplify()
              throws IOException,
                     AutomationException
Makes this geometry topologically correct.

Description

Simplify permanently alters the input geometry, making its definition "topologically legal" with respect to its geometry type:


The XY tolerance property of the geometry's associated spatial reference is used during the simplify operation for polylines and polygons.

Remarks

This method first looks at the ITopologicalOperator::IsKnownSimple flag before starting processing. If the flag is 'true' then operation is interrupted and the geometry is considered simple. If the flag is 'false' then the geometry consistency is checked and the geometry is updated as needed.

ITopologicalOperator methods 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 geometries types.

Simplify Polygon Example

Simplify Polyline Example

Simplify Point Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

buffer

public IGeometry buffer(double distance)
                 throws IOException,
                        AutomationException
Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.

Remarks


The buffer distance is in the same units as the source shape that is being buffered.

A negative distance can be specified to produce a buffer inside the original polygon. This cannot be used with polyline. ITopologicalOperator methods must be applied on top-level geometries only. Top-Level geometries are point, multipoint, polyline and polygon. To use this method with segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped with a top-level type.

Buffer Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

convexHull

public IGeometry convexHull()
                     throws IOException,
                            AutomationException
Constructs the convex hull of this geometry.

Description

The ConvexHull of a geometry is the minimal bounding polygon such that all outer angles are convex. The ConvexHull of a point is the point itself.

Remarks

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

ConvexHull method does not deal with Z attribute now.

ConvexHull Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

intersect

public IGeometry intersect(IGeometry other,
                           int resultDimension)
                    throws IOException,
                           AutomationException
Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.

Description

The Intersection of two Geometries of the same Dimension is a Geometry containing only the regions of overlap between the original geometries.

Remarks

Intersection is basically an AND between input geometries.

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

Since ArcGIS 9.2, Intersect has a larger cost - it takes longer to run the method. Therefore, it is a better approach to test if the two geometries are disjoint before calling Intersect.

Intersection Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
intersect in interface ITopologicalOperator
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
resultDimension - A com.esri.arcgis.geometry.esriGeometryDimension constant (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IConstructMultipoint.constructIntersectionEx(com.esri.arcgis.geometry.ISegment, int, com.esri.arcgis.geometry.ISegment, int, double[], double[], int[]), IConstructMultipoint.constructIntersection(com.esri.arcgis.geometry.ISegment, int, com.esri.arcgis.geometry.ISegment, int, Object[], Object[], Object[]), ITopologicalOperator.intersect(com.esri.arcgis.geometry.IGeometry, int)

union

public IGeometry union(IGeometry other)
                throws IOException,
                       AutomationException
Constructs the geometry that is the set-theoretic union of the input geometries.

Description

The Union of two Geometries of the same Dimension is a single Geometry corresponding to the combination of both Geometries such that anything within either of the original geometries is also part of the unioned geometry, but anything common to both geometries only exists once in the unioned geometry.

Remarks

The Union is basically an OR between the input geometries.

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

Union Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

constructUnion

public void constructUnion(IEnumGeometry geometries)
                    throws IOException,
                           AutomationException
Defines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.

Description

ConstructUnion simultaneously Unions an Enumeration of geometries of the same Dimension into a single geometry. ConstructUnion is more efficient for unioning a large collection of geometries simultaneously rather than cycling through each geometry individually.

Remarks

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

Temproray files might be created. If environment variable "ARCTMPDIR" exists, then the files are written to the path, otherwise written to current directory or system temp directory.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

difference

public IGeometry difference(IGeometry other)
                     throws IOException,
                            AutomationException
Constructs the geometry containing points from this geometry but not the other geometry.

Description

Difference create a Geometry that is composed only of the region unique to the base geometry but not part of the input geometry.

Remarks

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

ITopologicalOperator Differenece Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

symmetricDifference

public IGeometry symmetricDifference(IGeometry other)
                              throws IOException,
                                     AutomationException
Constructs the geometry that contains points from either but not both input geometries.

Description

The SymmetricDifference between two Geometries of the same Dimension is the Union of those Geometries minus the Intersection of those Geometries. Thus, the SymmetricDifference is composed only of regions unique to only one of the geometries.

This method does not support GeometryBags.

Remarks

SymmetricDifference is basically an XOR between the input geometries.

SymmetricDifference of G1 and G2 can also be described as the Union(Difference(G1, G2), Difference(G2, G1)).

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

Symmetric Difference Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

clip

public void clip(IEnvelope clipperEnvelope)
          throws IOException,
                 AutomationException
Constructs the intersection of this geometry and the specified envelope.

Description

The Clip method clips the geometry of the feature that is receiving the method call. The Clip method does not return an envelope. The geometry that is clipped will depend on what is Contained by the input clipperEnvelope.

Remarks

Use QueryClipped or QueryClippedDense methods to send the results to a different polygon.

ITopologicalOperator methods 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 geometries types.

ITopologicalOperator Clip Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
clip in interface ITopologicalOperator
Parameters:
clipperEnvelope - 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.

queryClipped

public void queryClipped(IEnvelope clipperEnvelope,
                         IGeometry clippedGeometry)
                  throws IOException,
                         AutomationException
Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope.

Description

QueryClipped returns the portion of the input Geometry that is Contained by the input Envelope. The returned geometry is the same type as the original geometry.

Remarks

ITopologicalOperator methods 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 geometries types.

The other geometry must be an high-level geometry. High-Level geometries are point, multipoint, polyline and polygon. To use it with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), path or ring they must be wrapped into high-level geometries type. 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.

This method does not support GeometryBags.

QueryClipped Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryClippedDense

public void queryClippedDense(IEnvelope clipperEnvelope,
                              double denseDistance,
                              IGeometry clippedGeometry)
                       throws IOException,
                              AutomationException
Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.

Remarks

ITopologicalOperator methods 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 geometries types.

The other geometry must be an high-level geometry. High-Level geometries are point, multipoint, polyline and polygon. To use it with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), path or ring they must be wrapped into high-level geometries type. 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.

This method does not support GeometryBags.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

cut

public void cut(IPolyline cutter,
                IGeometry[] leftGeom,
                IGeometry[] rightGeom)
         throws IOException,
                AutomationException
Splits this geometry into a part left of the cutting polyline, and a part right of it.

Remarks

ITopologicalOperator methods 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 geometries types.

When a polyline/polygon is cut, it is split where it intersects the cutter polyline. Each piece is classified as ‘left of’ or ‘right of’ the cutter. This classification is based on the orientation of the cutter line. Parts of the target polyline that do not intersect the cutting polyline are returned as part of the ‘right of’ result for that input polyline. If a geometry is not cut, the left geometry will be empty.

When using a multi-part polyline to cut a single ring of a polyline, the orientation of the polyline paths is important. The cut piece of the ring must be on the same side of each cutting path as defined by the orientation of each path.

This method does not support GeometryBags.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
cut in interface ITopologicalOperator
Parameters:
cutter - A reference to a com.esri.arcgis.geometry.IPolyline (in)
leftGeom - A reference to a com.esri.arcgis.geometry.IGeometry (out: use single element array)
rightGeom - A reference to a com.esri.arcgis.geometry.IGeometry (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBoundary

public IGeometry getBoundary()
                      throws IOException,
                             AutomationException
The boundary of this geometry. A polygon's boundary is a polyline. A polyline's boundary is a multipoint. A point or multipoint's boundary is an empty point or multipoint.

Description

The Boundary of a Geometry is the part one the exterior of the Geometry. The Boundary is one Dimension lower than the Dimension of the original Geometry. The Boundary of a Polygon are the Polylines that form the Rings of the Polygon. The Boundary of a Polyline is a Multipoint corresponding to the endpoints of each Path in the Polyline. The Boundary of a Multipoint is an empty set.

Remarks

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.



Boundary Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

clipDense

public void clipDense(IEnvelope clipperEnvelope,
                      double denseDistance)
               throws IOException,
                      AutomationException
Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.

Remarks

ITopologicalOperator methods 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 geometries types.

This method does not support GeometryBags.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGeometryCount

public int getGeometryCount()
                     throws IOException,
                            AutomationException
The number of geometries in this collection.

Description

Returns the number of Geometries in the GeometryCollection. The last Geometry in the GeometryCollection has an index equal to GeometryCount - 1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGeometry

public IGeometry getGeometry(int index)
                      throws IOException,
                             AutomationException
A reference to the ith geometry.

Product Availability

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

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

addGeometry

public void addGeometry(IGeometry inGeometry,
                        Object before,
                        Object after)
                 throws IOException,
                        AutomationException
Adds a reference to the input geometry either at the end, or before, or after the specified index.

Remarks

When applying the AddGeometry method give either the before or after index and not both. Adding a Geometry to the collection as the first one is done by setting the before index as 0.

The spatial reference of the GeometryCollection is transferred (objects projected if necessary) to any objects added to it. However the spatial reference of the added geometry is not transferred to the GeometryCollection. Always make sure to set the spatial reference on the object GeometryCollection prior to add other geometries to it to avoid creating invalid geometry. For example, adding geometry objects to a GeometryBag that doesn't have a well-defined spatial reference will set an undefined spatial reference to all the objects added to the bag. Using this GeometryBag may cause unexpected behavior with the ITopologicalOperator::ConstructUnion method.




Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addGeometry in interface IGeometryCollection
Parameters:
inGeometry - A reference to a com.esri.arcgis.geometry.IGeometry (in)
before - A Variant (in, optional, pass null if not required)
after - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryGeometries

public void queryGeometries(int index,
                            int count,
                            IGeometry[] geometries)
                     throws IOException,
                            AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[][]).

Populates the array with references to a sub-sequence of geometries. This method is intended for internal use only.

Remarks

Note: The GeometryType returned by the QueryGeometries method depends on which object type points the IGeometryCollection pointer.

IGeometryCollection Object GeometryType Returned Object GeometryType
Polygon
Rings
Polyline
Paths
Multipoint
Points
Multipatch
TriangleFans or TriangleStrips or Rings
TriangleFan
Points
TriangleStrip
Points
Geometry Bag
Any type of IGeometry

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryGeometries in interface IGeometryCollection
Parameters:
index - The index (in)
count - The count (in)
geometries - A reference to a com.esri.arcgis.geometry.IGeometry (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

addGeometries

public void addGeometries(int count,
                          IGeometry newGeometries)
                   throws IOException,
                          AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]).

Adds references to the specified geometries. This method is intended for internal use only.

Remarks


The geometries are added last in the list. Use an array of geometries (IGeometry) and the exact number (count ) of elements in the array. Exceeding the boundary of the array will cause an application error. If you don't want to place the geometries last in the collection then use the InsertGeometries method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addGeometryCollection

public void addGeometryCollection(IGeometryCollection newGeometries)
                           throws IOException,
                                  AutomationException
Adds references to geometries in the input collection.

Description

Adds references of all of the parts of the input GeometryCollection to the end of the current GeometryCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertGeometries

public void insertGeometries(int index,
                             int count,
                             IGeometry newGeometries)
                      throws IOException,
                             AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertGeometries(com.esri.arcgis.geometry.IGeometryCollection, int, com.esri.arcgis.geometry.IGeometry[]).

Inserts at the specified index references to some number of geometries in the input array. This method is intended for internal use only.

Remarks

The geometries are inserted before the ith (index) element in the list. Use an array of geometries and give the exact number (count ) of elements in the array. A too large value for the count parameter causes exceeding the boundary of the array and will cause an application error. To place the geometries last in the collection then use the addGeometries method.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertGeometries in interface IGeometryCollection
Parameters:
index - The index (in)
count - The count (in)
newGeometries - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertGeometryCollection

public void insertGeometryCollection(int index,
                                     IGeometryCollection newGeometries)
                              throws IOException,
                                     AutomationException
Inserts at the specified index references to all if the geometries in the input collection.

Remarks

InsertGeometryCollection merges one GeometryCollection within another at a specified index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertGeometryCollection in interface IGeometryCollection
Parameters:
index - The index (in)
newGeometries - A reference to a com.esri.arcgis.geometry.IGeometryCollection (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setGeometries

public void setGeometries(int count,
                          IGeometry newGeometries)
                   throws IOException,
                          AutomationException
Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setGeometries(com.esri.arcgis.geometry.IGeometryCollection, com.esri.arcgis.geometry.IGeometry[]).

Replaces all geometries in the collection with the specified number of references to those in the input array. This method is intended for internal use only.

Remarks

SetGeometries is used to reset the references of the geometries within the GeometryCollection . The result is that all references are changed to point only at the geometries contained within the specified array. Note that the GeometryCount changes accordingly also.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setGeometryCollection

public void setGeometryCollection(IGeometryCollection newParts)
                           throws IOException,
                                  AutomationException
Replaces all geometries in the collection with references to geometries from the input collection.

Remarks

SetGeometryCollection copies the geometry references from one GeometryCollection to another.

VB Example: Set GeometryCollection m_pGeoColl_A as m_pGeoColl_B


  m_pGeoColl_A.SetGeometryCollection m_pGeoColl_B

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeGeometries

public void removeGeometries(int index,
                             int count)
                      throws IOException,
                             AutomationException
Removes references to some geometries from this collection.

Remarks

RemoveGeometries deletes count number of geometries from the index location.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
removeGeometries in interface IGeometryCollection
Parameters:
index - The index (in)
count - The count (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geometriesChanged

public void geometriesChanged()
                       throws IOException,
                              AutomationException
Tells this geometry collection that some of its geometries have been altered. Use this method on polylines, polygons and multipatches after directly editing one of its parts.

Description

GeometriesChanged flags that the geometries have been changed. It also marks a top level geometry as being non-simple. Use it when manipulating the parts of a geometry directly (for example, rotating a ring). The top level geometry won't know that its cached envelope, length, centroid, etc. are invalid until this method is used.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

next

public IGeometry next()
               throws IOException,
                      AutomationException
Returns the next geometry in the enumeration.

Description

Returns the Next Geometry part from the current enumeration location.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

reset

public void reset()
           throws IOException,
                  AutomationException
Starts the enumeration at the beginning.

Description

Resets the current enumeration location to the null pointer at the beginning of the enumeration such that the Next Geometry is the first Geometry part in the enumeration.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCount

public int getCount()
             throws IOException,
                    AutomationException
The number of geometries in the enumeration.

Description

Returns the number of distinct geometry parts in the enumeration. This count is the same as the count returned by GeometryCount in a GeometryCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

constructDivideEqual

public void constructDivideEqual(IPolyline divideSource,
                                 int numDivisions,
                                 int divideHow)
                          throws IOException,
                                 AutomationException
Locates additional points equally spaced along the input polyline, and create either new segments, parts or polylines depending on the value of divideHow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructDivideEqual in interface IConstructGeometryCollection
Parameters:
divideSource - A reference to a com.esri.arcgis.geometry.IPolyline (in)
numDivisions - The numDivisions (in)
divideHow - A com.esri.arcgis.geometry.esriConstructDivideEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructDivideLength

public void constructDivideLength(IPolyline divideSource,
                                  double length,
                                  boolean asRatio,
                                  int divideHow)
                           throws IOException,
                                  AutomationException
Locates additional points along the input polyline, spaced at a specified interval, and create either new segments, parts, or polylines depending on the value of divideHow.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructDivideLength in interface IConstructGeometryCollection
Parameters:
divideSource - A reference to a com.esri.arcgis.geometry.IPolyline (in)
length - The length (in)
asRatio - The asRatio (in)
divideHow - A com.esri.arcgis.geometry.esriConstructDivideEnum constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

esri_clone

public IClone esri_clone()
                  throws IOException,
                         AutomationException
Clones the receiver and assigns the result to *clone.

Product Availability

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

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

assign

public void assign(IClone src)
            throws IOException,
                   AutomationException
Assigns the properties of src to the receiver.

Description

Use Assign method to assign the properties of source object to receiver object. Both objects need to have the same CLSIDs. Both source and receiver objects need to be instantiated.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isEqual

public boolean isEqual(IClone other)
                throws IOException,
                       AutomationException
Indicates if the receiver and other have the same properties.

Description

IsEqual returns True if the receiver and the source have the same properties. Note, this does not imply that the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isEqual in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The equal
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isIdentical

public boolean isIdentical(IClone other)
                    throws IOException,
                           AutomationException
Indicates if the receiver and other are the same object.

Description

IsIdentical returns true if the receiver and the source reference the same object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
isIdentical in interface IClone
Parameters:
other - A reference to a com.esri.arcgis.system.IClone (in)
Returns:
The identical
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

move

public void move(double dx,
                 double dy)
          throws IOException,
                 AutomationException
Moves dx units horizontally and dy units vertically.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D Move Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
move in interface ITransform2D
Parameters:
dx - The dx (in)
dy - The dy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

moveVector

public void moveVector(ILine v)
                throws IOException,
                       AutomationException
Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.

Description

Moves the Geometry dX units along the X-Axis and dY units along the Y-Axis, where dX and dY are calculated from the input vector Line. Only the Length and Angle of the vector affect the transformation. The location of the vector does not change the transformation. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

Remarks

Transform2D MoveVector Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

scale

public void scale(IPoint origin,
                  double sx,
                  double sy)
           throws IOException,
                  AutomationException
Scales about the specified origin using seperate horizonal and vertical scales. The origin point can be in a different spatial reference than the geometry being scaled.

Description

Stretches the Geometry a factor of sX along the X-Axis and a factor of sY along the Y-Axis (where sX is the ratio of Old Width to New Width, and sY is the ratio of Old Height to New Height). The Origin point is the reference Point from which the transformation is performed (Regardless of the location of the Origin point, the Geometry resulting from the transformation is the same, except for a positional offset). The Origin is the only point in the transformation guaranted to remain in the same location after the transformation is complete.

Remarks

Note: Caution must be taken when scaling a CircularArc or a geometry containing CircularArc segments. Unless Abs(ScaleX) = Abs(ScaleY), the resulting CircularArcs will not retain the characteristics of the original geometry (since they remain CircularArcs).

Scale Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
scale in interface ITransform2D
Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
sx - The sx (in)
sy - The sy (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

rotate

public void rotate(IPoint origin,
                   double rotationAngle)
            throws IOException,
                   AutomationException
Rotates about the specified origin point. The angle is in radians. The origin can be in a different spatial reference than the geometry being rotated.

Description

Rotate performs an angular transform (rotation) on the Geometry. The Origin is the only point in the transformation guaranteed to remain in the same location after the transformation is performed. Regardless of the Origin, the transformed Geometry is the same, except for a positional offset. The RotationAngle is measured in radians.

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
rotate in interface ITransform2D
Parameters:
origin - A reference to a com.esri.arcgis.geometry.IPoint (in)
rotationAngle - The rotationAngle (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

transform

public void transform(int direction,
                      ITransformation transformation)
               throws IOException,
                      AutomationException
Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
transform in interface ITransform2D
Parameters:
direction - A com.esri.arcgis.geometry.esriTransformDirection constant (in)
transformation - A reference to a com.esri.arcgis.geometry.ITransformation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAllowIndexing

public void setAllowIndexing(boolean allowIndexing)
                      throws IOException,
                             AutomationException
Indicates whether to allow a spatial index to be created for this geometry.

Remarks

The SpatialIndex if enabled is used by the IRelationalOperator's methods.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isAllowIndexing

public boolean isAllowIndexing()
                        throws IOException,
                               AutomationException
Indicates whether to allow a spatial index to be created for this geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

invalidate

public void invalidate()
                throws IOException,
                       AutomationException
Invalidate the spatial index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException