com.esri.arcgis.geometry
Class Polygon

java.lang.Object
  extended by com.esri.arcgis.geometry.Polygon
All Implemented Interfaces:
IArea, IArea3D, IAreaGeodetic, IConstructCurve, IConstructCurve2, ICurve, ICurve3D, IGeometry, IGeometry2, IGeometry3, IGeometry4, IGeometry5, IGeometryCollection, IHitTest, IHitTest3D, IMAware, IMCollection, IMSegmentation, IMSnap, IPointCollection, IPointCollection2, IPointCollection3, IPointCollection4, IPointIDAware, IPolycurve, IPolycurve2, IPolycurve3D, IPolycurve4, IPolycurveGeodetic, IPolygon, IPolygon2, IPolygon3, IPolygon4, IPolygon5, IProximityOperator, IProximityOperator3D, IRelationalOperator, IRelationalOperator2, IRelationalOperator3D, IRelationalOperator3D2, ISegmentCollection, ISpatialIndex, ISpatialIndex2, ITopologicalOperator, ITopologicalOperator2, ITopologicalOperator3, ITopologicalOperator4, ITopologicalOperator6, ITransform2D, ITransform3D, IZ, IZ2, IZAware, IZCollection, com.esri.arcgis.interop.RemoteObjRef, IClone, IPersist, IPersistStream, ISupportErrorInfo, IXMLSerialize, Externalizable, Serializable

public class Polygon
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IPointCollection, IPointCollection4, IGeometry, IGeometry2, IGeometry3, IGeometry4, IGeometry5, ISegmentCollection, IGeometryCollection, ICurve, IPolycurve, IPolycurve2, IPolycurveGeodetic, IArea, IAreaGeodetic, IArea3D, IPolygon, IPolygon2, IPolygon3, IPolygon4, IPolygon5, IMAware, IMCollection, IMSegmentation, IZAware, IZCollection, IZ, IZ2, IPointIDAware, ISpatialIndex2, IRelationalOperator, IProximityOperator, IRelationalOperator2, ITopologicalOperator, ITopologicalOperator2, ITopologicalOperator3, ITopologicalOperator4, ITopologicalOperator6, IHitTest, IHitTest3D, IConstructCurve, IConstructCurve2, ISupportErrorInfo, IPersist, IPersistStream, IClone, ITransform2D, ITransform3D, IXMLSerialize, IMSnap, IPolycurve3D, ICurve3D, IProximityOperator3D, IRelationalOperator3D, IRelationalOperator3D2, Externalizable

A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
Polygon()
          Constructs a Polygon using ArcGIS Engine.
Polygon(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
Polygon thePolygon = (Polygon) 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 addPoint(IPoint inPoint, Object before, Object after)
          Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.
 void addPointCollection(IPointCollection newPoints)
          Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.
 void addPoints(int count, IPoint newPoints)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]).
 void addSegment(ISegment inSegment, Object before, Object after)
          Adds a reference to the input segment at the end, or before or after a specified index.
 void addSegmentCollection(ISegmentCollection segments)
          Adds references to the segments from the specified segment collection.
 void addSegments(int count, ISegment newSegments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addSegments(com.esri.arcgis.geometry.ISegmentCollection, com.esri.arcgis.geometry.ISegment[]).
 void addWKSPointZs(int count, _WKSPointZ pointStructures)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.addWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]).
 void approximateByBeziers(IPolycurve pInCurve, Object pMaxDistance, Object smoothClosedParts)
          Constructs a curve which approximates the input curve by a small number of Bezier segments.
 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 calculateNonSimpleMs()
          Redefines the non-simple Ms to be values obtained from interpolation of surrounding defined Ms, or extrapolation of Ms.
 void calculateNonSimpleZs()
          Calculates the non-simple Z values by extrapolation/interpolation for polylines and interpolation for polygons.
 void checkInvalidate()
          Invalidates the spatial index if the geometry has been changed since the index was last constructed.
 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 clipToDomain()
          Clips the geometry to the domain of the spatial reference.
 void close()
          Closes all rings in this polygon.
 IEnumGeometry constructBuffers(int numBuffers, double[] distances)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.constructBuffers(com.esri.arcgis.geometry.ITopologicalOperator2, double[]).
 void constructExtended(ICurve fromCurve, ICurve toCurve, int extensionFlags, boolean[] extensionsPerformed)
          Constructs an extended version of the 'from' curve that goes to the 'to' curve.
 void constructKoch(IPolycurve p, double r, int recursionLevel)
          Constructs a Koch snowflake fractal using the input polycurve as the generator.
 void constructOffset(IPolycurve inCurve, double offset, Object offsetHow, Object bevelRatio)
          Constructs a curve being the locus of points offset a given distance from another curve.
 void constructUnion(IEnumGeometry geometries)
          Defines this geometry to be the union of the inputs.
 void constructUnionEx(IEnumGeometry pEnum, boolean bNonPlanar)
          Defines this geometry to be the union of the inputs, with the option for non-planary result.
 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.
 IGeometryCollection cut2(IPolyline pCutter)
          Divides a geometry into multiple parts
 void densify(double maxSegmentLength, double maxDeviation)
          Converts this polycurve into a piecewise linear approximation of itself.
 void densify3D(double maxSegmentLength, double maxDeviation)
          Converts this Polycurve into a piecewise linear approximation of itself.
 void densifyByAngle(double maxSegmentLength, double maxAngleDeviation)
          Converts this polycurve into a piecewise linear approximation of itself.
 void densifyGeodetic(int geodeticLineType, ILinearUnit pLU, int densifyMethod, double densifyParameter)
          Constructs different types of geodetic curves.
 void deserialize(IXMLSerializeData data)
          Deserializes an object from XML.
 IGeometry difference(IGeometry other)
          Constructs the geometry containing points from this geometry but not the other geometry.
 IGeometry differenceEx(IGeometry other, boolean bNonPlanar)
          defined for (multi)points and polylines.
 boolean disjoint(IGeometry other)
          Indicates if the two geometries share no points in common.
 boolean disjoint3D(IGeometry pOther)
          Indicates if the two geometries share no points in common.
 void dropMs()
          Sets all the M values to a non-valid number (NaN).
 void dropPointIDs()
          Unsets all PointID values without changing awareness.
 void dropZs()
          Sets all the Z values to a non-valid number (NaN).
 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 extrapolateMs(int extrapolationStyle, int fromPart, int fromPoint, int toPart, int toPoint)
          Extrapolates the Ms at one or both ends of the geometry based on the M interval between the fromIndex and the toIndex.
 IRing findExteriorRing(IRing interiorRing)
          Returns the exterior ring containing the specified interior ring.
 void generalize(double maxAllowableOffset)
          Generalizes this polycurve using the Douglas-Poiker algorithm.
 void generalize3D(double maxAllowableOffset)
          Generalizes this polycurve using the Douglas-Poiker algorithm.
 void geodesicDensify(double maxSegmentLength)
          Densifies and reshapes existing segments so that the output segments follow the shortest ground path connecting input vertices.
 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 geoNormalizeEx(ISpatialReference sR, double denseDistance)
          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.
 double getArea()
          The area.
 double getArea3D()
          The 3D surface area.
 double getAreaGeodetic(int lineType, ILinearUnit pAreaUnit)
          The area.
 IGeometry getBoundary()
          The boundary of this geometry.
 IPoint getCentroid()
          The center of gravity (centroid).
 IPoint getCentroid3D()
          A 3D point whose XY coordinates are set to the center of gravity of the shape’s 2D footprint and Z set to the shape’s ZMax.
 IPoint getCentroidEx()
          The center of gravity (centroid).
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 IGeometryBag getConnectedComponentBag()
          Creates and returns a geometry bag containing polygons that represent connected components of the original.
 void getConnectedComponents(int numComponentsRequested, IPolygon[] components)
          Populates an array with polygons that represent connected components of the original.
 int getDimension()
          The topological dimension of this geometry.
 Object getDistancesAtM(boolean asRatio, double m)
          Returns an array of distances along the polyline at which is located the specified M.
 IEnumCurve getEnumCurve()
          A new curve enumerator for this segment collection.
 IEnumSegment getEnumSegments()
          A new enumerator for this segment collection.
 IEnumVertex getEnumVertices()
          A new enumerator for this point collection.
 IEnvelope getEnvelope()
          Creates a copy of this geometry's envelope and returns it.
 IGeometryBag getExteriorRingBag()
          Creates and returns a geometry bag that contains references to all exterior rings.
 int getExteriorRingCount()
          The number of exterior rings.
 IPoint getFromPoint()
          The 'from' point of the curve.
 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.
 IEnumSegment getIndexedEnumSegments(IGeometry queryGeometry)
          A new indexed segment enumerator for this segment collection.
 IEnumVertex getIndexedEnumVertices(IGeometry queryGeometry)
          An indexed vertex enumerator for this point collection.
 IGeometryBag getInteriorRingBag(IRing exteriorRing)
          Creates and returns a geometry bag that contains references to all rings that are interior to the specified exterior ring.
 int getInteriorRingCount(IRing exteriorRing)
          The number of rings interior to the specified exterior ring.
 IPoint getLabelPoint()
          A point guaranteed to be inside this area.
 IPoint getLabelPoint3D()
          A point guaranteed to be on this 3D surface area.
 double getLength()
          The length of the curve.
 double getLength3D()
          The length of the curve.
 double getLengthGeodetic(int geodeticLineType, ILinearUnit pLU)
          Returns length of this polycurve calculated using various types of geodetic methods.
 double getMMax()
          The maximum M value.
 double getMMin()
          The minimum M value.
 int getMMonotonic()
          A value indicating whether Ms are monotonic, and if so, whether they are ascending or descending.
 Object getMsAtDistance(double distance, boolean asRatio)
          Returns M values at the distance along the geometry.
 IGeometryBag getOutermostComponentBag()
          Creates and returns a geometry bag containing polygons that represent outermost components of the original and all components within (islands within lakes).
 void getOutermostComponents(int numComponentsRequested, int[] numComponentsReturned, IPolygon[] components, boolean[] moreComponentsExist)
          Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes).
 IPoint getPoint(int i)
          A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.
 int getPointCount()
          The number of points in the collection.
 void getPoints(int index, int count, IPoint[] points)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.getPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]).
 IGeometryCollection getPointsAtM(double m, double lateralOffset)
          Returns a multipoint geometry corresponding to the locations along the geometry where the specified M occurs.
 ISegment getSegment(int i)
          A reference to the ith segment.
 int getSegmentCount()
          The number of segments.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 ISpatialReference getSpatialReference()
          The spatial reference associated with this geometry.
 void getSubcurve(double fromDistance, double toDistance, boolean asRatio, ICurve[] outSubcurve)
          Extracts a portion of this curve into a new curve.
 void getSubcurve3D(double fromDistance, double toDistance, boolean bAsRatio, ICurve3D[] ppOutSubCurve)
          Extracts a portion of this curve into a new curve.
 IGeometryCollection getSubcurveBetweenMs(double fromM, double toM)
          Returns a polyline geometry corresponding to the subcurve(s) between the fromM and the toM.
 IPoint getToPoint()
          The 'to' point of the curve.
 double getZMax()
          The maximum Z value.
 double getZMin()
          The minimum Z value.
 int hashCode()
          the hashcode for this object
 void hasNonLinearSegments(boolean[] nonLinearSegments)
          Indicates if this segment collection contains segments other than lines.
 boolean hitTest(IPoint queryPoint, double searchRadius, int geometryPart, IPoint hitPoint, double[] hitDistance, int[] hitPartIndex, int[] hitSegmentIndex, boolean[] bRightSide)
          Locates a part of a geometry closest to a query point.
 boolean hitTest3D(IPoint queryPoint, double searchRadius, int geometryPart, IPoint hitPoint, double[] hitDistance, int[] hitPartIndex, int[] hitSegmentIndex)
          Locates a part of a geometry closest to a query point.
 boolean hitTestCone(IRay pQueryRay, double minAngle, int geometryPart, IPoint pHitPoint, double[] pHitDistance, int[] pHitPartIndex, int[] pHitSegmentIndex)
          Locates a part of a geometry closest to a query ray.
 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 insertMAtDistance(double m, double distance, boolean asRatio, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Sets the M value at the given distance along the geometry; creates a point at that distance if no point exists there.
 void insertPointCollection(int index, IPointCollection newPoints)
          Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.
 void insertPoints(int index, int count, IPoint newPoints)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[]).
 void insertSegmentCollection(int index, ISegmentCollection newSegments)
          Inserts references to the segments in the input collectoin.
 void insertSegmentCollectionEx(int index, int start, int count, ISegmentCollection newSegments)
          Inserts references to some of the segments from the input collection.
 void insertSegments(int index, int count, ISegment newSegments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertSegments(com.esri.arcgis.geometry.ISegmentCollection, int, com.esri.arcgis.geometry.ISegment[]).
 void insertWKSPointZs(int index, int count, _WKSPointZ newPoints)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.insertWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[]).
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void interpolateFromSurface(IFunctionalSurface interpolationSurface)
          Use the specified functional surface to generate Z values for the vertices of this object.
 void interpolateMsBetween(int fromPart, int fromPoint, int toPart, int toPoint)
          Generates Ms by linear interpolation of segment distances for all vertices in the range [start+1, end-1].
 void interpolateZsBetween(int startPart, int startPoint, int endPart, int endPoint)
          Generate Z values by linear interpolation for all vertices in the range [start+1, end-1].
 IGeometry intersect(IGeometry other, int resultDimension)
          Constructs the geometry that is the set-theoretic intersection of the input geometries.
 IGeometry intersectEx(IGeometry other, boolean bNonPlanar, int resultDimension)
          Constructs the set-theoretic intersection of the inputs in the specified result dimension, , with the option for non-planary result.
 IGeometry intersectMultidimension(IGeometry other)
          Constructs the set-theoretic intersection of the inputs.
 IGeometry intersectMultidimensionEx(IGeometry other, boolean bNonPlanar)
          Constructs the set-theoretic intersection of the inputs.
 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).
 boolean isClosed()
          Indicates if 'from' and 'to' points (of each part) are identical.
 boolean isClosed3D()
          Indicates if 'from' and 'to' points (of each part) are identical.
 void isDirty()
          isDirty
 boolean isEmpty()
          Indicates whether this geometry contains any points.
 boolean isEnvelope()
          Returns true if the shape of this polygon is equivalent to the polygon's bounding envelope.
 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 isMAware()
          Indicates whether or not the geometry is aware of and capable of handling Ms.
 boolean isMSimple()
          Indicates if all the Ms are valid numbers.
 boolean isNear(IGeometry pOther, double distance)
          Indicates if this geometry is within distance from the other geometry.
 boolean isNear3D(IGeometry pOther, double distance)
          Indicates if this geometry is within distance from the other geometry; both geometries must have Zs.
 boolean isPointIDAware()
          Indicates whether or not the geometry is aware of and capable of handling PointIDs.
 boolean isPointIDSimple()
          Indicates if all PointID values for this geometry are well-defined.
 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.
 boolean isSimpleEx(int[] reason)
          Determines why a geometry is not simple.
 boolean isZAware()
          Indicates whether or not the geometry is aware of and capable of handling Zs.
 boolean isZSimple()
          Indicates if all the Zs are valid numbers.
 boolean isZVertical()
          Indicates if at least two consecutive vertices of this polyline or polygon have the same x and y values, but distinct z values.
 void load(IStream pstm)
          load
 void move(double dx, double dy)
          Moves dx units horizontally and dy units vertically.
 void move3D(double dx, double dy, double dz)
          Moves the object by dx, dy and dz along the x, y, and z axes respectively.
 void moveVector(ILine v)
          Moves a direction and distance v.
 void moveVector3D(IVector3D v)
          Moves the object by an offset defined by a 3D vector.
 void multiplyMs(double factor)
          Multiplies all the M values by a factor.
 void multiplyZs(double factor)
          Multiplies all the Z values by a factor.
 void offsetMs(double offset)
          Offsets all the M values by an offset value.
 void offsetZs(double offset)
          Offsets all the Z values by an offset value.
 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.
 IGeometry projectToPlane(IPoint planarOrigin, IVector3D planarPositiveX, IVector3D planarNorm)
          Generates a polygon footprint for the object in an arbitrary plane.
 void queryCentroid(IPoint center)
          Copies the centroid of this area to the specified point.
 void queryCentroid3D(IPoint center)
          Copies the centroid of this 3D surface area to the specified point.
 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 queryExteriorRings(IRing exteriorRings)
          Populates an array with references to all exterior rings.
 void queryExteriorRingsEx(int numExteriorRingsRequested, IRing[] exteriorRings)
          Returns an array of references to exterior rings, up to a maximum of the number requested.
 void queryFromPoint(IPoint from)
          Copies this curve's 'from' point to the input point.
 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 queryInteriorRings(IRing exteriorRing, IRing interiorRings)
          Populates an array with references to rings that are interior to the specified exterior ring.
 void queryInteriorRingsEx(IRing exteriorRing, int numInteriorRingsRequested, IRing[] interiorRings)
          Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.
 void queryLabelPoint(IPoint labelPoint)
          Copies to the input point a point guaranteed to be inside this area.
 void queryLabelPoint3D(IPoint labelPoint)
          Copies to the input point a point guaranteed to be on this 3D surface area.
 void queryNearestPoint(IPoint p, int extension, IPoint nearest)
          Copies into 'nearest' a point on this geometry nearest to the input point.
 void queryNearestPoint3D(IPoint pInP, int extension, IPoint pNearest)
          Copies into 'nearest' a point on this geometry nearest to the input point.
 void queryNormal(int extension, double distanceAlongCurve, boolean asRatio, double length, ILine normal)
          Constructs a line normal to a curve from a point at a specified distance along the curve.
 void queryPoint(int extension, double distanceAlongCurve, boolean asRatio, IPoint outPoint)
          Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
 void queryPoint(int index, IPoint point)
          Queries for a point in the PointCollection at given index.
 void queryPoint3D(int extension, double distanceAlongCurve, boolean bAsRatio, IPoint pOutPoint)
          Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
 void queryPointAndDistance(int extension, IPoint inPoint, boolean asRatio, IPoint outPoint, double[] distanceAlongCurve, double[] distanceFromCurve, boolean[] bRightSide)
          Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
 void queryPointAndDistance3D(int extension, IPoint pInPoint, boolean bAsRatio, IPoint pOutPoint, double[] pDistanceAlongCurve, double[] pDistanceFromCurve)
          Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
 void queryPoints(int index, int count, IPoint points)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]).
 void querySegments(int index, int count, ISegment[] segments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.querySegments(com.esri.arcgis.geometry.ISegmentCollection, int, com.esri.arcgis.geometry.ISegment[][]).
 void queryTangent(int extension, double distanceAlongCurve, boolean asRatio, double length, ILine tangent)
          Constructs a line tangent to a curve from a point at a specified distance along the curve.
 void queryToPoint(IPoint to)
          Copies the curve's 'to' point into the input point.
 void queryWKSEnvelope(_WKSEnvelope[] e)
          Defines the specified wksenvelope to be the current extent of this geometry in the x-y plane.
 void queryWKSPointZs(int index, int count, _WKSPointZ[] pointStructures)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.queryWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[][]).
 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 removePoints(int index, int count)
          Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.
 void removeSegments(int index, int count, boolean closeGap)
          Removes references to some segments.
 void replacePointCollection(int index, int goingAway, IPointCollection newPoints)
          Replaces vertices/points within a PointCollection.
 void replacePoints(int index, int comingIn, int goingAway, IPoint newPoints)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[]).
 void replaceSegmentCollection(int index, int goingAway, ISegmentCollection newSegments)
          Remove and inserts some segments.
 void replaceSegments(int index, int comingIn, int goingAway, ISegment newSegments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.replaceSegments(com.esri.arcgis.geometry.ISegmentCollection, int, int, com.esri.arcgis.geometry.ISegment[]).
 double returnDistance(IGeometry other)
          Returns the minimum distance between two geometries.
 double returnDistance3D(IGeometry pOther)
          Returns the minimal distance between two geometries.
 IPoint returnNearestPoint(IPoint p, int extension)
          Creates and returns a point on this geometry nearest to the input point.
 IPoint returnNearestPoint3D(IPoint pInP, int extension)
          Creates and returns a point on this geometry nearest to the input point.
 void reverseMsOrder()
          Reverses the order of the Ms along the geometry.
 void reverseOrientation()
          Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
 void rotate(IPoint origin, double rotationAngle)
          Rotates about the specified origin point.
 void rotateVector3D(IVector3D axis, double rotationAngle)
          Rotates the object about axis defined by the specified vector through an angle measured in radians.
 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 scale3D(IPoint origin, double sx, double sy, double sz)
          Scales the object about the specified origin point.
 void segmentsChanged()
          Informs the segment collection that any cached values that it may be maintaining (envelope, length, etc.) are invalid.
 void serialize(IXMLSerializeData data)
          Serializes an object to XML.
 void setAllowIndexing(boolean allowIndexing)
          Indicates whether to allow a spatial index to be created for this geometry.
 void setAndInterpolateMsBetween(double fromM, double toM)
          Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.
 void setChanged(boolean isChanged)
          Indicates if a geometry has been changed (edited, projected, etc).
 void setCircle(IPoint cp, double circleRadius)
          Defines this path, ring, polyline or polygon to contain a single circular arc segment that is closed.
 void setConstantZ(double zLevel)
          Sets Z coordinates at all vertices to zLevel.
 void setEmpty()
          Removes all points from this geometry.
 void setFromPoint(IPoint from)
          The 'from' point of the curve.
 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 setIsKnownSimple(boolean rhs1)
          Indicates whether this geometry is known (or assumed) to be topologically correct.
 void setMAware(boolean mAware)
          Indicates whether or not the geometry is aware of and capable of handling Ms.
 void setMsAsDistance(boolean asRatio)
          Sets the M values to the cumulative length from the origin of the geometry.
 void setNonSimpleZs(double zLevel)
          Replaces undefined (nonsimple) Z values with the specified constant value.
 void setPointCollection(IPointCollection newPoints)
          Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.
 void setPointIDAware(boolean idAware)
          Indicates whether or not the geometry is aware of and capable of handling PointIDs.
 void setPoints(int count, IPoint newPoints)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]).
 void setRectangle(IEnvelope inEnvelope)
          Defines this path, ring, polyline or polygon to have four line segments in the same positions as the sides of the input envelope.
 void setSegmentCollection(ISegmentCollection newSegments)
          Replaces all segments with references to segments from the input collection.
 void setSegments(int count, ISegment newSegments)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setSegments(com.esri.arcgis.geometry.ISegmentCollection, com.esri.arcgis.geometry.ISegment[]).
 void setSpatialReferenceByRef(ISpatialReference spatialRef)
          The spatial reference associated with this geometry.
 void setToPoint(IPoint to)
          The 'to' point of the curve.
 void setWKSPointZs(int count, _WKSPointZ pointStructures)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.setWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]).
 void setZAware(boolean zAware)
          Indicates whether or not the geometry is aware of and capable of handling Zs.
 void simplify()
          Makes this geometry topologically correct.
 void simplifyAsFeature()
          Simplifies the geometry using the rules appropriate for this feature.
 void simplifyEx(boolean preserveFromToPoints, boolean closeRings, boolean useXORRule)
          Same as ITopologicalOperator::Simplify, but with some additional options that affect performance and how the interior is classified.
 void simplifyPreserveFromTo()
          Simplifies the polygon and maintains the index location of the from/to point of each ring.
 void simplifySpaghetti()
          Simplifies a polygon but doesn't assume that rings need to be explicitly closed.
 void smooth(double maxAllowableOffset)
          Converts this curve into a smooth curve containing only Bezier curve segments.
 void snap()
          Snaps ms to the precision of the spatial reference associated with the geometry.
 void snapToSpatialReference()
          Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
 void splitAtDistance(double distance, boolean asRatio, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.
 IEnumSplitPoint splitAtDistances(int distanceCount, double[] distances, boolean asRatios, boolean createParts)
          Deprecated. This method uses C style arrays which are not supported in the ArcGIS API for Java. It is replaced by GeometryEnvironment.splitAtDistances(com.esri.arcgis.geometry.IPolycurve2, double[], boolean, boolean).
 void splitAtPoint(IPoint splitPoint, boolean projectOnto, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Introduces a new vertex into this polyline at the location on it closest to the input point.
 IEnumSplitPoint splitAtPoints(IEnumVertex splitPoints, boolean projectOnto, boolean createParts, double cutoffDistance)
          Introduces new vertices into this polyline at the locations on it closest to the input points.
 IGeometry symmetricDifference(IGeometry other)
          Constructs the geometry that contains points from either but not both input geometries.
 IGeometry symmetricDifferenceEx(IGeometry other, boolean bNonPlanar)
          defined for (multi)points and polylines.
 boolean touches(IGeometry other)
          Indicates if the boundaries of the geometries intersect.
 void transform(int direction, ITransformation transformation)
          Applies an arbitrary transformation.
 void transform3D(int direction, ITransformation3D transformation)
          Applies an arbitrary 3D transformation.
 IGeometry union(IGeometry other)
          Constructs the geometry that is the set-theoretic union of the input geometries.
 IGeometry unionEx(IGeometry other, boolean bNonPlanar)
          Constructs the set-theoretic union of the inputs, with the option for non-planary result.
 void updatePoint(int i, IPoint p)
          Changes the ith vertex or point to be a copy of the input point.
 void weed(double maxAllowableOffsetFactor)
          Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.
 void weed3D(double maxAllowableOffsetFactor)
          Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.
 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

Polygon

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

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

Polygon

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

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

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

getPointCount

public int getPointCount()
                  throws IOException,
                         AutomationException
The number of points in the collection.

Description

Returns the number of Points in the PointCollection. The last Point in the PointCollection has an index equal to PointCount - 1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPoint

public IPoint getPoint(int i)
                throws IOException,
                       AutomationException
A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.

Product Availability

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

Specified by:
getPoint in interface IPointCollection
Parameters:
i - The i (in)
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.

addPoint

public void addPoint(IPoint inPoint,
                     Object before,
                     Object after)
              throws IOException,
                     AutomationException
Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.

Description

Adds a Point to a PointCollection. If before and after are omitted, the Point is added to the end of the PointCollection. Additionally, by specifying either the before or after index, the Point can be added at a specific location in the PointCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addPoint in interface IPointCollection
Parameters:
inPoint - A reference to a com.esri.arcgis.geometry.IPoint (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.

updatePoint

public void updatePoint(int i,
                        IPoint p)
                 throws IOException,
                        AutomationException
Changes the ith vertex or point to be a copy of the input point.

Description

Updates the ith Point with a copy of the input Point. Update replaces the reference to the indexed point with a reference to the input Point.

Remarks

For efficiency UpdatePoint does not check if the spatial reference of the input point is equal to the spatial reference of the PointCollection. Please make sure that the spatial reference of the input point is equal to the spatial reference of the PointCollection before you pass the point in.

Note : You can also explicitly check the spatial reference by using IClone::IsEqual

Example:

//To check spatial reference efficiently
IPoint pointIn = null;
IPointCollection ptColl = null;
ISpatialReference pSpatialReferenceOfCollection = null;

//The next line will not do anything if the two projections are equal
pointIn.project(pSpatialReferenceOfCollection);
ptColl.updatePoint( 1, pointIn);

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryPoints

public void queryPoints(int index,
                        int count,
                        IPoint points)
                 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.queryPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]).

Copies some points to an existing array of points. This method is intended for internal use only.

Description

Queries a specified number (Count) of Points starting at the given index into an array of Points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertPoints

public void insertPoints(int index,
                         int count,
                         IPoint newPoints)
                  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.insertPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[]).

Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

Description

Inserts a specified number (Count) of Points into the PointCollection at the given index from an array of Points. The first Count points from the array are inserted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertPointCollection

public void insertPointCollection(int index,
                                  IPointCollection newPoints)
                           throws IOException,
                                  AutomationException
Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.

Description

Inserts a PointCollection of Points into the PointCollection at the specified index. The resulting PointCollection does not retain information about the distinction between the old and new Point Collections.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addPoints

public void addPoints(int count,
                      IPoint newPoints)
               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.addPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]).

Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.

Description

Adds the first specified number (Count) of Points to the PointCollection from an array of Points (with at least Count points). The Points are all added to the end of the PointCollection in the same sequence as they are ordered in the array.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addPointCollection

public void addPointCollection(IPointCollection newPoints)
                        throws IOException,
                               AutomationException
Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.

Description

Adds a PointCollection of Points to the end of the PointCollection. The resulting PointCollection does not retain the division between the old PointCollection and the additional PointCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPoints

public void setPoints(int count,
                      IPoint newPoints)
               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.setPoints(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.geometry.IPoint[]).

Replaces all existing vertices of this Path, Ring, Polyline, or Polygon with copies of the input points; or all existing points of this Multipoint, TriangleFan, or TriangleStrip with references to the input points (for C++ and VB users only).

Description

Sets the contents of the PointCollection equal to the first Count Points from the input array of Points. After SetPoints is called, the PointCollection contains only count Points from the input Point array (regardless of what it may have contained previously).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPointCollection

public void setPointCollection(IPointCollection newPoints)
                        throws IOException,
                               AutomationException
Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.

Description

Sets the contents of the PointCollection equal to the contents of the input PointCollection. After SetPointCollection is called, the PointCollection contains only the Points from the input PointCollection (regardless of what it may have contained previously).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removePoints

public void removePoints(int index,
                         int count)
                  throws IOException,
                         AutomationException
Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.

Description

Removes a specified number (Count) of Points from a PointCollection starting at a given index.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getEnumVertices

public IEnumVertex getEnumVertices()
                            throws IOException,
                                   AutomationException
A new enumerator for this point collection.

Description

Returns an EnumVertex for the vertices in the PointCollection. The EnumVertex allows the Points to be tranversed in a sequential order.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

replacePoints

public void replacePoints(int index,
                          int comingIn,
                          int goingAway,
                          IPoint newPoints)
                   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.replacePoints(com.esri.arcgis.geometry.IPointCollection4, int, int, com.esri.arcgis.geometry.IPoint[]).

Replaces vertices/points within a PointCollection.

Description

Removes a specified number (goingAway) of Points from a PointCollection starting at a given index and replaces them (starting at the same index) with a specified number (comingIn) of Points from an array of Points.

If you are using attempting to use this method from a .NET enabled language, such as VB.NET, you may need to use the ReplacePoints method provided by the IGeometryBridge interface exposed on the GeometryEnvironment object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
replacePoints in interface IPointCollection
Parameters:
index - The index (in)
comingIn - The comingIn (in)
goingAway - The goingAway (in)
newPoints - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replacePointCollection

public void replacePointCollection(int index,
                                   int goingAway,
                                   IPointCollection newPoints)
                            throws IOException,
                                   AutomationException
Replaces vertices/points within a PointCollection.

Description

Replaces a specified number (goingAway) of Points in the PointCollection begining at a given index with a PointCollection of Points (inserted at the given index).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryPoint

public void queryPoint(int index,
                       IPoint point)
                throws IOException,
                       AutomationException
Queries for a point in the PointCollection at given index.

Description

Queries the ith Point from the PointCollection. The first Point in the PointCollection has index 0, and the last Point has index equal to PointCount - 1. (Alternatively, the last Point in the PointCollection can be referenced using index -1.).

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addWKSPointZs

public void addWKSPointZs(int count,
                          _WKSPointZ pointStructures)
                   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.addWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]).

Adds vertices/points to this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addWKSPointZs in interface IPointCollection4
Parameters:
count - The count (in)
pointStructures - A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWKSPointZs

public void setWKSPointZs(int count,
                          _WKSPointZ pointStructures)
                   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.setWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, com.esri.arcgis.system._WKSPointZ[]).

Replaces all vertices/points of this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch with new ones.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setWKSPointZs in interface IPointCollection4
Parameters:
count - The count (in)
pointStructures - A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryWKSPointZs

public void queryWKSPointZs(int index,
                            int count,
                            _WKSPointZ[] pointStructures)
                     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.queryWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[][]).

Copies vertices/points coordinates to the array of point structures.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryWKSPointZs in interface IPointCollection4
Parameters:
index - The index (in)
count - The count (in)
pointStructures - A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertWKSPointZs

public void insertWKSPointZs(int index,
                             int count,
                             _WKSPointZ newPoints)
                      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.insertWKSPointZs(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.system._WKSPointZ[]).

Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertWKSPointZs in interface IPointCollection4
Parameters:
index - The index (in)
count - The count (in)
newPoints - A Structure: com.esri.arcgis.system._WKSPointZ (A com.esri.arcgis.system._WKSPointZ COM typedef) (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIndexedEnumVertices

public IEnumVertex getIndexedEnumVertices(IGeometry queryGeometry)
                                   throws IOException,
                                          AutomationException
An indexed vertex enumerator for this point collection.

Product Availability

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

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

getPoints

public void getPoints(int index,
                      int count,
                      IPoint[] points)
               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.getPoints(com.esri.arcgis.geometry.IPointCollection4, int, com.esri.arcgis.geometry.IPoint[][]).

Populates an array with references to points in the Multipoint. The QueryPoints method on IPointCollection makes copies of the points. This method is intended for internal use only.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getGeometryType

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

Remarks

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getDimension

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

Description

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

Remarks


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

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

Dimension Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSpatialReference

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

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSpatialReferenceByRef

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isEmpty

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

Description

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setEmpty

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

Description

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

Remarks


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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryEnvelope

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

Description

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

Remarks

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

QueryEnvelope Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getEnvelope

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

Description

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

Remarks

Envelope Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

project

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

Description

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

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

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

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

Remarks

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

snapToSpatialReference

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

Remarks

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

geoNormalize

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

Remarks

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

geoNormalizeFromLongitude

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

Remarks

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

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.

getSegmentCount

public int getSegmentCount()
                    throws IOException,
                           AutomationException
The number of segments.

Description

Returns the number of Segments in the Segment Collection. The last Segment in the Segment Collection has an index equal to SegmentCount - 1.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSegment

public ISegment getSegment(int i)
                    throws IOException,
                           AutomationException
A reference to the ith segment.

Product Availability

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

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

addSegment

public void addSegment(ISegment inSegment,
                       Object before,
                       Object after)
                throws IOException,
                       AutomationException
Adds a reference to the input segment at the end, or before or after a specified index.

Description

Adds a Segment to a Segment Collection. If before and after are omitted, the Segment is added to the end of the Segment Collection. Additionally, by specifying either the before or after index, the Segment can be added at a specific location in the Segment Collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
addSegment in interface ISegmentCollection
Parameters:
inSegment - A reference to a com.esri.arcgis.geometry.ISegment (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.

querySegments

public void querySegments(int index,
                          int count,
                          ISegment[] segments)
                   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.querySegments(com.esri.arcgis.geometry.ISegmentCollection, int, com.esri.arcgis.geometry.ISegment[][]).

Returns references to some of the input segments. This method is intended for internal use only.

Description

Queries a specified number (Count) of Segments starting at the given index into an array of Segments.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addSegments

public void addSegments(int count,
                        ISegment newSegments)
                 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.addSegments(com.esri.arcgis.geometry.ISegmentCollection, com.esri.arcgis.geometry.ISegment[]).

Adds references to segments. This method is intended for internal use only.

Description

Adds the first specified number (Count) of Segments to the Segment Collection from an array of Segments (with at least Count segments). The Segments are all added to the end of the Segment Collection in the same sequence as they are ordered in the array.

Remarks

Note: the array must contains only ISegment pointers, otherwise it night crash the application.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

addSegmentCollection

public void addSegmentCollection(ISegmentCollection segments)
                          throws IOException,
                                 AutomationException
Adds references to the segments from the specified segment collection.

Description

Adds a Segment Collection of Segments to the end of the existing Segment Collection. It is assumed that the From Point of the new Segment Collection is the same as the To Point of the existing Segment Collection.

Remarks

AddSegmentCollection add the other geometry to the last part of the current geometry.
For example, adding a polyline (with one part) to another polyline (with one part)
is adding the second polyline segments into the first part of the other polyline
even if the polylines are disjoint.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertSegments

public void insertSegments(int index,
                           int count,
                           ISegment newSegments)
                    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.insertSegments(com.esri.arcgis.geometry.ISegmentCollection, int, com.esri.arcgis.geometry.ISegment[]).

Inserts references to the input segments. This method is intended for internal use only.

Description

Inserts a specified number (Count) of Segments into the Segment Collection at the given index from an array of Segments. The first Count segments from the array are inserted.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertSegmentCollection

public void insertSegmentCollection(int index,
                                    ISegmentCollection newSegments)
                             throws IOException,
                                    AutomationException
Inserts references to the segments in the input collectoin.

Description

Inserts a Segment Collection of segments into the Segment Collection at the specified index. The resulting Segment Collection does not retain information about the distinction between the old and new Segment Collections.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

insertSegmentCollectionEx

public void insertSegmentCollectionEx(int index,
                                      int start,
                                      int count,
                                      ISegmentCollection newSegments)
                               throws IOException,
                                      AutomationException
Inserts references to some of the segments from the input collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

replaceSegments

public void replaceSegments(int index,
                            int comingIn,
                            int goingAway,
                            ISegment newSegments)
                     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.replaceSegments(com.esri.arcgis.geometry.ISegmentCollection, int, int, com.esri.arcgis.geometry.ISegment[]).

Removes and inserts from segments. This method is intended for internal use only.

Description

Removes a specified number (goingAway) of Segments from a Segment Collection starting at a given index and replaces them (starting at the same index) with a specified number (comingIn) of Segments from an array of Segments.

Remarks

ReplaceSegments will return an error ("The index is either too large or too small") if the inputs are inconsistent. For example, specifying index = 4 on a polyline with only 2 segments.

On multipart geometry, segments cannot be replaced on more than one part at the time. For example, an error (("The index is either too large or too small") is returned on a polyline with two parts containing three segments each when specifying index= 2, incoming= 2, removal= 2. The error is returned because the first part doesn't contain enough segments to remove two segments starting at index = 2. This behavior is enforced for performance reasons. Please see the example.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
replaceSegments in interface ISegmentCollection
Parameters:
index - The index (in)
comingIn - The comingIn (in)
goingAway - The goingAway (in)
newSegments - A reference to a com.esri.arcgis.geometry.ISegment (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

replaceSegmentCollection

public void replaceSegmentCollection(int index,
                                     int goingAway,
                                     ISegmentCollection newSegments)
                              throws IOException,
                                     AutomationException
Remove and inserts some segments.

Description

Replaces a specified number (goingAway) of Segments in the Segment Collection begining at a given index with a Segment Collection of Segments (inserted at the given index).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

removeSegments

public void removeSegments(int index,
                           int count,
                           boolean closeGap)
                    throws IOException,
                           AutomationException
Removes references to some segments. If closeGap is TRUE, then any remaining internal gap in the path, ring, polyline or polygon is connected with a single line segment.

Description

Removes a specified number (Count) of Segments from a Segment Collection starting at a given index.
If the removal created a disjoint Path and if closeGap is TRUE, then the remaining segments will
be connected at the midpoint of the gap by modifying the segments adjacent to the gap.This will create a
connected Path.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setCircle

public void setCircle(IPoint cp,
                      double circleRadius)
               throws IOException,
                      AutomationException
Defines this path, ring, polyline or polygon to contain a single circular arc segment that is closed.

Description

Sets a SegmentCollection equal to a single segment CircularArc. The CircularArc is a complete circle centered at the input point with a given input Radius. After SetCircle is called, the SegmentCollection contains only the CiruclarArc (regardless of what it may have contained previously). The To and From Points at located at the top (Pi/2 Radians) of the circle.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setCircle in interface ISegmentCollection
Parameters:
cp - A reference to a com.esri.arcgis.geometry.IPoint (in)
circleRadius - The circleRadius (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IConstructCircularArc.constructCircle(com.esri.arcgis.geometry.IPoint, double, boolean), ISegmentCollection.setCircle(com.esri.arcgis.geometry.IPoint, double)

setRectangle

public void setRectangle(IEnvelope inEnvelope)
                  throws IOException,
                         AutomationException
Defines this path, ring, polyline or polygon to have four line segments in the same positions as the sides of the input envelope.

Description

Sets the contents of the SegmentCollection equal to four Line segments that form the sides of the input Envelope. The Segments begin with the LowerLeft point and proceed clockwise (the first side is the left side). After SetRectangle is called, the SegmentCollection contains only the 4 Line segments (regardless of what it may have contained previously). The spatial reference of the envelope is transferred to the SegmentCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setRectangle in interface ISegmentCollection
Parameters:
inEnvelope - 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.

setSegments

public void setSegments(int count,
                        ISegment newSegments)
                 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.setSegments(com.esri.arcgis.geometry.ISegmentCollection, com.esri.arcgis.geometry.ISegment[]).

Replaces all segments with references to the input segments. This method is intended for internal use only.

Description

Sets the contents of the Segment Collection equal to the first Count segments from the input array of Segments. After SetSegments is called, the Segment Collection contains only count segments from the input Segment array (regardless of what it may have contained previously).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setSegmentCollection

public void setSegmentCollection(ISegmentCollection newSegments)
                          throws IOException,
                                 AutomationException
Replaces all segments with references to segments from the input collection.

Description

Sets the contents of the Segment Collection equal to the contents of the input Segment Collection. After SetSegmentCollection is called, the Segment Collection contains only the segments from the input Segment Collection (regardless of what it may have contained previously).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getEnumSegments

public IEnumSegment getEnumSegments()
                             throws IOException,
                                    AutomationException
A new enumerator for this segment collection.

Description

Returns an IEnumSegment enumerator for the current SegmentCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getEnumCurve

public IEnumCurve getEnumCurve()
                        throws IOException,
                               AutomationException
A new curve enumerator for this segment collection.

Description

Returns an IEnumCurve enumerator for the current SegmentCollection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

hasNonLinearSegments

public void hasNonLinearSegments(boolean[] nonLinearSegments)
                          throws IOException,
                                 AutomationException
Indicates if this segment collection contains segments other than lines.

Description

Returns TRUE if the Segment Collection contains CircularArcs, BezierCurves, or EllipticArcs. Returns FALSE if all segments are Lines.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hasNonLinearSegments in interface ISegmentCollection
Parameters:
nonLinearSegments - The nonLinearSegments (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getIndexedEnumSegments

public IEnumSegment getIndexedEnumSegments(IGeometry queryGeometry)
                                    throws IOException,
                                           AutomationException
A new indexed segment enumerator for this segment collection.

Product Availability

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

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

segmentsChanged

public void segmentsChanged()
                     throws IOException,
                            AutomationException
Informs the segment collection that any cached values that it may be maintaining (envelope, length, etc.) are invalid. Use this method after editing segments directly.

Description

SegmentsChanged forces the SegmentCollection to recalculate any values that it has cached. SegmentsChanged should be used whenever the Segments in the SegmentCollection are modified without using the SegmentCollection methods. As long as the SegmentCollection is only modified using SegmentCollection methods, the cached values are current and consistent.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
segmentsChanged in interface ISegmentCollection
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.

getLength

public double getLength()
                 throws IOException,
                        AutomationException
The length of the curve.

Description

Returns the length of the entire curve. The length of the curve is the sum of the lengths along each parameterized Segment between vertices along the curve.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getFromPoint

public IPoint getFromPoint()
                    throws IOException,
                           AutomationException
The 'from' point of the curve.

Description

Returns or Sets the FromPoint of the first segment of the first part of the curve. While the curve may be composed of many parts and segments each with their own FromPoint, each curve only has a single From Point.

Remarks

FromPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getFromPoint in interface ICurve
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.
See Also:
IPoint, ICurve.queryFromPoint(com.esri.arcgis.geometry.IPoint), ICurve.getFromPoint(), ICurve.queryToPoint(com.esri.arcgis.geometry.IPoint), ICurve.getToPoint()

setFromPoint

public void setFromPoint(IPoint from)
                  throws IOException,
                         AutomationException
The 'from' point of the curve.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryFromPoint

public void queryFromPoint(IPoint from)
                    throws IOException,
                           AutomationException
Copies this curve's 'from' point to the input point.

Description

Used to query the FromPoint of the first Segment of the first part of the curve.

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.

QueryFromPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryFromPoint in interface ICurve
Parameters:
from - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint, ICurve.queryFromPoint(com.esri.arcgis.geometry.IPoint), ICurve.getFromPoint(), ICurve.queryToPoint(com.esri.arcgis.geometry.IPoint), ICurve.getToPoint()

getToPoint

public IPoint getToPoint()
                  throws IOException,
                         AutomationException
The 'to' point of the curve.

Description

Returns or Sets the ToPoint of the first Segment of the first part of the curve. While the curve may be composed of many parts and segments each with their own ToPoint, each curve only has a single To Point.

Remarks

ToPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getToPoint in interface ICurve
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.
See Also:
IPoint, ICurve.queryFromPoint(com.esri.arcgis.geometry.IPoint), ICurve.getFromPoint(), ICurve.queryToPoint(com.esri.arcgis.geometry.IPoint), ICurve.getToPoint()

setToPoint

public void setToPoint(IPoint to)
                throws IOException,
                       AutomationException
The 'to' point of the curve.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryToPoint

public void queryToPoint(IPoint to)
                  throws IOException,
                         AutomationException
Copies the curve's 'to' point into the input point.

Description

Used to query the ToPoint of the first Segment of the first part of the curve.

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.

QueryToPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryToPoint in interface ICurve
Parameters:
to - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint, ICurve.queryFromPoint(com.esri.arcgis.geometry.IPoint), ICurve.getFromPoint(), ICurve.queryToPoint(com.esri.arcgis.geometry.IPoint), ICurve.getToPoint()

queryPoint

public void queryPoint(int extension,
                       double distanceAlongCurve,
                       boolean asRatio,
                       IPoint outPoint)
                throws IOException,
                       AutomationException
Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.

Description

Returns the Point at a given distance along the curve or extended curve. If the distance is less than the length of the curve, then the returned point is the point at that distance along the curve. If the distance is less than zero, or greater than the length of the curve, then the returned point is on the curve specified by the extension method. The distance may be specified as a fixed unit of measure or a ratio of the length of the curve.

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.

ICurve QueryPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryPoint in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
outPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint, esriSegmentExtension

queryPointAndDistance

public void queryPointAndDistance(int extension,
                                  IPoint inPoint,
                                  boolean asRatio,
                                  IPoint outPoint,
                                  double[] distanceAlongCurve,
                                  double[] distanceFromCurve,
                                  boolean[] bRightSide)
                           throws IOException,
                                  AutomationException
Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.

Description

Finds the Point on the specified extended curve nearest to the input point and the distance between those points. Also returns information about the side of the curve the input point is on as well as the distance along the curve that the nearest point occurs.

Remarks

AsRatio is an input parameter that only affects the DistanceAlongCurve

distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.

DistanceAlongCurve is an output parameter that represents the distance between the Frompoint of the input curve and the returned point on the curve.

bRightSide is an output parameter that tells if the input point is on the right side of the curve. The direction of the curve determines the right and left sides.

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.

QueryPointAndDistance Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryPointAndDistance in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
inPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
asRatio - The asRatio (in)
outPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
distanceAlongCurve - The distanceAlongCurve (in/out: use single element array)
distanceFromCurve - The distanceFromCurve (in/out: use single element array)
bRightSide - The bRightSide (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPoint

queryTangent

public void queryTangent(int extension,
                         double distanceAlongCurve,
                         boolean asRatio,
                         double length,
                         ILine tangent)
                  throws IOException,
                         AutomationException
Constructs a line tangent to a curve from a point at a specified distance along the curve.

Description

Given a distance along the curve specified either as a ratio of the length or as a specific fixed distance, QueryTangent returns the Line tangent to the Point. The length and method of tangential extension of the tangent line are given by the user. The method of tangential extension determines the direction of the tangent line as though it were being extended at a From point or a To point.

Remarks

QueryTangent Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryTangent in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
length - The length (in)
tangent - 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.
See Also:
ILine

queryNormal

public void queryNormal(int extension,
                        double distanceAlongCurve,
                        boolean asRatio,
                        double length,
                        ILine normal)
                 throws IOException,
                        AutomationException
Constructs a line normal to a curve from a point at a specified distance along the curve.

Description

Given a distance along the curve specified either as a ratio of the Length or as a specific fixed distance, QueryNormal returns the Line normal to the Point. The length and method of tangential extension of the normal line are given by the user. The method of tangential extension determines the direction of the normal line as though it were being extended at a From point or a To point.

Remarks

QueryNormal Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryNormal in interface ICurve
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
asRatio - The asRatio (in)
length - The length (in)
normal - 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.
See Also:
ILine

getSubcurve

public void getSubcurve(double fromDistance,
                        double toDistance,
                        boolean asRatio,
                        ICurve[] outSubcurve)
                 throws IOException,
                        AutomationException
Extracts a portion of this curve into a new curve.

Description

Gets the subcurve between the specified points along the original curve and creates a new curve. The elements in the new subcurve are the same type and have the same properties as the elements of the original curve. Which means if:

Input Geometry Output Geometry
Polygon Polyline
Polyline Polyline
Ring Path
Path Path
Segment Segment

If the input geometry is a polygon, you may want to use IRing::GetSubCurveEx which has more capabilities.

Remarks

Subcurve Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSubcurve in interface ICurve
Parameters:
fromDistance - The fromDistance (in)
toDistance - The toDistance (in)
asRatio - The asRatio (in)
outSubcurve - A reference to a com.esri.arcgis.geometry.ICurve (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IRing.getSubcurveEx(double, double, boolean, boolean, boolean), ICurve.getSubcurve(double, double, boolean, com.esri.arcgis.geometry.ICurve[])

reverseOrientation

public void reverseOrientation()
                        throws IOException,
                               AutomationException
Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).

Description

ReverseOrientation changes the direction of the curve without changing the spatial position of the curve. The From Point and To Point of each Segment in each part of the curve are interchanged.

Remarks

The ReverseOrientation method works the same way as the Arcedit FLIP command. It reverses the order of the vertices in the Curve.

Caution should be taken in using ReverseOrientation on Polygons. Since ReverseOrientation changes the direction of each Ring within the Polygon, all Exterior Rings become Interior Rings and vice versa.

Reverse Orientation Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isClosed

public boolean isClosed()
                 throws IOException,
                        AutomationException
Indicates if 'from' and 'to' points (of each part) are identical.

Description

A curve is closed if the From and To points of each part of the curve are equal.

Remarks

IsClosed may still return TRUE if the curve consists of improperly constructed geometries (ex. non-continuous paths). IsClosed only checks the location of the From and To points of each part, it does not check the internal parts for topological consistency.

ICurve IsClosed Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

densify

public void densify(double maxSegmentLength,
                    double maxDeviation)
             throws IOException,
                    AutomationException
Converts this polycurve into a piecewise linear approximation of itself.

Description

Converts Polycurve into a Polycurve composed of Line segments with length maxSegmentLength (or less) that are within maxDeviation of the original polycurve. If maxDeviation = 0, maxDeviation is ignored and Line segments with length maxSegmentLength are constructed with vertices laying on the original curve. All of the segments in the final polyline will be Lines.

Remarks

If the maxSegmentLength is negative IGeometryEnvironment::AutoDensifyTolerance is used. IGeometryEnvironment::AutoDensifyTolerance default value is 0. This value can be explicitly set via IGeometryEnvironment::AutoDensifyTolerance.

If the maxDeviation is negative IGeometryEnvironment::DeviationAutoDensifyTolerance is used. The default value is 2*XYResolution * 100 (2/XYUnits * 100). This value can be explicitly set via IGeometryEnvironment::DeviationAutoDensifyTolerance.

In order to avoid the creation of too many segments, the geometry system uses a maxdeviation = 2*xyResolution * 100 as default value if maxSegmentLength is 0 and the maxDeviation is 0.

If the maxDeviation is positive but smaller than 2*XYResolution of the spatial reference then the maxDeviation used is 2*XYResolution * 100

NOTE: The default values given in this topic are subject to change without notice. If specific values want to be maintained we recommend using the methods on IGeometryEnvironment to set those explicitly.

The start and end points are always honored and remain the same as for the original feature.

Polycurve Densify Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
densify in interface IPolycurve
Parameters:
maxSegmentLength - The maxSegmentLength (in)
maxDeviation - The maxDeviation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

generalize

public void generalize(double maxAllowableOffset)
                throws IOException,
                       AutomationException
Generalizes this polycurve using the Douglas-Poiker algorithm.

Description

Generalizes each part of a Polycurve into a generalized collection of Line segments. Generalize performs a Douglas-Poiker Generalization algorithm with a specified maximum offset tolerance given as input. For Line segments, the Generalized output is a subset of the original input vertices. For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Remarks

For polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

IPolycurve Generalize Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

weed

public void weed(double maxAllowableOffsetFactor)
          throws IOException,
                 AutomationException
Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

Description

Weed Generalizes each part of a Polycurve into a generalized collection of Line segments. Weed performs a Douglas-Poiker Generalization algorithm with a specified multiple of the internal tolerance given as input. For Line segments, the Generalized output is a subset of the original input vertices. For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Remarks

For polycurve with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

Weed(X) = Generalize(X * InternalTolerance)

IPolycurve Weed Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

smooth

public void smooth(double maxAllowableOffset)
            throws IOException,
                   AutomationException
Converts this curve into a smooth curve containing only Bezier curve segments.

Description

Converts the Polycurve into a Polycurve containing only BezierCurve segments. If the maxAllowableOffset parameter is zero, each segment of the input Polycurve becomes a separate Bezier curve. If maxAllowableOffset if greater than zero, the polycurve is generalized first by the Douglas-Poiker method using the maxAllowableOffset value. Bezier curves are then created for each of the remaining segments. The created BezierCurve polycurve is an approximation of the original polycurve. At each vertex, the adjoining BezierCurves have complementary tangents which creates a continuous (smooth) transition between segments.

As an alternative, compare IConstructCurve2::ApproximateByBeziers.

Remarks

IPolycurve Smooth Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
smooth in interface IPolycurve
Parameters:
maxAllowableOffset - The maxAllowableOffset (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IPath.smooth(double), IPath.smoothLocal(int), IBezierCurve, IPolycurve.smooth(double)

splitAtPoint

public void splitAtPoint(IPoint splitPoint,
                         boolean projectOnto,
                         boolean createPart,
                         boolean[] splitHappened,
                         int[] newPartIndex,
                         int[] newSegmentIndex)
                  throws IOException,
                         AutomationException
Introduces a new vertex into this polyline at the location on it closest to the input point.

Description

Adds a new vertex along the curve as the specified input point, or the projection onto the curve of the specified input point.

Remarks

projectOnto is an input parameter that determines if the output point will be located on the polycurve. If projectOnto is true and the input point is not already on the polycurve then the point is projected on the curve.

createPart is an input parameter that determines if parts (paths) have to be created. createPart must be FALSE for polygons. For polylines, if createPart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

SplitHappened is an output parameter that tells if the polycurve has been split or not.

newPartIndex is an output parameter that tells on which part (ring or path) the point has been introduced.

newSegmentIndex is an output parameter that tells what is the index of the new created segment. That index is zero based and part relative (start at 0 for each part).

SplitAtPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitAtPoint in interface IPolycurve
Parameters:
splitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
projectOnto - The projectOnto (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistance

public void splitAtDistance(double distance,
                            boolean asRatio,
                            boolean createPart,
                            boolean[] splitHappened,
                            int[] newPartIndex,
                            int[] newSegmentIndex)
                     throws IOException,
                            AutomationException
Introduces a new vertex into this polyline at a specified distance from the beginning of the polyline.

Description

Adds a new vertex point to the curve at a specified distance from the From point of the curve. For a split to happen, the split distance must be between the From and To points of the polycurve.

Remarks

CreatePart must be FALSE for polygons. For polylines, if CreatePart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

SplitAtDistance Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitAtDistance in interface IPolycurve
Parameters:
distance - The distance (in)
asRatio - The asRatio (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtPoints

public IEnumSplitPoint splitAtPoints(IEnumVertex splitPoints,
                                     boolean projectOnto,
                                     boolean createParts,
                                     double cutoffDistance)
                              throws IOException,
                                     AutomationException
Introduces new vertices into this polyline at the locations on it closest to the input points. Do not consider points farther than cutoffDistance from the polyline.

Description

The SplitAtPoints method allows splitting a polycurve (polygon or polyline) in sections using a set of points.

Remarks

Parameters description:

splitPoints: Input IEnumVertex object. It represents the points to be used to split the polycurve.

projectOnto: The projectOnto is an input parameter that determines if the output point will be located on the polycurve. If projectOnto is true and the input point is not already on the polycurve then the point is projected on the curve. If false, the polycurve is split and modified to pass trough the point.

createParts: The createParts is an input parameter that determines if parts (paths) have to be created. createPart must be FALSE for polygons. For polylines, if createPart is TRUE, the part on which the new split point falls is split into two parts with the newly added vertex serving as the end of the first part and the beginning of the second.

cutoffDistance: Input Double that represents the distance from the curve from where points are not considered anymore has being valid split points.

Note: The IEnumSplitPoint contains the input points.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitAtPoints in interface IPolycurve2
Parameters:
splitPoints - A reference to a com.esri.arcgis.geometry.IEnumVertex (in)
projectOnto - The projectOnto (in)
createParts - The createParts (in)
cutoffDistance - The cutoffDistance (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnumSplitPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

splitAtDistances

public IEnumSplitPoint splitAtDistances(int distanceCount,
                                        double[] distances,
                                        boolean asRatios,
                                        boolean createParts)
                                 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.splitAtDistances(com.esri.arcgis.geometry.IPolycurve2, double[], boolean, boolean).

Introduces new vertices into this polyline at specified distances from the beginning of the polyline.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
splitAtDistances in interface IPolycurve2
Parameters:
distanceCount - The distanceCount (in)
distances - The distances (in)
asRatios - The asRatios (in)
createParts - The createParts (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnumSplitPoint
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

densifyByAngle

public void densifyByAngle(double maxSegmentLength,
                           double maxAngleDeviation)
                    throws IOException,
                           AutomationException
Converts this polycurve into a piecewise linear approximation of itself. Vertices are introduced at points where the included angle between tangents at those point is maxAngleDeviation.

Description

Converts a Polycurve into a Polycurve composed of Line segments with length maxSegmentLength (or less) that are within maxDeviation of the original polycurve. If maxDeviation = 0, maxDeviation is ignored and Line segments with length maxSegmentLength are constructed with vertices located on the original curve. All of the segments in the final polyline will be Lines. The maxDeviation is an angle in radians.

Remarks

If the maxSegmentLength is negative IGeometryEnvironment::AutoDensifyTolerance is used. IGeometryEnvironment::AutoDensifyTolerance default value is 0. This value can be explicitly set via IGeometryEnvironment::AutoDensifyTolerance.

If the maxDeviation is negative IGeometryEnvironment::AngularAutoDensifyTolerance is used. The default value is Pi / 18.0. That value can be explicitly set via IGeometryEnvironment::AngularAutoDensifyTolerance.

In order to avoid the creation of too many segments, the geometry system uses a maxDeviation = 2*XYresolution * 100 (or 2/XYUnits * 100) as the default value if maxSegmentLength is 0 and the maxDeviation is 0.

The maximum number of segments that can be produced is 2000, an external user cannot modify that value.


NOTE: The default values given in this topic are subject to change without notice. If you have specific values that you want to be maintained, we recommend using the methods on IGeometryEnvironment to set them explicitly.

The start and end points are always honored and remain the same as for the original feature.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
densifyByAngle in interface IPolycurve2
Parameters:
maxSegmentLength - The maxSegmentLength (in)
maxAngleDeviation - The maxAngleDeviation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLengthGeodetic

public double getLengthGeodetic(int geodeticLineType,
                                ILinearUnit pLU)
                         throws IOException,
                                AutomationException
Returns length of this polycurve calculated using various types of geodetic methods.

Product Availability

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

Specified by:
getLengthGeodetic in interface IPolycurveGeodetic
Parameters:
geodeticLineType - A com.esri.arcgis.geometry.esriGeodeticType constant (in)
pLU - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
The pLength
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

densifyGeodetic

public void densifyGeodetic(int geodeticLineType,
                            ILinearUnit pLU,
                            int densifyMethod,
                            double densifyParameter)
                     throws IOException,
                            AutomationException
Constructs different types of geodetic curves. The 'by length' and 'by deviation' densification methods are supported.

Description

Densifies the polycurve by connecting its existing vertices with geodetic curves of the specified type.

enum esriGeodeticType
{
esriGeodeticTypeGeodesic = 0,
esriGeodeticTypeLoxodrome = 1,
esriGeodeticTypeGreatElliptic = 2,
esriGeodeticTypeNormalSection = 3
};

Product Availability

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

Specified by:
densifyGeodetic in interface IPolycurveGeodetic
Parameters:
geodeticLineType - A com.esri.arcgis.geometry.esriGeodeticType constant (in)
pLU - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
densifyMethod - A com.esri.arcgis.geometry.esriCurveDensifyMethod constant (in)
densifyParameter - The densifyParameter (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geodesicDensify

public void geodesicDensify(double maxSegmentLength)
                     throws IOException,
                            AutomationException
Densifies and reshapes existing segments so that the output segments follow the shortest ground path connecting input vertices. maxSegmentLength is in the units of the axis of the underlying spheroid of this polyline's gcs (usually meters).

Description

The GeodesicDensify method modifies a polyline or polygon by inserting vertices. The original geometry is interpreted as a sequential collection of "stops" on the Earth's surface. The inserted vertices define the shape of the shortest ground path connecting those stops. The geometry must be associated with a geographic coordinate system.

The maxSegmentLength parameter is in the units (usually meters) of the semi-major axis of the coordinate system's ellipsoid. The minimum allowable value for this parameter is 1/10,000 of the length of the semi-major axis. This minimum value will be used for densification if the input value of maxSegmentLength is less than that.

Remarks

The image below shows the results of applying the GeodesicDensify method to a polyline representing a flight path with stops in Honolulu and Los Angeles. The original polyline is modified by adding additional segments that identify the shortest ground distance between these locations.

GeodesicDensify

Product Availability

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

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

getArea

public double getArea()
               throws IOException,
                      AutomationException
The area.

Description

Returns the area enclosed between the Exterior Rings and the Interior Rings of the 2 (or 2.5) Dimensional geometry. Interior Rings return a negative Area.

Remarks

Area Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getCentroid

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

Description

Returns the Centroid of the 2 (or 2.5) Dimensional figure. The Centroid is the center of the weighted area.

Remarks

The Centroid does not always occur inside the Area of the geometry. The Centroid is not the same as the center of the geometry or the Envelope binding the geometry (but it may be if and only if that is also the center of the weighted area).

Centroid Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getCentroid in interface IArea
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.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

getLabelPoint

public IPoint getLabelPoint()
                     throws IOException,
                            AutomationException
A point guaranteed to be inside this area.

Description

Returns the Label Point of the object. The Label Point is the point at which the label is located. The Label Point is always located within the Area of the object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getLabelPoint in interface IArea
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.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

queryCentroid

public void queryCentroid(IPoint center)
                   throws IOException,
                          AutomationException
Copies the centroid of this area to the specified point.

Description

Queries the Centroid of the 2 (or 2.5) Dimensional figure. The Centroid is the center of the weighted area. You must instantiate the Point before calling QueryCentroid. For example,

Dim pPoint as IPoint

Set pPoint = New Point

Remarks

The Centroid does not always occur inside the Area of the geometry. The Centroid is not the same as the center of the geometry or the Envelope binding the geometry (but it may be if and only if that is also the center of the weighted area).

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.

Centroid Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryCentroid in interface IArea
Parameters:
center - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

queryLabelPoint

public void queryLabelPoint(IPoint labelPoint)
                     throws IOException,
                            AutomationException
Copies to the input point a point guaranteed to be inside this area.

Description

Queries the Label Point of the object. The Label Point is the point at which the label is located. The Label Point is always located within the Area of the object. You must instantiate the point before calling QueryLabelPoint. For example,


Dim pPoint as IPoint

Set pPoint = New Point

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.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryLabelPoint in interface IArea
Parameters:
labelPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IArea.queryCentroid(com.esri.arcgis.geometry.IPoint), IArea.getCentroid(), IArea.queryLabelPoint(com.esri.arcgis.geometry.IPoint), IArea.getLabelPoint()

getAreaGeodetic

public double getAreaGeodetic(int lineType,
                              ILinearUnit pAreaUnit)
                       throws IOException,
                              AutomationException
The area.

Product Availability

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

Specified by:
getAreaGeodetic in interface IAreaGeodetic
Parameters:
lineType - A com.esri.arcgis.geometry.esriGeodeticType constant (in)
pAreaUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
The area
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getArea3D

public double getArea3D()
                 throws IOException,
                        AutomationException
The 3D surface area.

Remarks

If Patches comprising a MultiPatch geometry have improperly ordered vertices such that positive faces are not pointing outwards, a negative 3D surface area will be returned. To ensure proper orientation, add vertices in a clockwise manner relative to an observer situated outside of the MultiPatch geometry.

Product Availability

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

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

getCentroid3D

public IPoint getCentroid3D()
                     throws IOException,
                            AutomationException
A 3D point whose XY coordinates are set to the center of gravity of the shape’s 2D footprint and Z set to the shape’s ZMax.

Product Availability

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

Specified by:
getCentroid3D in interface IArea3D
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.

getLabelPoint3D

public IPoint getLabelPoint3D()
                       throws IOException,
                              AutomationException
A point guaranteed to be on this 3D surface area.

Product Availability

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

Specified by:
getLabelPoint3D in interface IArea3D
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.

queryCentroid3D

public void queryCentroid3D(IPoint center)
                     throws IOException,
                            AutomationException
Copies the centroid of this 3D surface area to the specified point.

Product Availability

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

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

queryLabelPoint3D

public void queryLabelPoint3D(IPoint labelPoint)
                       throws IOException,
                              AutomationException
Copies to the input point a point guaranteed to be on this 3D surface area.

Product Availability

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

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

findExteriorRing

public IRing findExteriorRing(IRing interiorRing)
                       throws IOException,
                              AutomationException
Returns the exterior ring containing the specified interior ring.

Description

Returns the Exterior Ring to which the input Interior Ring belongs. Every interior ring belongs to one and only one exterior ring.

Remarks

IPolygon FindExteriorRing Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getExteriorRingCount

public int getExteriorRingCount()
                         throws IOException,
                                AutomationException
The number of exterior rings.

Description

Returns the number of Exterior Rings that are part of the polygon. Exterior Rings have a clockwise orientation.

Remarks

IPolygon ExteriorRingCount Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryExteriorRings

public void queryExteriorRings(IRing exteriorRings)
                        throws IOException,
                               AutomationException
Populates an array with references to all exterior rings. This method does not marshall correctly out-of-proc. Use QueryExteriorRingsEx on the IPolygon2 interface instead.

Description

Returns an array of IRings containing all of the Exterior Rings in the Polygon. Whenever possible, IPolygon2::QueryExteriorRingsEx should be used instead to ensure proper functionality and better control of the returned array.

Remarks

Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.

IPolygon QueryExteriorRings Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getInteriorRingCount

public int getInteriorRingCount(IRing exteriorRing)
                         throws IOException,
                                AutomationException
The number of rings interior to the specified exterior ring.

Product Availability

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

Specified by:
getInteriorRingCount in interface IPolygon
Parameters:
exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in)
Returns:
The cInteriorRings
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryInteriorRings

public void queryInteriorRings(IRing exteriorRing,
                               IRing interiorRings)
                        throws IOException,
                               AutomationException
Populates an array with references to rings that are interior to the specified exterior ring. This method does not marshall correctly out-of-proc. Use QueryInteriorRingsEx on the IPolygon2 interface instead.

Description

Returns an array of IRings containing all Interior Rings belonging to a specified input Exterior Ring. Whenever possible, IPolygon2::QueryInteriorRingsEx should be used to ensure proper functionality and better control of the returned array.

Remarks

Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

close

public void close()
           throws IOException,
                  AutomationException
Closes all rings in this polygon. The resulting polygon may not be simple.

Description

Closes all Rings in the Polygon by adding a Segment between the To Point and From Point of each Ring if those points are not already identical. This may result in a non-simple Polygon with Rings crossing each other. Also, this only closes the last segment and does not fix improperly constructed Rings.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

simplifyPreserveFromTo

public void simplifyPreserveFromTo()
                            throws IOException,
                                   AutomationException
Simplifies the polygon and maintains the index location of the from/to point of each ring.

Description

SimplifyPreserveFromTo simplifies the polygon in the same manner as the ITopologicalOperator method Simplify, but once simplification is complete, SimplifyPreserveFromTo reorients each ring such that the original From/To points of each preexisting ring are in the simplified result. Newly created rings are not reoriented.

Remarks

SimplifyPreserveFromTo Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

queryExteriorRingsEx

public void queryExteriorRingsEx(int numExteriorRingsRequested,
                                 IRing[] exteriorRings)
                          throws IOException,
                                 AutomationException
Returns an array of references to exterior rings, up to a maximum of the number requested.

Description

Returns an array of IRings containing up to numExteriorRingsRequested of the Exterior Rings in the Polygon.

Remarks

Note : That method only accepts an array of type IRing for exteriorRings. Using an array of IRing2 won't work.

IPolygon2 QueryExteriorRingsEx Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryExteriorRingsEx in interface IPolygon2
Parameters:
numExteriorRingsRequested - The numExteriorRingsRequested (in)
exteriorRings - A reference to a com.esri.arcgis.geometry.IRing (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryInteriorRingsEx

public void queryInteriorRingsEx(IRing exteriorRing,
                                 int numInteriorRingsRequested,
                                 IRing[] interiorRings)
                          throws IOException,
                                 AutomationException
Returns an array of references to rings that are interior to the specified exterior ring, up to a maximum of the number requested.

Description

Returns an array of IRings containing up to numInteriorRingsRequested Interior Rings belonging to a specified input Exterior Ring.

Remarks

Note : That method only accepts an array of type IRing for interiorRings. Using an array of IRing2 won't work.

IPolygon2 QueryInteriorRingsEx Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryInteriorRingsEx in interface IPolygon2
Parameters:
exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in)
numInteriorRingsRequested - The numInteriorRingsRequested (in)
interiorRings - A reference to a com.esri.arcgis.geometry.IRing (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedComponents

public void getConnectedComponents(int numComponentsRequested,
                                   IPolygon[] components)
                            throws IOException,
                                   AutomationException
Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.

Remarks

The method returns an error in the following cases:

1. Number of components requested is smaller than 0

2. Number of components requested larger than the number of exterior rings

3. If the array is not dimensionned

4. If the polygon is not simple

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConnectedComponents in interface IPolygon2
Parameters:
numComponentsRequested - The numComponentsRequested (in)
components - A reference to a com.esri.arcgis.geometry.IPolygon (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getOutermostComponents

public void getOutermostComponents(int numComponentsRequested,
                                   int[] numComponentsReturned,
                                   IPolygon[] components,
                                   boolean[] moreComponentsExist)
                            throws IOException,
                                   AutomationException
Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.

Remarks

The method returns an error in the following cases:

1. Number of components requested is smaller than 0

2. If the array is not dimensionned

3. If the polygon is not simple

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getOutermostComponents in interface IPolygon2
Parameters:
numComponentsRequested - The numComponentsRequested (in)
numComponentsReturned - The numComponentsReturned (out: use single element array)
components - A reference to a com.esri.arcgis.geometry.IPolygon (out: use single element array)
moreComponentsExist - The moreComponentsExist (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

simplifySpaghetti

public void simplifySpaghetti()
                       throws IOException,
                              AutomationException
Simplifies a polygon but doesn't assume that rings need to be explicitly closed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

simplifyEx

public void simplifyEx(boolean preserveFromToPoints,
                       boolean closeRings,
                       boolean useXORRule)
                throws IOException,
                       AutomationException
Same as ITopologicalOperator::Simplify, but with some additional options that affect performance and how the interior is classified.

Remarks

Parameters:

preserveFromToPoints: Boolean value that determines if the from/to points of a ring in the polygon need to remain located at ring indexes 0 and PointCount-1 af the completion of the operation. Specify 'false' to improve performance of this operation.

closeRings : Boolean value that determines if the rings of the polygon must be closed prior to reconstruct the topology of the polygon. Specify false if you know that rings are closed or you are passing in spaghetti input that should not be checked for closure.

useXORRule: Boolean value that determines how the 'inside' of the polygon is determined. Specify true to use an even-odd counting rule: a point is inside the polygon if a horizontal line through that has encountered an odd number of boundaries to the left (overlapping boundaries count 1 for each overlap). Use this when the input consists of well-defined rings that need to be oriented correctly, have overlaps removed, etc. Specify false to use the default behavior, which iterates over a two step process: dangle removal, then "peeling off" of the largest unambiguous rings. This approach can remove more segments than the XOR-true approach, but is probably more appropriate for spaghetti input where segment overlaps should not be considered significant.

Here is an example of the different between XOR=TRUE vs. XOR= FALSE:

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
simplifyEx in interface IPolygon4
Parameters:
preserveFromToPoints - The preserveFromToPoints (in)
closeRings - The closeRings (in)
useXORRule - The useXORRule (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExteriorRingBag

public IGeometryBag getExteriorRingBag()
                                throws IOException,
                                       AutomationException
Creates and returns a geometry bag that contains references to all exterior rings.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getInteriorRingBag

public IGeometryBag getInteriorRingBag(IRing exteriorRing)
                                throws IOException,
                                       AutomationException
Creates and returns a geometry bag that contains references to all rings that are interior to the specified exterior ring.

Product Availability

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

Specified by:
getInteriorRingBag in interface IPolygon4
Parameters:
exteriorRing - A reference to a com.esri.arcgis.geometry.IRing (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryBag
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConnectedComponentBag

public IGeometryBag getConnectedComponentBag()
                                      throws IOException,
                                             AutomationException
Creates and returns a geometry bag containing polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getOutermostComponentBag

public IGeometryBag getOutermostComponentBag()
                                      throws IOException,
                                             AutomationException
Creates and returns a geometry bag containing polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isEnvelope

public boolean isEnvelope()
                   throws IOException,
                          AutomationException
Returns true if the shape of this polygon is equivalent to the polygon's bounding envelope.

Product Availability

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

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

isMAware

public boolean isMAware()
                 throws IOException,
                        AutomationException
Indicates whether or not the geometry is aware of and capable of handling Ms.

Description

Returns or sets the M Awareness state of the geometry object. If MAware is TRUE, then the object will recognize that it has M attributes and perform operations on them as necessary. If MAware is FALSE, the object will ignore Ms while performing operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setMAware

public void setMAware(boolean mAware)
               throws IOException,
                      AutomationException
Indicates whether or not the geometry is aware of and capable of handling Ms.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isMSimple

public boolean isMSimple()
                  throws IOException,
                         AutomationException
Indicates if all the Ms are valid numbers.

Description

MSimple is TRUE if none of the M values held by the geometry object are NaN. If any of the Ms within the object are NaN, MSimple is FALSE.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

dropMs

public void dropMs()
            throws IOException,
                   AutomationException
Sets all the M values to a non-valid number (NaN).

Description

Resets all of the current M values held by the geometry object back to NaN. MAware does not change.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMMin

public double getMMin()
               throws IOException,
                      AutomationException
The minimum M value.

Description

Returns the minimum M attribute contained within the MAware object collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMMax

public double getMMax()
               throws IOException,
                      AutomationException
The maximum M value.

Description

Returns the maximum M attribute contained within the MAware object collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

multiplyMs

public void multiplyMs(double factor)
                throws IOException,
                       AutomationException
Multiplies all the M values by a factor.

Remarks

The MultiplyMs method will update all the measure attributes for a PolyLine, and should only be used if every measure has been set (i.e. there are no NaNs). Check the IMAware::MSimple property or use the IMSegmentation methods to fill in any missing measure values. MultiplyMs is analogous to scaling spatial coordinates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

offsetMs

public void offsetMs(double offset)
              throws IOException,
                     AutomationException
Offsets all the M values by an offset value.

Remarks

The OffsetMs method will update all the measure attributes for a PolyLine, and should only be used if every measure has been set (i.e. there are no NaNs). Check the IMAware::MSimple property or use the IMSegmentation methods to fill in any missing measure values. OffsetMs is analgous to moving spatial coordinates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMMonotonic

public int getMMonotonic()
                  throws IOException,
                         AutomationException
A value indicating whether Ms are monotonic, and if so, whether they are ascending or descending.

Description

Returns an esriMMonotonicEnum indicating whether or not the Ms are monotonic as well as whether they are ascending or descending. The Ms are esriMAscending if the Ms are ordered such that M1 < M2 < M3 < . . . < Mn. The Ms are esriMDescending if the Ms are ordered such that M1 > M2 > M3 > . . . > Mn.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getMsAtDistance

public Object getMsAtDistance(double distance,
                              boolean asRatio)
                       throws IOException,
                              AutomationException
Returns M values at the distance along the geometry. An array of one or two Ms is returned. Two Ms can be returned if the given distance is exactly at the beginning or ending of a part.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getMsAtDistance in interface IMSegmentation
Parameters:
distance - The distance (in)
asRatio - The asRatio (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertMAtDistance

public void insertMAtDistance(double m,
                              double distance,
                              boolean asRatio,
                              boolean createPart,
                              boolean[] splitHappened,
                              int[] newPartIndex,
                              int[] newSegmentIndex)
                       throws IOException,
                              AutomationException
Sets the M value at the given distance along the geometry; creates a point at that distance if no point exists there.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
insertMAtDistance in interface IMSegmentation
Parameters:
m - The m (in)
distance - The distance (in)
asRatio - The asRatio (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDistancesAtM

public Object getDistancesAtM(boolean asRatio,
                              double m)
                       throws IOException,
                              AutomationException
Returns an array of distances along the polyline at which is located the specified M. If the geometry's M's are monotonic along the geometry then the array will only have one element.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getDistancesAtM in interface IMSegmentation
Parameters:
asRatio - The asRatio (in)
m - The m (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reverseMsOrder

public void reverseMsOrder()
                    throws IOException,
                           AutomationException
Reverses the order of the Ms along the geometry.

Remarks

Note that the m values are simply reversed. Any length:measure ratios that were present before ReverseMsOrder is called are not preserved.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

interpolateMsBetween

public void interpolateMsBetween(int fromPart,
                                 int fromPoint,
                                 int toPart,
                                 int toPoint)
                          throws IOException,
                                 AutomationException
Generates Ms by linear interpolation of segment distances for all vertices in the range [start+1, end-1].

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interpolateMsBetween in interface IMSegmentation
Parameters:
fromPart - The fromPart (in)
fromPoint - The fromPoint (in)
toPart - The toPart (in)
toPoint - The toPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAndInterpolateMsBetween

public void setAndInterpolateMsBetween(double fromM,
                                       double toM)
                                throws IOException,
                                       AutomationException
Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setAndInterpolateMsBetween in interface IMSegmentation
Parameters:
fromM - The fromM (in)
toM - The toM (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMsAsDistance

public void setMsAsDistance(boolean asRatio)
                     throws IOException,
                            AutomationException
Sets the M values to the cumulative length from the origin of the geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
setMsAsDistance in interface IMSegmentation
Parameters:
asRatio - The asRatio (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IMSegmentation2.setMsAsDistance2(com.esri.arcgis.geometry.IPoint, double, double, boolean)

extrapolateMs

public void extrapolateMs(int extrapolationStyle,
                          int fromPart,
                          int fromPoint,
                          int toPart,
                          int toPoint)
                   throws IOException,
                          AutomationException
Extrapolates the Ms at one or both ends of the geometry based on the M interval between the fromIndex and the toIndex.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
extrapolateMs in interface IMSegmentation
Parameters:
extrapolationStyle - A com.esri.arcgis.geometry.esriExtrapolationEnum constant (in)
fromPart - The fromPart (in)
fromPoint - The fromPoint (in)
toPart - The toPart (in)
toPoint - The toPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculateNonSimpleMs

public void calculateNonSimpleMs()
                          throws IOException,
                                 AutomationException
Redefines the non-simple Ms to be values obtained from interpolation of surrounding defined Ms, or extrapolation of Ms.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getPointsAtM

public IGeometryCollection getPointsAtM(double m,
                                        double lateralOffset)
                                 throws IOException,
                                        AutomationException
Returns a multipoint geometry corresponding to the locations along the geometry where the specified M occurs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getSubcurveBetweenMs

public IGeometryCollection getSubcurveBetweenMs(double fromM,
                                                double toM)
                                         throws IOException,
                                                AutomationException
Returns a polyline geometry corresponding to the subcurve(s) between the fromM and the toM.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSubcurveBetweenMs in interface IMSegmentation
Parameters:
fromM - The fromM (in)
toM - The toM (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IMSegmentation2.getSubcurveBetweenMsEx(double, double, int[], int[])

isZAware

public boolean isZAware()
                 throws IOException,
                        AutomationException
Indicates whether or not the geometry is aware of and capable of handling Zs.

Description

Returns or sets the Z Awareness state of the geometry object. If ZAware is TRUE, then the object will recognize that it has Z attributes and perform operations on them as necessary. If ZAware is FALSE, the object will ignore Zs while performing operations. ZAware should only be set to TRUE when all of the Zs are not NaN.

Remarks

Use ZAware = True when you want geometries to retain Z values during geometry operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setZAware

public void setZAware(boolean zAware)
               throws IOException,
                      AutomationException
Indicates whether or not the geometry is aware of and capable of handling Zs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isZSimple

public boolean isZSimple()
                  throws IOException,
                         AutomationException
Indicates if all the Zs are valid numbers.

Description

ZSimple is TRUE if none of the Z values held by the geometry object are NaN. If any of the Zs within the object are NaN, ZSimple is FALSE.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

dropZs

public void dropZs()
            throws IOException,
                   AutomationException
Sets all the Z values to a non-valid number (NaN).

Description

Resets all of the current Z values held by the geometry object back to NaN. ZAware does not change.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getZMin

public double getZMin()
               throws IOException,
                      AutomationException
The minimum Z value.

Description

Returns the minimum Z attribute contained within the ZAware object collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

getZMax

public double getZMax()
               throws IOException,
                      AutomationException
The maximum Z value.

Description

Returns the maximum Z attribute contained within the ZAware object collection.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

multiplyZs

public void multiplyZs(double factor)
                throws IOException,
                       AutomationException
Multiplies all the Z values by a factor.

Description

Multiplies all Zs within the ZAware collection by a given input factor. This is analgous to scaling spatial coordinates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

offsetZs

public void offsetZs(double offset)
              throws IOException,
                     AutomationException
Offsets all the Z values by an offset value.

Description

Offsets all Zs within the ZAware collection by a given input factor. This is analgous to moving spatial coordinates.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isZVertical

public boolean isZVertical()
                    throws IOException,
                           AutomationException
Indicates if at least two consecutive vertices of this polyline or polygon have the same x and y values, but distinct z values.

Description

Returns TRUE when at least two consecutive vertices have the same X and Y coordinates, but different Z attributes. Returns FALSE if all consecutive vertices have different X and Y coordinates, or if they have the same Z attribute.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

interpolateFromSurface

public void interpolateFromSurface(IFunctionalSurface interpolationSurface)
                            throws IOException,
                                   AutomationException
Use the specified functional surface to generate Z values for the vertices of this object.

Description

Sets Z attributes for all Points on the interfaced Geometry within the Domain of the FunctionalSurface equal to the Z value on the FunctionalSurface at each (X, Y) Point.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

interpolateZsBetween

public void interpolateZsBetween(int startPart,
                                 int startPoint,
                                 int endPart,
                                 int endPoint)
                          throws IOException,
                                 AutomationException
Generate Z values by linear interpolation for all vertices in the range [start+1, end-1].

Description

Sets the Z attributes from the vertices between the StartPoint of the startPart and the EndPoint of the endPart. The values of the StartPoint and EndPoint remain unchanged, but all vertices inbetween are assigned Z values proportional to the distance along the curve between the StartPoint and EndPoint and the difference between the Z values of the StartPoint and EndPoint.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interpolateZsBetween in interface IZ
Parameters:
startPart - The startPart (in)
startPoint - The startPoint (in)
endPart - The endPart (in)
endPoint - The endPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculateNonSimpleZs

public void calculateNonSimpleZs()
                          throws IOException,
                                 AutomationException
Calculates the non-simple Z values by extrapolation/interpolation for polylines and interpolation for polygons.

Description

Calculates Z attribute values for each non-simple (NaN) Z value from existing simple (non-NaN) Z attributes on the interfaced Geometry.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setConstantZ

public void setConstantZ(double zLevel)
                  throws IOException,
                         AutomationException
Sets Z coordinates at all vertices to zLevel.

Description

Sets all Z attributes in the object equal to the constant input Z value.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setNonSimpleZs

public void setNonSimpleZs(double zLevel)
                    throws IOException,
                           AutomationException
Replaces undefined (nonsimple) Z values with the specified constant value.

Product Availability

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

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

isPointIDAware

public boolean isPointIDAware()
                       throws IOException,
                              AutomationException
Indicates whether or not the geometry is aware of and capable of handling PointIDs.

Description

Returns or sets the PointID Awareness state of the geometry object. If PointIDAware is TRUE, then the object will recognize that it has PointID attributes and perform operations on them as necessary. If PointIDAware is FALSE, the object will ignore PointIDs while performing operations.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setPointIDAware

public void setPointIDAware(boolean idAware)
                     throws IOException,
                            AutomationException
Indicates whether or not the geometry is aware of and capable of handling PointIDs.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

isPointIDSimple

public boolean isPointIDSimple()
                        throws IOException,
                               AutomationException
Indicates if all PointID values for this geometry are well-defined. Only works if geometry is aware of PointIDs.

Description

PointIDSimple is TRUE when all of the PointIDs are well defined (not equal to 0). If any PointIDs equal 0, PointIDSimple is FALSE.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

dropPointIDs

public void dropPointIDs()
                  throws IOException,
                         AutomationException
Unsets all PointID values without changing awareness. Only works if geometry is aware of PointIDs.

Description

Resets all PointID values to there initial value of 0. PointIDAware does not change.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

checkInvalidate

public void checkInvalidate()
                     throws IOException,
                            AutomationException
Invalidates the spatial index if the geometry has been changed since the index was last constructed.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
checkInvalidate in interface ISpatialIndex2
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.

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.

queryNearestPoint

public void queryNearestPoint(IPoint p,
                              int extension,
                              IPoint nearest)
                       throws IOException,
                              AutomationException
Copies into 'nearest' a point on this geometry nearest to the input point.

Description

Queries the nearest point on a geometry to the input point. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.

Remarks

QueryNearestPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
queryNearestPoint in interface IProximityOperator
Parameters:
p - A reference to a com.esri.arcgis.geometry.IPoint (in)
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
nearest - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
esriSegmentExtension, IProximityOperator.returnNearestPoint(com.esri.arcgis.geometry.IPoint, int)

returnNearestPoint

public IPoint returnNearestPoint(IPoint p,
                                 int extension)
                          throws IOException,
                                 AutomationException
Creates and returns a point on this geometry nearest to the input point.

Description

Finds and returns the nearest point on a geometry to the input point. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.

Remarks

ReturnNearestPoint Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
returnNearestPoint in interface IProximityOperator
Parameters:
p - A reference to a com.esri.arcgis.geometry.IPoint (in)
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
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.
See Also:
esriSegmentExtension, IProximityOperator.queryNearestPoint(com.esri.arcgis.geometry.IPoint, int, com.esri.arcgis.geometry.IPoint)

returnDistance

public double returnDistance(IGeometry other)
                      throws IOException,
                             AutomationException
Returns the minimum distance between two geometries.

Description

Returns the minimum distance between two geometries. If the geometries intersect, the minimum distance is 0. Only returns the distance, and not the nearest points.

Remarks

ReturnDistance Example

The geometry combinations which can be used with ReturnDistance are:

Point: Point, MultiPoint, Envelope, Polyline, Polygon, Line, CircularArc, EllipticArc, BezierCurve.
Multipoint: Point, MultiPoint, Envelope, Polyline, Polygon.
Envelope: Point, MultiPoint, Envelope, Line, CircularArc, EllipticArc, BezierCurve, PolyLine, Polygon.
PolyLine: Point, Multipoint, Envelope, PolyLine, Polygon.
Polygon: Point, Multipoint, Envelope, PolyLine, Polygon.
Line: Point, Envelope, Line, CircularArc, EllipticArc, BezierCurve.
CircularArc: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.
EllipticArc: Point, Envelope, Line, CircularArc (not implemented yet), EllipticArc (not implemented yet), BezierCurve (not implemented yet).
BezierCurve: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.

Note: To get the distance between a segment (Line, CircularArc, EllipticArc, BezierCurve) and a MultiPoint, PolyLine or Polygon, add that segment to a PolyLine.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
returnDistance in interface IProximityOperator
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
The distance
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.

constructBuffers

public IEnumGeometry constructBuffers(int numBuffers,
                                      double[] distances)
                               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.constructBuffers(com.esri.arcgis.geometry.ITopologicalOperator2, double[]).

Constructs a set of buffers at various distances. More efficient than calling Buffer repeatedly on the same geometry. This method is intended for internal use only.

Remarks

use the generic version of this method accesible through the GeometryEnvironment singleton object via the IGeometryBridge interface.

This method is only implemented for polygons and polylines.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructBuffers in interface ITopologicalOperator2
Parameters:
numBuffers - The numBuffers (in)
distances - The distances (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnumGeometry
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clipToDomain

public void clipToDomain()
                  throws IOException,
                         AutomationException
Clips the geometry to the domain of the spatial reference. Useful for ensuring that buffers can be fit within the spatial domain of the feature class to which they are being added.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

setIsKnownSimple

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

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

intersectMultidimension

public IGeometry intersectMultidimension(IGeometry other)
                                  throws IOException,
                                         AutomationException
Constructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.

Remarks

This method only works with the following combination of geometries: Polygon with Polyline (and vice versa), Polyline with Multipoint (and vice versa), Polygon with Multipoint (and vice versa).

When using this method to intersect a Polygon with a Polyline (or vice versa) the geometry returned will be a GeometryBag.

When using this method to intersect a Multipoint with a Polygon (or vice versa) or Multipoint with a Polyline (or vice versa) the geometry returned will be a Multipoint.

If the desired combination of geometries is not available on this function, use Intersect on ITopologicalOperator.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
intersectMultidimension in interface ITopologicalOperator2
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.

isSimpleEx

public boolean isSimpleEx(int[] reason)
                   throws IOException,
                          AutomationException
Determines why a geometry is not simple. Currently only implemented for polygons.

Product Availability

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

Specified by:
isSimpleEx in interface ITopologicalOperator3
Parameters:
reason - A com.esri.arcgis.geometry.esriNonSimpleReasonEnum constant (out: use single element array)
Returns:
The isSimple
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

geoNormalizeEx

public void geoNormalizeEx(ISpatialReference sR,
                           double denseDistance)
                    throws IOException,
                           AutomationException
Shifts longitudes, if need be, into a continuous range of 360 degrees.

Remarks

Not implemented for Multipatches.

Product Availability

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

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

cut2

public IGeometryCollection cut2(IPolyline pCutter)
                         throws IOException,
                                AutomationException
Divides a geometry into multiple parts

Remarks

This method provides a more robust alternative to ITopologicalOperator::Cut. It does not classify the cut polygon pieces as left or right of the cutting polyline. Cut2 is now only available in polygons.

Product Availability

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

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

constructUnionEx

public void constructUnionEx(IEnumGeometry pEnum,
                             boolean bNonPlanar)
                      throws IOException,
                             AutomationException
Defines this geometry to be the union of the inputs, with the option for non-planary result.

Product Availability

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

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

intersectEx

public IGeometry intersectEx(IGeometry other,
                             boolean bNonPlanar,
                             int resultDimension)
                      throws IOException,
                             AutomationException
Constructs the set-theoretic intersection of the inputs in the specified result dimension, , with the option for non-planary result.

Product Availability

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

Specified by:
intersectEx in interface ITopologicalOperator6
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
bNonPlanar - The bNonPlanar (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.

unionEx

public IGeometry unionEx(IGeometry other,
                         boolean bNonPlanar)
                  throws IOException,
                         AutomationException
Constructs the set-theoretic union of the inputs, with the option for non-planary result.

Product Availability

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

Specified by:
unionEx in interface ITopologicalOperator6
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
bNonPlanar - The bNonPlanar (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.

intersectMultidimensionEx

public IGeometry intersectMultidimensionEx(IGeometry other,
                                           boolean bNonPlanar)
                                    throws IOException,
                                           AutomationException
Constructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.

Product Availability

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

Specified by:
intersectMultidimensionEx in interface ITopologicalOperator6
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
bNonPlanar - The bNonPlanar (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.

differenceEx

public IGeometry differenceEx(IGeometry other,
                              boolean bNonPlanar)
                       throws IOException,
                              AutomationException
defined for (multi)points and polylines.

Product Availability

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

Specified by:
differenceEx in interface ITopologicalOperator6
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
bNonPlanar - The bNonPlanar (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.

symmetricDifferenceEx

public IGeometry symmetricDifferenceEx(IGeometry other,
                                       boolean bNonPlanar)
                                throws IOException,
                                       AutomationException
defined for (multi)points and polylines.

Product Availability

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

Specified by:
symmetricDifferenceEx in interface ITopologicalOperator6
Parameters:
other - A reference to a com.esri.arcgis.geometry.IGeometry (in)
bNonPlanar - The bNonPlanar (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.

simplifyAsFeature

public void simplifyAsFeature()
                       throws IOException,
                              AutomationException
Simplifies the geometry using the rules appropriate for this feature.

Product Availability

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

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

hitTest

public boolean hitTest(IPoint queryPoint,
                       double searchRadius,
                       int geometryPart,
                       IPoint hitPoint,
                       double[] hitDistance,
                       int[] hitPartIndex,
                       int[] hitSegmentIndex,
                       boolean[] bRightSide)
                throws IOException,
                       AutomationException
Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

Remarks

The segment index returned has different meanings depending on the esriGeometryHitPartType used (Please see the example for more details).


EsriGeometryPartVertex: returns a vertex index


EsriGeometryPartBoundary, esriGeometryPartMidpoint and esriGeometryPartEndpoint: return a segment index


EsriGeometryPartCentroid: Always returns 0 for the part index and the segment index.

brightside: Indicates if the input point is on the right side of the input geometry

Note: The distance units use in this method are the units of the input geometry. No conversion is performed. esriGeometryHitPartType parameter cannot be a combination of several esriGeometryHitPartTypes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
hitTest in interface IHitTest
Parameters:
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
geometryPart - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
hitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
hitDistance - The hitDistance (in/out: use single element array)
hitPartIndex - The hitPartIndex (in/out: use single element array)
hitSegmentIndex - The hitSegmentIndex (in/out: use single element array)
bRightSide - The bRightSide (in/out: use single element array)
Returns:
The bHit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTest3D

public boolean hitTest3D(IPoint queryPoint,
                         double searchRadius,
                         int geometryPart,
                         IPoint hitPoint,
                         double[] hitDistance,
                         int[] hitPartIndex,
                         int[] hitSegmentIndex)
                  throws IOException,
                         AutomationException
Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

Product Availability

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

Specified by:
hitTest3D in interface IHitTest3D
Parameters:
queryPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
searchRadius - The searchRadius (in)
geometryPart - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
hitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
hitDistance - The hitDistance (in/out: use single element array)
hitPartIndex - The hitPartIndex (in/out: use single element array)
hitSegmentIndex - The hitSegmentIndex (in/out: use single element array)
Returns:
The bHit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

hitTestCone

public boolean hitTestCone(IRay pQueryRay,
                           double minAngle,
                           int geometryPart,
                           IPoint pHitPoint,
                           double[] pHitDistance,
                           int[] pHitPartIndex,
                           int[] pHitSegmentIndex)
                    throws IOException,
                           AutomationException
Locates a part of a geometry closest to a query ray.

Product Availability

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

Specified by:
hitTestCone in interface IHitTest3D
Parameters:
pQueryRay - A reference to a com.esri.arcgis.geometry.IRay (in)
minAngle - The minAngle (in)
geometryPart - A com.esri.arcgis.geometry.esriGeometryHitPartType constant (in)
pHitPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
pHitDistance - The pHitDistance (in/out: use single element array)
pHitPartIndex - The pHitPartIndex (in/out: use single element array)
pHitSegmentIndex - The pHitSegmentIndex (in/out: use single element array)
Returns:
The pbHit
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructOffset

public void constructOffset(IPolycurve inCurve,
                            double offset,
                            Object offsetHow,
                            Object bevelRatio)
                     throws IOException,
                            AutomationException
Constructs a curve being the locus of points offset a given distance from another curve. See the enumeration esriConstructOffsetEnum to information on different ways that offset curve can be generated.

Description

ConstructOffset constructs the offset of the given input Polycurve. If the offset parameter is positive, the constructed offset will be on the right side of the curve (left side offsets are constructed with negative offset parameters). Tracing the curve from it's first vertex to the last will give you a direction along the curve. It is to the right and left respective of this direction that the positive and negative parameters will dictate where the offset is constructed. In these terms it is simple to infer where the offset of even horizontal polycurves will be constructed. The offsetHow parameter determines how outer corners between segments are handled. Rounded offset rounds the corner between extended offsets. Bevelled offset squares off the corner after a given ratio distance. Mitered offset attempts to allow extended offsets to naturally intersect, but if that intersection occurs too far from the corner, the corner is eventually bevelled off at a fixed distance.

Remarks

This results produced by this method are sensitive to large offset distances, particularly when the offset distance is larger than the length of the segments in the reference geometry. The remove self intersecting arcs feature is particularly problematic when extremely large offsets are involved.

The sides of the curve are determined from the order of the vertices of the curve. Tracing the curve from the first vertex to the last will give you a direction along the curve it is to the right and left of this direction that the positive and negative parameters will dictate where the offset is constructed. In these terms it is simple to infer where the offset will be constructed.

One alternative is to use buffer to generate the offsets.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructOffset in interface IConstructCurve
Parameters:
inCurve - A reference to a com.esri.arcgis.geometry.IPolycurve (in)
offset - The offset (in)
offsetHow - A Variant (in, optional, pass null if not required)
bevelRatio - A Variant (in, optional, pass null if not required)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructKoch

public void constructKoch(IPolycurve p,
                          double r,
                          int recursionLevel)
                   throws IOException,
                          AutomationException
Constructs a Koch snowflake fractal using the input polycurve as the generator. 'r' is not used. Do not use a value for recursionLevel > 10.

Description

ConstructKoch creates a Koch fractal from the given input curve. It treats all segments as linear segments (ie. All CircularArcs, BezierCurves, and EllipticArc as treated like lines between the From and To Points.).

Remarks

ConstructCurve ConstructKoch Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructKoch in interface IConstructCurve
Parameters:
p - A reference to a com.esri.arcgis.geometry.IPolycurve (in)
r - The r (in)
recursionLevel - The recursionLevel (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

constructExtended

public void constructExtended(ICurve fromCurve,
                              ICurve toCurve,
                              int extensionFlags,
                              boolean[] extensionsPerformed)
                       throws IOException,
                              AutomationException
Constructs an extended version of the 'from' curve that goes to the 'to' curve. The flags are bit-wise combined esriCurveExtension values.

Remarks

This method will return an empty geometry if you attempt to create a polygon from two linear

geometries as input. This is not a way to create a polygon from two polylines.

If the input curve is a polygon the result will be a copy of the polygon.

The flags are bit-wise combined esriCurveExtension values.

ConstructCurve ConstructExtended Example

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
constructExtended in interface IConstructCurve
Parameters:
fromCurve - A reference to a com.esri.arcgis.geometry.ICurve (in)
toCurve - A reference to a com.esri.arcgis.geometry.ICurve (in)
extensionFlags - The extensionFlags (in)
extensionsPerformed - The extensionsPerformed (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

approximateByBeziers

public void approximateByBeziers(IPolycurve pInCurve,
                                 Object pMaxDistance,
                                 Object smoothClosedParts)
                          throws IOException,
                                 AutomationException
Constructs a curve which approximates the input curve by a small number of Bezier segments.

Description

ApproximateByBeziers constructs a curve consisting Bezier segments that being the approximation of input polycurve inCurve. The maxDistance parameter defines the maximum distance between the vertices of the input curve to the generated curve. If maxDistance is zero then for each segment of inCurve there is one Bezier segment created for this geometry. The parameter smoothClosedParts defines whether or not the last segment of the input polyline curve which is closed should be smoothed with the first segment of the curve. The smoothClosedParts parameter is only used if both this geometry and inCurve are polylines. If this geometry or inCurve is a polygon then smoothClosedParts is overwritten and set to true.

The resulting geometry is a polygon or polyline depending on the type of "this geometry" rather than the type of inCurve. If "this geometry" is a polygon and inCurve is a polyline with any open path, an error is returned (result is an empty polygon).

Product Availability

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

Specified by:
approximateByBeziers in interface IConstructCurve2
Parameters:
pInCurve - A reference to a com.esri.arcgis.geometry.IPolycurve (in)
pMaxDistance - A Variant (in, optional, pass null if not required)
smoothClosedParts - A Variant (in, optional, pass null if not required)
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.

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.

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.

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.

move3D

public void move3D(double dx,
                   double dy,
                   double dz)
            throws IOException,
                   AutomationException
Moves the object by dx, dy and dz along the x, y, and z axes respectively.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

moveVector3D

public void moveVector3D(IVector3D v)
                  throws IOException,
                         AutomationException
Moves the object by an offset defined by a 3D vector.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

scale3D

public void scale3D(IPoint origin,
                    double sx,
                    double sy,
                    double sz)
             throws IOException,
                    AutomationException
Scales the object about the specified origin point. sx, sy, and sz are the scaling factors for the x, y, and z dimensions repectively.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

rotateVector3D

public void rotateVector3D(IVector3D axis,
                           double rotationAngle)
                    throws IOException,
                           AutomationException
Rotates the object about axis defined by the specified vector through an angle measured in radians.

Remarks

The angle of rotation must be in radians. To convert to radians from decimal degrees, multiply by PI/180.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

transform3D

public void transform3D(int direction,
                        ITransformation3D transformation)
                 throws IOException,
                        AutomationException
Applies an arbitrary 3D transformation.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

projectToPlane

public IGeometry projectToPlane(IPoint planarOrigin,
                                IVector3D planarPositiveX,
                                IVector3D planarNorm)
                         throws IOException,
                                AutomationException
Generates a polygon footprint for the object in an arbitrary plane. The footprint may have multiple parts.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
projectToPlane in interface ITransform3D
Parameters:
planarOrigin - A reference to a com.esri.arcgis.geometry.IPoint (in)
planarPositiveX - A reference to a com.esri.arcgis.geometry.IVector3D (in)
planarNorm - A reference to a com.esri.arcgis.geometry.IVector3D (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.

serialize

public void serialize(IXMLSerializeData data)
               throws IOException,
                      AutomationException
Serializes an object to XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

deserialize

public void deserialize(IXMLSerializeData data)
                 throws IOException,
                        AutomationException
Deserializes an object from XML.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

snap

public void snap()
          throws IOException,
                 AutomationException
Snaps ms to the precision of the spatial reference associated with the geometry. M snapping does not happen automatically as part of calling IGeometry::SnapToSpatialReference.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

densify3D

public void densify3D(double maxSegmentLength,
                      double maxDeviation)
               throws IOException,
                      AutomationException
Converts this Polycurve into a piecewise linear approximation of itself.

Description

Converts Polycurve into a Polycurve composed of Line segments with 3D length maxSegmentLength (or less) that are within maxDeviation of the original polycurve. If maxDeviation = 0, maxDeviation is ignored and Line segments with length maxSegmentLength are constructed with vertices laying on the original curve. All of the segments in the final polyline will be 3D Lines.

Product Availability

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

Specified by:
densify3D in interface IPolycurve3D
Parameters:
maxSegmentLength - The maxSegmentLength (in)
maxDeviation - The maxDeviation (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

generalize3D

public void generalize3D(double maxAllowableOffset)
                  throws IOException,
                         AutomationException
Generalizes this polycurve using the Douglas-Poiker algorithm.

Description

Generalizes each part of a Polycurve into a generalized collection of Line segments. Generalize3D performs a Douglas-Poiker Generalization algorithm, extended to operate in 3D space, with a specified maximum offset tolerance, given in 3D, as input. For Line segments, the Generalized output is a subset of the original input vertices. For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Product Availability

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

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

weed3D

public void weed3D(double maxAllowableOffsetFactor)
            throws IOException,
                   AutomationException
Generalizes using a small tolerance based upon either the system units of the geometry's spatial reference, or the geometry's bounding box.

Description

Weed generalizes each part of a Polycurve into a generalized collection of z aware Line segments. Weed performs a Douglas-Poiker Generalization algorithm, extended to operate in 3D space, with a specified multiple of the internal tolerance given as input. For Line segments, the Generalized output is a subset of the original input vertices. For non-Linear segments, the Generalized output contains points along all parts of the curve, not necessarily only the vertices.

Product Availability

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

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

getLength3D

public double getLength3D()
                   throws IOException,
                          AutomationException
The length of the curve.

Description

Returns the 3D length of the entire curve. The length of the curve is the sum of the lengths along each parameterized Segment between vertices along the curve.

Product Availability

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

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

queryPoint3D

public void queryPoint3D(int extension,
                         double distanceAlongCurve,
                         boolean bAsRatio,
                         IPoint pOutPoint)
                  throws IOException,
                         AutomationException
Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.

Description

Returns the Point at a given 3D distance along the curve or extended curve. If the distance is less than the length of the curve, then the returned point is the point at that distance along the curve. If the distance is less than zero, or greater than the length of the curve, then the returned point is on the curve specified by the extension method. The distance may be specified as a fixed unit of measure or a ratio of the 3D length of the curve.

Product Availability

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

Specified by:
queryPoint3D in interface ICurve3D
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
distanceAlongCurve - The distanceAlongCurve (in)
bAsRatio - The bAsRatio (in)
pOutPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubcurve3D

public void getSubcurve3D(double fromDistance,
                          double toDistance,
                          boolean bAsRatio,
                          ICurve3D[] ppOutSubCurve)
                   throws IOException,
                          AutomationException
Extracts a portion of this curve into a new curve.

Description

Gets the subcurve between the specified points along the original curve and creates a new curve. The elements in the new subcurve are the same type and have the same properties as the elements of the original curve.

Product Availability

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

Specified by:
getSubcurve3D in interface ICurve3D
Parameters:
fromDistance - The fromDistance (in)
toDistance - The toDistance (in)
bAsRatio - The bAsRatio (in)
ppOutSubCurve - A reference to a com.esri.arcgis.geometry.ICurve3D (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

queryPointAndDistance3D

public void queryPointAndDistance3D(int extension,
                                    IPoint pInPoint,
                                    boolean bAsRatio,
                                    IPoint pOutPoint,
                                    double[] pDistanceAlongCurve,
                                    double[] pDistanceFromCurve)
                             throws IOException,
                                    AutomationException
Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.

Description

Finds the Point on the specified extended curve nearest to the input point and the distance between those points. Also returns information about the side of the curve the input point is on as well as the distance along the curve that the nearest point occurs. The operation is performed in 3D space.

Product Availability

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

Specified by:
queryPointAndDistance3D in interface ICurve3D
Parameters:
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
pInPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
bAsRatio - The bAsRatio (in)
pOutPoint - A reference to a com.esri.arcgis.geometry.IPoint (in)
pDistanceAlongCurve - The pDistanceAlongCurve (in/out: use single element array)
pDistanceFromCurve - The pDistanceFromCurve (in/out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isClosed3D

public boolean isClosed3D()
                   throws IOException,
                          AutomationException
Indicates if 'from' and 'to' points (of each part) are identical.

Product Availability

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

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

queryNearestPoint3D

public void queryNearestPoint3D(IPoint pInP,
                                int extension,
                                IPoint pNearest)
                         throws IOException,
                                AutomationException
Copies into 'nearest' a point on this geometry nearest to the input point.

Description

Queries the nearest point on a z aware geometry to the input point in 3D space. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

Product Availability

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

Specified by:
queryNearestPoint3D in interface IProximityOperator3D
Parameters:
pInP - A reference to a com.esri.arcgis.geometry.IPoint (in)
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
pNearest - A reference to a com.esri.arcgis.geometry.IPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

returnNearestPoint3D

public IPoint returnNearestPoint3D(IPoint pInP,
                                   int extension)
                            throws IOException,
                                   AutomationException
Creates and returns a point on this geometry nearest to the input point.

Description

Finds and returns the nearest point, in 3D space, on a z aware geometry to the input point. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

Product Availability

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

Specified by:
returnNearestPoint3D in interface IProximityOperator3D
Parameters:
pInP - A reference to a com.esri.arcgis.geometry.IPoint (in)
extension - A com.esri.arcgis.geometry.esriSegmentExtension constant (in)
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.

returnDistance3D

public double returnDistance3D(IGeometry pOther)
                        throws IOException,
                               AutomationException
Returns the minimal distance between two geometries.

Description

Returns the minimum distance between two z aware geometries in 3D space. If the geometries intersect, the minimum distance is 0. Only returns the distance, and not the nearest points.

Product Availability

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

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

disjoint3D

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

Description

Determines whether two z aware geometries intersect in 3D space. Two geometries are disjoint if their intersection is empty. Two geometries intersect if disjoint is FALSE.

Product Availability

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

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

isNear3D

public boolean isNear3D(IGeometry pOther,
                        double distance)
                 throws IOException,
                        AutomationException
Indicates if this geometry is within distance from the other geometry; both geometries must have Zs.

Product Availability

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

Specified by:
isNear3D in interface IRelationalOperator3D2
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.

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