com.esri.arcgis.geometry
Interface IGeometryServer2

All Superinterfaces:
IGeometryServer, Serializable
All Known Subinterfaces:
IGeometryServer3
All Known Implementing Classes:
GeometryServer, GeometryServerImpl

public interface IGeometryServer2
extends IGeometryServer, Serializable

Provides access to more standard operations on geometric 'value' objects. The input geometries are never modified by these operations. Designed for use in building web services or other kinds of distributed applications.

Product Availability

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


Method Summary
 IPolygonArray autoComplete(ISpatialReference pSR, IPolygonArray pInPolygons, IPolylineArray pCompletionLines)
          Discovers polygons bounded by existing polygons and input linework.
 IGeometry convexHull(ISpatialReference pSR, IGeometryArray pInGeometryArray)
          Computes the convex hull of the input geometries
 IGeometryArray cut(ISpatialReference pSR, IGeometryArray pTargets, IPolyline pCutter, ILongArray[] ppCutIndexes)
          Cuts the target polyline or polygon Cutter.
 IGeometryArray densifyGeodesic(ISpatialReference pSR, IGeometryArray pInGeometries, double maxSegmentLength, ILinearUnit pLengthUnit)
          Densifies geometries by plotting points along the geodesics between existing vertices (uses IPolycurve4::GeodesicDensify).
 IGeometryArray difference(ISpatialReference pSR, IGeometryArray pInGA1, IGeometry pInG2)
          Returns an array of geometries where each result geometry R[i] is (array1[i] difference G2).
 IGeometryArray generalize(ISpatialReference pSR, IGeometryArray pInGA, double maxDeviation, ILinearUnit pDeviationUnit)
          Returns generalized (Douglas-Poiker) versions of the input polylines and polygons (uses IPolycurve::Generalize).
 void getAreasAndLengths2(ISpatialReference pSR, IPolygonArray pInPolygons, ILinearUnit pLengthUnit, ILinearUnit pAreaUnit, int areaUnitEnum, IDoubleArray[] ppAreas, IDoubleArray[] ppLengths)
          Calculates areas and perimeter lengths for each polygon in the specified array.
 double getDistance(ISpatialReference pSR, IGeometry pG1, IGeometry pG2, ILinearUnit pDistanceUnit)
          Reports shortest distance between G1 and G2.
 double getDistanceGeodesic(ISpatialReference pSR, IGeometry pG1, IGeometry pG2, ILinearUnit pDistanceUnit)
          Reports the shortest geodesic distance between G1 and G2.
 IDoubleArray getLengths2(ISpatialReference pSR, IPolylineArray pInPolylines, ILinearUnit pLengthUnit)
          Calculates the length of eacch polyline in the specified array.
 IDoubleArray getLengthsGeodesic(ISpatialReference pSR, IPolylineArray polylines, ILinearUnit pLengthUnit)
          Returns geodesic length of each Polyline.
 IGeometryArray intersect(ISpatialReference pSR, IGeometryArray pInGA1, IGeometry pInG2)
          Returns an array of geometries where each result geometry R[i] is (array1[i] intersect G2.
 IGeometryArray offset(ISpatialReference pSR, IGeometryArray pInGA, double offsetDistance, ILinearUnit pOffsetUnit, int offsetHow, double bevelRatio)
          Returns an array of polylines and polygons that are offset versions of the input polylines and polygons (uses ITopologicalOperator::ConstructOffset).
 IGeometry reshape(ISpatialReference pSR, IGeometry pTarget, IPolyline pReshaper)
          Reshapes the target polyline or polygon.
 IPolylineArray trimExtend(ISpatialReference pSR, IPolylineArray pInPA, IPolyline pTrimExtendTo, int extendHow)
          Trims or extends each polyline in the input array using TrimExtendTo (uses IConstructCurve::ConstructExtended for extension operation).
 IGeometry union(ISpatialReference pSR, IGeometryArray pInGA)
          Returns the topological union of the input geometries (uses ITopologicalOperator::ConstructUnion).
 
Methods inherited from interface com.esri.arcgis.geometry.IGeometryServer
buffer, densify, findSRByWKID, findSRByWKT, findUnitsByWKID, findUnitsByWKT, getAreasAndLengths, getLabelPoints, getLengths, project, relation, simplify
 

Method Detail

getAreasAndLengths2

void getAreasAndLengths2(ISpatialReference pSR,
                         IPolygonArray pInPolygons,
                         ILinearUnit pLengthUnit,
                         ILinearUnit pAreaUnit,
                         int areaUnitEnum,
                         IDoubleArray[] ppAreas,
                         IDoubleArray[] ppLengths)
                         throws IOException,
                                AutomationException
Calculates areas and perimeter lengths for each polygon in the specified array. Optionally does unit conversion.

Remarks

The area and length values are computed in the units specified as input parameters, if they are present, otherwise they are computed in the units of the spatial reference. It is not recommended that this method be used on geometries having latitude-longitude coordinates. You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInPolygons - A reference to a com.esri.arcgis.geometry.IPolygonArray (in)
pLengthUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
pAreaUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
areaUnitEnum - A com.esri.arcgis.system.esriAreaUnits constant (in)
ppAreas - A reference to a com.esri.arcgis.system.IDoubleArray (out: use single element array)
ppLengths - A reference to a com.esri.arcgis.system.IDoubleArray (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLengths2

IDoubleArray getLengths2(ISpatialReference pSR,
                         IPolylineArray pInPolylines,
                         ILinearUnit pLengthUnit)
                         throws IOException,
                                AutomationException
Calculates the length of eacch polyline in the specified array. Optionally does unit conversion.

Remarks

The length values are computed in the specified linear units, if present, or in the units of the spatial reference. It is not recommended that this method be used on geometries having latitude-longitude coordinates, since the length would then be calculated in units of "degrees". You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitude-longitude coordinates.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInPolylines - A reference to a com.esri.arcgis.geometry.IPolylineArray (in)
pLengthUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
A reference to a com.esri.arcgis.system.IDoubleArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

densifyGeodesic

IGeometryArray densifyGeodesic(ISpatialReference pSR,
                               IGeometryArray pInGeometries,
                               double maxSegmentLength,
                               ILinearUnit pLengthUnit)
                               throws IOException,
                                      AutomationException
Densifies geometries by plotting points along the geodesics between existing vertices (uses IPolycurve4::GeodesicDensify).

Remarks

Densifies each polyline or polygon in the input array by plotting points along the geodesic paths between existing vertices. MaxSegmentLength is expressed in some linear unit of measure. If the LengthUnit parameter is specified, then MaxSegmentLength is expressed in those units. If the LengthUnit parameter is not specified, then MaxSegmentLength is expressed in the the linear units of the input spatial reference, if the spatial reference is a projected coordinate system. Otherwise, it is assumed to be expressed in meters.

If the spatial reference is a projected coordinate system, then the input geometries will be inversed projected, geodesic path points will be plotted, and the result will be forward projected into the same spatial reference.

The figure below illustrates the DensifyGeodesic operation applied to a polyline with 3 vertices, with a max output segment length of 10,000 meters.

DensifyGeodesic

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGeometries - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
maxSegmentLength - The maxSegmentLength (in)
pLengthUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getLengthsGeodesic

IDoubleArray getLengthsGeodesic(ISpatialReference pSR,
                                IPolylineArray polylines,
                                ILinearUnit pLengthUnit)
                                throws IOException,
                                       AutomationException
Returns geodesic length of each Polyline.

Remarks

The returned lengths are expressed in the specified linear units, if present, or in the units of the spatial reference. If LengthUnit is not specified and the input spatial reference is a geographic coordinate system, then the lengths are expressed in meters. This method calculates the ellipsoidal shortest path distance between each pair of the vertices in the polylines.

The spatial reference can be a projected or a geographic coordinate system. If the former, then the geometries are first inverse projected into its associated geographic coordinate system and then the distance calculations are performed.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
polylines - A reference to a com.esri.arcgis.geometry.IPolylineArray (in)
pLengthUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
A reference to a com.esri.arcgis.system.IDoubleArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDistance

double getDistance(ISpatialReference pSR,
                   IGeometry pG1,
                   IGeometry pG2,
                   ILinearUnit pDistanceUnit)
                   throws IOException,
                          AutomationException
Reports shortest distance between G1 and G2.

Remarks

The distance value is computed in the specified linear units, if present, or in the units of the spatial reference. It is not recommended that this method be used on geometries with lat-long coordinates. Use GetDistanceGeodesic instead.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pG1 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pG2 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pDistanceUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
The pDistance
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

union

IGeometry union(ISpatialReference pSR,
                IGeometryArray pInGA)
                throws IOException,
                       AutomationException
Returns the topological union of the input geometries (uses ITopologicalOperator::ConstructUnion). The input geometries must have the same dimension (0d, 1d, 2d).

Remarks

This operation constructs the set-theoretic union of the geometries in the input array. All inputs must be of the same type.

Union

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGA - A reference to a com.esri.arcgis.geometry.IGeometryArray (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.

intersect

IGeometryArray intersect(ISpatialReference pSR,
                         IGeometryArray pInGA1,
                         IGeometry pInG2)
                         throws IOException,
                                AutomationException
Returns an array of geometries where each result geometry R[i] is (array1[i] intersect G2. If G2 is an Envelope, then this is clipping.

Remarks

This operation constructs the set-theoretic intersection between each element of the input array and InGeometry2. Each result is placed at the corresponding index in the output array – that is, Result[i] = InGeometryArray1[i] Intersect InGeometry2. If inGeometryArray1[i] and InGeometry2 disjoint, the output is an empty geometry of the type with the minimum dimension between inGeometryArray1[i] and InGeometry2.

The figure below shows an example of the intersect operation. The input geometry array contains all geometries shown on the left of the figure with the exception of the central circular polygon. The output array contains the modified geometries shown in the right part of the figure. Note that two of the output points will be “empty” because their corresponding inputs are outside the circular polygon.

Intersect

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGA1 - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
pInG2 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

difference

IGeometryArray difference(ISpatialReference pSR,
                          IGeometryArray pInGA1,
                          IGeometry pInG2)
                          throws IOException,
                                 AutomationException
Returns an array of geometries where each result geometry R[i] is (array1[i] difference G2).

Remarks

This operation constructs the set-theoretic difference between each element of the input array and InGeometry2. Each result is placed at the corresponding index in the output array – that is, Result[i] = InGeometryArray1[i] Difference InGeometry2. The only restriction on combinations of geometry types is that the dimension of InGeometry2 must be equal to or greater than the dimensions of the elements of InGeometryArray1. Any inputs that are completely within InGeometry2 are represented by empty geometries of the same type in the output array.

The figure below shows an example of the difference operation. The geometry array contains all geometries shown with the exception of the central circular polygon. The output array contains the modified geometries shown in the right part of the figure. Note that one of the output points will be “empty” because the corresponding input is inside the circular polygon.

Difference

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGA1 - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
pInG2 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

cut

IGeometryArray cut(ISpatialReference pSR,
                   IGeometryArray pTargets,
                   IPolyline pCutter,
                   ILongArray[] ppCutIndexes)
                   throws IOException,
                          AutomationException
Cuts the target polyline or polygon Cutter.

Remarks

The target of the cut operation may be either a polyline or a polygon.

When it is a polyline, 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. The left pieces are returned in the first element of the output array and the right pieces are returned in the second element. Parts of the target polyline that do not intersect the cutting polyline are discarded. Figure below shows an example. The orientation of the cutter line is indicated with a red arrowhead. Notice that a polyline part is also cut when the cutter line just touches it (as opposed to crossing it). The lower right input part was not included in the output because it did not intersect the cutting line. The cutting line can also have multiple parts. The left/right decision is made per part.

Cut1

The next figure shows an example of a cutting operation with a multipart cutting polyline. The orientation of each cutting part is shown with a red arrowhead. The ‘left’ result has been requested and is shown in the right box of the figure.

Cut2

When the target is a polygon, the left/right classification it not done. The polygon pieces are returned in order of ascending area. In the figure below, the first cut part returned is to the right of the oriented cutting line, but it has the smallest area. Input parts that do not intersect the cutting line are discarded. The cutting line can be multi-part. See figure below.

Cut3

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pTargets - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
pCutter - A reference to a com.esri.arcgis.geometry.IPolyline (in)
ppCutIndexes - A reference to a com.esri.arcgis.system.ILongArray (out: use single element array)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

trimExtend

IPolylineArray trimExtend(ISpatialReference pSR,
                          IPolylineArray pInPA,
                          IPolyline pTrimExtendTo,
                          int extendHow)
                          throws IOException,
                                 AutomationException
Trims or extends each polyline in the input array using TrimExtendTo (uses IConstructCurve::ConstructExtended for extension operation).

Remarks

Trims (cuts) polylines that intersect the trim-extend line, or extends polylines to it that don’t intersect it. See the figure below for some examples. The details of how polylines are extended can be controlled by adding together combinations of the values listed in the table below.

values to be used with the trim-extend operation

Constant

Value

Description

esriDefaultCurveExtension

0

By default, extension considers both ends of paths. The old ends remain and new points are added at the extended ends. The new points have attributes that are extrapolated from adjacent existing segments.

esriRelocateEnds

1

If an extension is performed at an end, relocate the end point to the new position instead of leaving the old point and adding a new point at the new position.

esriKeepEndAttributes

2

If an extension is performed at an end, do not extrapolate the end-segment's attributes for the new point. Instead, make its attributes the same as the current end. Incompatible with esriNoAttributes.

esriNoEndAttributes

4

If an extension is performed at an end, do not extrapolate the end-segment's attributes for the new point. Instead, make its attributes be empty. Incompatible with esriKeepAttributes.

esriNoExtendAtFrom

8

Do not extend the 'from' end of any path.

esriNoExtendAtTo

16

Do not extend the 'to' end of any path.

TrimExtend

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInPA - A reference to a com.esri.arcgis.geometry.IPolylineArray (in)
pTrimExtendTo - A reference to a com.esri.arcgis.geometry.IPolyline (in)
extendHow - The extendHow (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPolylineArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

offset

IGeometryArray offset(ISpatialReference pSR,
                      IGeometryArray pInGA,
                      double offsetDistance,
                      ILinearUnit pOffsetUnit,
                      int offsetHow,
                      double bevelRatio)
                      throws IOException,
                             AutomationException
Returns an array of polylines and polygons that are offset versions of the input polylines and polygons (uses ITopologicalOperator::ConstructOffset).

Remarks

The offset operation creates a geometry that is a constant distance from an input polyline or polygon. It is similar to buffering, but produces a one sided result. If offsetDistance > 0, then the offset geometry is constructed to the right of the oriented input geometry, otherwise it is constructed to the left. For a polygon, the orientation of outer rings is clockwise and for inner rings it is counter clockwise. So the “right side” of a polygon is always its inside.

bevelRatio is multiplied by the offset distance and the result determines how far a mitered offset intersection can be from the input curve before it is beveled or rounded. When esriGeometryOffsetMitered is specified, the input bevel ratio is ignored and 10 is used internally.When esriGeometryOffsetBevelled is specified, 1.1 will be used if bevelRatio is not specified.

The figures below show some examples of offsetting polylines. The red arrowhead shows the orientation of the input polyline.

Offset

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGA - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
offsetDistance - The offsetDistance (in)
pOffsetUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
offsetHow - The offsetHow (in)
bevelRatio - The bevelRatio (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

generalize

IGeometryArray generalize(ISpatialReference pSR,
                          IGeometryArray pInGA,
                          double maxDeviation,
                          ILinearUnit pDeviationUnit)
                          throws IOException,
                                 AutomationException
Returns generalized (Douglas-Poiker) versions of the input polylines and polygons (uses IPolycurve::Generalize).

Remarks

The Generalize operation applies Douglas-poiker line generalization to each element of the input array. The results are placed in corresponding indexes of the output array. If DeviationUnit is specified, then MaxDeviation is expressed in those units, otherwise it is expressed in the units of the spatial reference.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGA - A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
maxDeviation - The maxDeviation (in)
pDeviationUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reshape

IGeometry reshape(ISpatialReference pSR,
                  IGeometry pTarget,
                  IPolyline pReshaper)
                  throws IOException,
                         AutomationException
Reshapes the target polyline or polygon. The reshaping polyline can have only one part. If the target was not reshaped, an empty geometry of the saem type is returned.

Remarks

Reshapes the target polyline or polygon. The reshaping polyline can have only one part. If the reshaper does not intersect the target polyline, or does not define a closed loop for the target polygon, then an empty geometry of the same type as the target geometry is returned. The orientation of the reshaper is not considered. The following rules for polygon and polyline reshaping are used:

Polygons:. only one ring (part) is explicitly reshaped – the first one in index order that intersects the reshaping path. The longest portion of the original ring boundary is preserved. The reshaped polygon is re-simplified after the reshape operation has been applied, so the rules for simplification will determine what happens if multiple rings interact with the reshaping path. The graphics show how preserving the longest portion of the boundary can invert the ring in some cases. If more complicated reshaping behavior is desired, a combination of auto-complete, cutting and union can be used.

Reshape1

Polylines: multiple paths (parts) can be affected by the reshaping path. The following graphics show three cases. The polyline being reshaped has part sequence and part orientations shown in red in the upper left graphic. The reshape is shown on the left of each row. The result is shown on the right of each row.

Reshape2

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pTarget - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pReshaper - A reference to a com.esri.arcgis.geometry.IPolyline (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

IGeometry convexHull(ISpatialReference pSR,
                     IGeometryArray pInGeometryArray)
                     throws IOException,
                            AutomationException
Computes the convex hull of the input geometries

Remarks

The convex hull of a set of points, polylines and polygons is shown below. If all the inputs are collinear, than a polyline will be returned instead of a polygon. If all inputs are located at a single point, then that point will be returned.

ConvexHull.jpg

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInGeometryArray - A reference to a com.esri.arcgis.geometry.IGeometryArray (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.

autoComplete

IPolygonArray autoComplete(ISpatialReference pSR,
                           IPolygonArray pInPolygons,
                           IPolylineArray pCompletionLines)
                           throws IOException,
                                  AutomationException
Discovers polygons bounded by existing polygons and input linework.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pInPolygons - A reference to a com.esri.arcgis.geometry.IPolygonArray (in)
pCompletionLines - A reference to a com.esri.arcgis.geometry.IPolylineArray (in)
Returns:
A reference to a com.esri.arcgis.geometry.IPolygonArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDistanceGeodesic

double getDistanceGeodesic(ISpatialReference pSR,
                           IGeometry pG1,
                           IGeometry pG2,
                           ILinearUnit pDistanceUnit)
                           throws IOException,
                                  AutomationException
Reports the shortest geodesic distance between G1 and G2.

Remarks

The distance value is computed in the specified linear units, if present, or in the units of the spatial reference. If SpatialReference is a projected coordinate system, the input geometries will first be inverse projected and then shortest geodesic distance will be computed on the latitude-longitude coordinates.

Product Availability

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

Parameters:
pSR - A reference to a com.esri.arcgis.geometry.ISpatialReference (in)
pG1 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pG2 - A reference to a com.esri.arcgis.geometry.IGeometry (in)
pDistanceUnit - A reference to a com.esri.arcgis.geometry.ILinearUnit (in)
Returns:
The pDistanceGeodesic
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.