This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IG > IGeometryServer2 Interface > IGeometryServer2.Offset Method (ArcObjects .NET 10.5 SDK) |
Returns an array of polylines and polygons that are offset versions of the input polylines and polygons (uses ITopologicalOperator::ConstructOffset).
[Visual Basic .NET] Public Function Offset ( _ ByVal pSR As ISpatialReference, _ ByVal pInGA As IGeometryArray, _ ByVal offsetDistance As Double, _ ByVal pOffsetUnit As ILinearUnit, _ ByVal offsetHow As Integer, _ ByVal bevelRatio As Double _ ) As IGeometryArray
[C#] public IGeometryArray Offset ( ISpatialReference pSR, IGeometryArray pInGA, double offsetDistance, ILinearUnit pOffsetUnit, int offsetHow, double bevelRatio );
[C++]
HRESULT Offset(
ISpatialReference* pSR,
IGeometryArray* pInGA,
double offsetDistance,
ILinearUnit* pOffsetUnit,
long offsetHow,
double bevelRatio,
IGeometryArray** ppOffsetGA
);
[C++]
Parameters pSR
pSR is a parameter of type ISpatialReference pInGA
pInGA is a parameter of type IGeometryArray offsetDistance offsetDistance is a parameter of type double pOffsetUnit
pOffsetUnit is a parameter of type ILinearUnit offsetHow offsetHow is a parameter of type long bevelRatio bevelRatio is a parameter of type double ppOffsetGA [out, retval]
ppOffsetGA is a parameter of type IGeometryArray
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.