

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface IGeometryServer2
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.
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 (DouglasPoiker) 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 

void getAreasAndLengths2(ISpatialReference pSR, IPolygonArray pInPolygons, ILinearUnit pLengthUnit, ILinearUnit pAreaUnit, int areaUnitEnum, IDoubleArray[] ppAreas, IDoubleArray[] ppLengths) throws IOException, AutomationException
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 latitudelongitude coordinates. You can use the GetLengthsGeodesic method to compute accurate lengths for polylines with latitudelongitude coordinates.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IDoubleArray getLengths2(ISpatialReference pSR, IPolylineArray pInPolylines, ILinearUnit pLengthUnit) throws IOException, AutomationException
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 latitudelongitude 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 latitudelongitude coordinates.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray densifyGeodesic(ISpatialReference pSR, IGeometryArray pInGeometries, double maxSegmentLength, ILinearUnit pLengthUnit) throws IOException, AutomationException
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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IDoubleArray getLengthsGeodesic(ISpatialReference pSR, IPolylineArray polylines, ILinearUnit pLengthUnit) throws IOException, AutomationException
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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.double getDistance(ISpatialReference pSR, IGeometry pG1, IGeometry pG2, ILinearUnit pDistanceUnit) throws IOException, AutomationException
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 latlong coordinates. Use GetDistanceGeodesic instead.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometry union(ISpatialReference pSR, IGeometryArray pInGA) throws IOException, AutomationException
This operation constructs the settheoretic union of the geometries in the input array. All inputs must be of the same type.
pSR
 A reference to a com.esri.arcgis.geometry.ISpatialReference (in)pInGA
 A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray intersect(ISpatialReference pSR, IGeometryArray pInGA1, IGeometry pInG2) throws IOException, AutomationException
This operation constructs the settheoretic 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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray difference(ISpatialReference pSR, IGeometryArray pInGA1, IGeometry pInG2) throws IOException, AutomationException
This operation constructs the settheoretic 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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray cut(ISpatialReference pSR, IGeometryArray pTargets, IPolyline pCutter, ILongArray[] ppCutIndexes) throws IOException, AutomationException
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.
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.
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 multipart. See figure below.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IPolylineArray trimExtend(ISpatialReference pSR, IPolylineArray pInPA, IPolyline pTrimExtendTo, int extendHow) throws IOException, AutomationException
Trims (cuts) polylines that intersect the trimextend 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 trimextend operation
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 endsegment'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 endsegment'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. 
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray offset(ISpatialReference pSR, IGeometryArray pInGA, double offsetDistance, ILinearUnit pOffsetUnit, int offsetHow, double bevelRatio) throws IOException, AutomationException
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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometryArray generalize(ISpatialReference pSR, IGeometryArray pInGA, double maxDeviation, ILinearUnit pDeviationUnit) throws IOException, AutomationException
The Generalize operation applies Douglaspoiker 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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.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 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 resimplified 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 autocomplete, cutting and union can be used.
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.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IGeometry convexHull(ISpatialReference pSR, IGeometryArray pInGeometryArray) throws IOException, AutomationException
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.
pSR
 A reference to a com.esri.arcgis.geometry.ISpatialReference (in)pInGeometryArray
 A reference to a com.esri.arcgis.geometry.IGeometryArray (in)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.IPolygonArray autoComplete(ISpatialReference pSR, IPolygonArray pInPolygons, IPolylineArray pCompletionLines) throws IOException, AutomationException
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.double getDistanceGeodesic(ISpatialReference pSR, IGeometry pG1, IGeometry pG2, ILinearUnit pDistanceUnit) throws IOException, AutomationException
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 latitudelongitude coordinates.
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)
IOException
 If there are interop problems.
AutomationException
 If the ArcObject component throws an exception.


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 