Class EllipticArcClass

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll
[Guid("E54925BB-16D9-11D2-AA7A-00C04FA37BA4")]
[ClassInterface(ClassInterfaceType.None)]
public class EllipticArcClass : EllipticArc, IEllipticArc, ITransform2D, ICurve3, ICurve2, ISegment, ICurve, IGeometry, IConstructEllipticArc, IProximityOperator, ISupportErrorInfo, IClone, ISegmentM, ISegmentZ, ISegmentID
Inheritance
EllipticArcClass
Implements
Inherited Members

Constructors

EllipticArcClass()

public EllipticArcClass()

Explicit Interface Implementations

Assign(IClone)

Assigns the properties of src to the receiver.

virtual void Assign(IClone src)

Parameters

src IClone

CenterPoint

The center point of the arc.

virtual IPoint CenterPoint { get; }

Returns

IPoint

Remarks

 

EllipticArc CenterPoint Example

CentralAngle

The included (or central) angle.

virtual double CentralAngle { get; set; }

Returns

double

Remarks

 

EllipticArc CentralAngle Example

Clone()

Clones the receiver and assigns the result to *clone.

virtual IClone Clone()

Returns

IClone

Complement()

Changes this ellipse into its complement; 'from' and 'to' points are unchanged.

virtual void Complement()

Remarks

 

Complement Example

ConstructEnvelope(IEnvelope)

Constructs the inscribed ellipse of the given envelope. The ellipse is oriented clockwise.

virtual void ConstructEnvelope(IEnvelope boundingEnvelope)

Parameters

boundingEnvelope IEnvelope

Remarks

The method ignores the Z values of the given envelope and therefore the output elliptic arc is 2D.

 

IConstructEllipticArc ConstructEnvelope Example

[C#]
public IEllipticArc CreateFullEclipticArcFull(IEnvelope envelope)
{
   IConstructEllipticArc constructEllipticArc = new EllipticArcClass();
   constructEllipticArc.ConstructEnvelope(envelope);
   return constructEllipticArc as IEllipticArc;
}
[Visual Basic .NET]

    Public Function CreateEArcFull(ByVal pEnv As ESRI.ArcGIS.Geometry.IEnvelope) As ESRI.ArcGIS.Geometry.IEllipticArc
        Dim pConstEArc As ESRI.ArcGIS.Geometry.IConstructEllipticArc
        pConstEArc = New ESRI.ArcGIS.Geometry.EllipticArc
        pConstEArc.ConstructEnvelope(pEnv)
        CreateEArcFull = pConstEArc
    End Function





ConstructQuarterEllipse(IPoint, IPoint, bool)

Construct an elliptic arc that starts at fromPoint, goes to toPoint, and spans an angle of pi/2. The rotation of the ellipse will be either 0 or pi/2.

virtual void ConstructQuarterEllipse(IPoint FromPoint, IPoint ToPoint, bool CCW)

Parameters

FromPoint IPoint
ToPoint IPoint
CCW bool

Remarks

 

ConstructEllipticArc ConstructQuarterEllipse Example

[C#]
private void ConstructQuarterEllipticArc()
{
   IPoint point1 = new PointClass();
   point1.PutCoords(0, 0);
   IPoint point2 = new PointClass();
   point2.PutCoords(100, 100);

IConstructEllipticArc constructionArc = new EllipticArcClass(); constructionArc.ConstructQuarterEllipse(point1, point2, true);

IEllipticArc ellipticArc = constructionArc as IEllipticArc; System.Windows.Forms.MessageBox.Show("Length : " + ellipticArc.Length); }

[Visual Basic .NET]

    Private Sub ConstructQuarterEllipticArc()
        Dim pCons As ESRI.ArcGIS.Geometry.IConstructEllipticArc
        Dim pT1 As ESRI.ArcGIS.Geometry.IPoint
        Dim pT2 As ESRI.ArcGIS.Geometry.IPoint
        Dim pEArc As ESRI.ArcGIS.Geometry.IEllipticArc
        pT1 = New ESRI.ArcGIS.Geometry.Point
        pT2 = New ESRI.ArcGIS.Geometry.Point
        pT1.PutCoords(0, 0)
        pT2.PutCoords(100, 100)
        pCons = New ESRI.ArcGIS.Geometry.EllipticArc
        pCons.ConstructQuarterEllipse(pT1, pT2, True)
        pEArc = pCons 'QI
        Debug.Print("Length : " & pEArc.Length)
    End Sub












ConstructTwoPointsEnvelope(IPoint, IPoint, IEnvelope, esriArcOrientation)

Construct an elliptic arc that starts at fromPoint, goes to toPoint, and tries to have the embedded ellipse inscribed in the suggestedEnvelope. The result will have rotation of 0 or pi/2.

virtual void ConstructTwoPointsEnvelope(IPoint FromPoint, IPoint ToPoint, IEnvelope suggestedEnvelope, esriArcOrientation orientation)

Parameters

FromPoint IPoint
ToPoint IPoint
suggestedEnvelope IEnvelope
orientation esriArcOrientation

Remarks

 

IConstructEllipticArc ConstructTwoPointsEnvelope Example

ConstructUpToFivePoints(IPoint, IPoint, IPoint, IPoint, IPoint)

Constructs an elliptic arc, given up to 5 points, such that the embedded ellipse passes through as many as possible. The arc will start at the first point and end at the second, passing through the third.

virtual void ConstructUpToFivePoints(IPoint from, IPoint to, IPoint thru, IPoint point4, IPoint point5)

Parameters

from IPoint
to IPoint
thru IPoint
point4 IPoint
point5 IPoint

Remarks

 

ConstructEllipticArc ConstructUpToFivePoints Example

[C#]
private void ConstructFivePointArc()
{
  IPoint point1 = new PointClass();
  point1.PutCoords(5, 10);
  IPoint point2 = new PointClass();
  point2.PutCoords(15, 10);
  IPoint point3 = new PointClass();
  point3.PutCoords(15, 100);
  IPoint point4 = new PointClass();
  point4.PutCoords(50, 10);
  IPoint point5 = new PointClass();
  point5.PutCoords(50, 100);
  IConstructEllipticArc constructEllipticArc = new EllipticArcClass();
  constructEllipticArc.ConstructUpToFivePoints(point1, point2, point3, point4, point5);
  IEllipticArc ellipitcArc = constructEllipticArc as IEllipticArc;
  String report = "X, Y Center Point : " + ellipitcArc.CenterPoint.X + " , " + ellipitcArc.CenterPoint.Y + "\n" +
                  "Center angle in rad : " + ellipitcArc.CentralAngle + "\n" +
                  "Length : " + ellipitcArc.Length;
  System.Windows.Forms.MessageBox.Show(report);
}
[Visual Basic .NET]

Private Sub ConstructUpToFivePointsEllipticArc()
   Dim pCons As ESRI.ArcGIS.Geometry.IConstructEllipticArc
   Dim pTr As ESRI.ArcGIS.Geometry.IPoint
   Dim pFr As ESRI.ArcGIS.Geometry.IPoint
   Dim pTo As ESRI.ArcGIS.Geometry.IPoint
   Dim p4 As ESRI.ArcGIS.Geometry.IPoint
   Dim p5 As ESRI.ArcGIS.Geometry.IPoint
   Dim pEArc As ESRI.ArcGIS.Geometry.IEllipticArc
   pTr = New ESRI.ArcGIS.Geometry.Point
   pFr = New ESRI.ArcGIS.Geometry.Point
   pTo = New ESRI.ArcGIS.Geometry.Point
   p4 = New ESRI.ArcGIS.Geometry.Point
   p5 = New ESRI.ArcGIS.Geometry.Point
   pFr.PutCoords(0, -100)
   pTo.PutCoords(0, -100)
   pTr.PutCoords(200, 0)
   p4.PutCoords(0, 100)
   p5.PutCoords(-200, -0)
   pCons = New ESRI.ArcGIS.Geometry.EllipticArc
   pCons.ConstructUpToFivePoints(pFr, pTo, pTr, p4, p5)
   pEArc = pCons 'QI
   'Report
   Debug.Print("X, Y Center Point : " & pEArc.CenterPoint.X & " , " & pEArc.CenterPoint.Y)
   Debug.Print("Center angle in rad : " & pEArc.CentralAngle)
   Debug.Print("Length : " & pEArc.Length)
End Sub
























ConvertDistanceMeasureToRatio(double, ref double)

Converts the distance measure to a ratio of the total distance.

virtual void ConvertDistanceMeasureToRatio(double distanceMeasure, ref double distanceRatio)

Parameters

distanceMeasure double
distanceRatio double

Densify(int, double, out int, out ILine)

Densify segment into the specified number of smaller segments. This method is intended for internal use only.

virtual void Densify(int cInSlots, double maxDeviation, out int pcOutSegments, out ILine segments)

Parameters

cInSlots int
maxDeviation double
pcOutSegments int
segments ILine

Remarks

Densifying individual segments can be accomplished in client code by add the segment to a temporary polyline, then densifying the polyline using one of the methods on IPolycurve. Alternatively, the IGeometryBridge interface on the GeometryEnvironment object can be used.

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

Dimension

virtual esriGeometryDimension Dimension { get; }

Returns

esriGeometryDimension

Envelope

virtual IEnvelope Envelope { get; }

Returns

IEnvelope

EnvelopeIntersection(IEnvelope, bool, ref double, ref double, ref int, out int)

Finds intersections with clipping envelope; boundaryOverlap is ignored for non-linear segments.

virtual void EnvelopeIntersection(IEnvelope intersectionEnvelope, bool boundaryOverlap, ref double segmentParams, ref double envelopeDistances, ref int numIntersections, out int outcode)

Parameters

intersectionEnvelope IEnvelope
boundaryOverlap bool
segmentParams double
envelopeDistances double
numIntersections int
outcode int

FromAngle[bool]

The start angle (measured from a horizontal line through the center point) defining where the arc starts.

virtual double FromAngle[bool ellipseStd] { get; set; }

Parameters

ellipseStd bool

Returns

double

Remarks

 

EllipticArc FromAngle Example

FromPoint

virtual IPoint FromPoint { get; set; }

Returns

IPoint

GeoNormalize()

virtual void GeoNormalize()

GeoNormalizeFromLongitude(double)

virtual void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

GeographicShift(double)

Shift longitudes to the right of splitLongitude. This method is obsolete.

virtual void GeographicShift(double splitLongitude)

Parameters

splitLongitude double

GeometryType

virtual esriGeometryType GeometryType { get; }

Returns

esriGeometryType

GetAxes(ref double, ref double, ref double)

Gets the semi-major and semi-minor axes.

virtual void GetAxes(ref double semiMajor, ref double semiMinor, ref double minorMajorRatio)

Parameters

semiMajor double
semiMinor double
minorMajorRatio double

Remarks

The Axes can be set using PutAxes.

EllipticArc GetAxes Example

GetDistanceAtVertexAttribute(esriGeometryAttributes, double, bool)

Gets the distance corresponding to the attribute value along the segment.

virtual double GetDistanceAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, bool asRatio)

Parameters

attributeType esriGeometryAttributes
attributeValue double
asRatio bool

Returns

double

GetIDs(out int, out int)

Get the IDs on the segment's endpoints.

virtual void GetIDs(out int fromID, out int toID)

Parameters

fromID int
toID int

GetMs(out double, out double)

Get the Ms on the segment's endpoints.

virtual void GetMs(out double fromM, out double toM)

Parameters

fromM double
toM double

GetPointsAtVertexAttribute(esriGeometryAttributes, double, double, out IPointCollection)

Gets the point at the location corresponding to the attribute value.

virtual void GetPointsAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, double lateralOffset, out IPointCollection outPoints)

Parameters

attributeType esriGeometryAttributes
attributeValue double
lateralOffset double
outPoints IPointCollection

GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes, double, double, out ISegment)

Gets the segment corresponding to the extent along the segment between the 'from' and 'to' attribute values.

virtual void GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute, out ISegment outSegment)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double
outSegment ISegment

GetSubcurve(double, double, bool, out ICurve)

virtual void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

GetVertexAttributeAtDistance(esriGeometryAttributes, double, bool)

Gets the attribute value corresponding to the distance along the segment.

virtual double GetVertexAttributeAtDistance(esriGeometryAttributes attributeType, double distance, bool asRatio)

Parameters

attributeType esriGeometryAttributes
distance double
asRatio bool

Returns

double

GetZs(out double, out double)

Get the Zs on the segment's endpoints.

virtual void GetZs(out double fromZ, out double toZ)

Parameters

fromZ double
toZ double

HasVertexAttributes(esriGeometryAttributes, out bool, out bool)

Returns two booleans telling if the segment as from attribute and to attribute values.

virtual void HasVertexAttributes(esriGeometryAttributes attributeType, out bool hasFromAttribute, out bool hasToAttribute)

Parameters

attributeType esriGeometryAttributes
hasFromAttribute bool
hasToAttribute bool

HorizontalIntersectionCount(ref WKSPoint, out bool)

Returns the number of horizontal intersections.

virtual int HorizontalIntersectionCount(ref WKSPoint p, out bool pointOnLine)

Parameters

p WKSPoint
pointOnLine bool

Returns

int

ICurve2_Dimension

virtual esriGeometryDimension ICurve2_Dimension { get; }

Returns

esriGeometryDimension

ICurve2_Envelope

virtual IEnvelope ICurve2_Envelope { get; }

Returns

IEnvelope

ICurve2_FromPoint

virtual IPoint ICurve2_FromPoint { get; set; }

Returns

IPoint

ICurve2_GeoNormalize()

virtual void ICurve2_GeoNormalize()

ICurve2_GeoNormalizeFromLongitude(double)

virtual void ICurve2_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve2_GeometryType

virtual esriGeometryType ICurve2_GeometryType { get; }

Returns

esriGeometryType

ICurve2_GetSubcurve(double, double, bool, out ICurve)

virtual void ICurve2_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ICurve2_IsClosed

virtual bool ICurve2_IsClosed { get; }

Returns

bool

ICurve2_IsEmpty

virtual bool ICurve2_IsEmpty { get; }

Returns

bool

ICurve2_Length

virtual double ICurve2_Length { get; }

Returns

double

ICurve2_Project(ISpatialReference)

virtual void ICurve2_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve2_QueryEnvelope(IEnvelope)

virtual void ICurve2_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve2_QueryFromPoint(IPoint)

virtual void ICurve2_QueryFromPoint(IPoint from)

Parameters

from IPoint

ICurve2_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve2_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ICurve2_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ICurve2_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ICurve2_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ICurve2_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ICurve2_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve2_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ICurve2_QueryToPoint(IPoint)

virtual void ICurve2_QueryToPoint(IPoint to)

Parameters

to IPoint

ICurve2_ReverseOrientation()

virtual void ICurve2_ReverseOrientation()

ICurve2_SetEmpty()

virtual void ICurve2_SetEmpty()

ICurve2_SnapToSpatialReference()

virtual void ICurve2_SnapToSpatialReference()

ICurve2_SpatialReference

virtual ISpatialReference ICurve2_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve2_ToPoint

virtual IPoint ICurve2_ToPoint { get; set; }

Returns

IPoint

ICurve3_Dimension

virtual esriGeometryDimension ICurve3_Dimension { get; }

Returns

esriGeometryDimension

ICurve3_Envelope

virtual IEnvelope ICurve3_Envelope { get; }

Returns

IEnvelope

ICurve3_FromPoint

virtual IPoint ICurve3_FromPoint { get; set; }

Returns

IPoint

ICurve3_GeoNormalize()

virtual void ICurve3_GeoNormalize()

ICurve3_GeoNormalizeFromLongitude(double)

virtual void ICurve3_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve3_GeometryType

virtual esriGeometryType ICurve3_GeometryType { get; }

Returns

esriGeometryType

ICurve3_GetSubcurve(double, double, bool, out ICurve)

virtual void ICurve3_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ICurve3_IsClosed

virtual bool ICurve3_IsClosed { get; }

Returns

bool

ICurve3_IsEmpty

virtual bool ICurve3_IsEmpty { get; }

Returns

bool

ICurve3_Length

virtual double ICurve3_Length { get; }

Returns

double

ICurve3_Project(ISpatialReference)

virtual void ICurve3_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve3_PutCoordsEx(IPoint, IPoint)

virtual void ICurve3_PutCoordsEx(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ICurve3_QueryEnvelope(IEnvelope)

virtual void ICurve3_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve3_QueryFromPoint(IPoint)

virtual void ICurve3_QueryFromPoint(IPoint from)

Parameters

from IPoint

ICurve3_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve3_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ICurve3_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ICurve3_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ICurve3_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ICurve3_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ICurve3_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve3_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ICurve3_QueryToPoint(IPoint)

virtual void ICurve3_QueryToPoint(IPoint to)

Parameters

to IPoint

ICurve3_ReverseOrientation()

virtual void ICurve3_ReverseOrientation()

ICurve3_SetEmpty()

virtual void ICurve3_SetEmpty()

ICurve3_SnapToSpatialReference()

virtual void ICurve3_SnapToSpatialReference()

ICurve3_SpatialReference

virtual ISpatialReference ICurve3_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve3_ToPoint

virtual IPoint ICurve3_ToPoint { get; set; }

Returns

IPoint

ICurve_Dimension

virtual esriGeometryDimension ICurve_Dimension { get; }

Returns

esriGeometryDimension

ICurve_Envelope

virtual IEnvelope ICurve_Envelope { get; }

Returns

IEnvelope

ICurve_FromPoint

The 'from' point of the curve.

virtual IPoint ICurve_FromPoint { get; set; }

Returns

IPoint

Remarks

 

FromPoint Example

ICurve_GeoNormalize()

virtual void ICurve_GeoNormalize()

ICurve_GeoNormalizeFromLongitude(double)

virtual void ICurve_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve_GeometryType

virtual esriGeometryType ICurve_GeometryType { get; }

Returns

esriGeometryType

ICurve_GetSubcurve(double, double, bool, out ICurve)

Extracts a portion of this curve into a new curve.

virtual void ICurve_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

Remarks

 

Subcurve Example

ICurve_IsClosed

Indicates if 'from' and 'to' points (of each part) are identical.

virtual bool ICurve_IsClosed { get; }

Returns

bool

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

ICurve_IsEmpty

virtual bool ICurve_IsEmpty { get; }

Returns

bool

ICurve_Length

The length of the curve.

virtual double ICurve_Length { get; }

Returns

double

ICurve_Project(ISpatialReference)

virtual void ICurve_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve_QueryEnvelope(IEnvelope)

virtual void ICurve_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve_QueryFromPoint(IPoint)

Copies this curve's 'from' point to the input point.

virtual void ICurve_QueryFromPoint(IPoint from)

Parameters

from IPoint

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

[C#]

//The example shows how to query the from and to points of a curve.
public void ICurveQueryPoints(IFeature currentFeature)
{
    if (currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryPolyline ||
        currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryLine)
    {
        ICurve curve = currentFeature.Shape as ICurve;
        IPoint fromPoint = new PointClass();
        IPoint toPoint = new PointClass();
        curve.QueryFromPoint(fromPoint);
        curve.QueryToPoint(toPoint);
        System.Windows.Forms.MessageBox.Show("ICurve properties..." + "\n" +
                        "Curve.QueryFromPoint (x,y) = " + fromPoint.X + "," + fromPoint.Y + "\n" +
                        "Curve.QueryToPoint (x,y) = " + toPoint.X + "," + toPoint.Y);
    }
}














[Visual Basic .NET]

    ' The example shows how to query the from and to points of a curve.
    Public Sub t_ICurve_QueryPoints(ByVal pFeature As IFeature)
        Dim pCurve As ICurve
        Dim pPointFrom As IPoint
        Dim pPointTo As IPoint
        pPointFrom = New Point
        pPointTo = New Point





        If pFeature.Shape.GeometryType = esriGeometryType.esriGeometryPolyline Or _
            esriGeometryType.esriGeometryPolyline Or esriGeometryType.esriGeometryLine Then
            pCurve = pFeature.Shape
            pCurve.QueryFromPoint(pPointFrom)
            pCurve.QueryToPoint(pPointTo)
            MsgBox("+++ICurve properties..." & vbCrLf _
              & "Curve.QueryFromPoint (x,y) = " & pPointFrom.X & "," & pPointFrom.Y & vbCrLf _
              & "Curve.QueryToPoint (x,y) = " & pPointTo.X & "," & pPointTo.Y & vbCrLf)
        End If
    End Sub








ICurve_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

Constructs a line normal to a curve from a point at a specified distance along the curve.

virtual void ICurve_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

Remarks

 

QueryNormal Example

ICurve_QueryPoint(esriSegmentExtension, double, bool, IPoint)

Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.

virtual void ICurve_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

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

ICurve_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.

virtual void ICurve_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

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

ICurve_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

Constructs a line tangent to a curve from a point at a specified distance along the curve.

virtual void ICurve_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

Remarks

 

QueryTangent Example

ICurve_QueryToPoint(IPoint)

Copies the curve's 'to' point into the input point.

virtual void ICurve_QueryToPoint(IPoint to)

Parameters

to IPoint

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

ICurve_ReverseOrientation()

Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).

virtual void ICurve_ReverseOrientation()

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

[C#]

    public void ReverseOrientation(IFeatureClass featureClass, int oidToEdit)
    {
        IFeature feature = featureClass.GetFeature(oidToEdit);
        if (feature.Shape.GeometryType == esriGeometryType.esriGeometryPolygon)
        {
            IArea area = feature.Shape as IArea;
            double beforeReverse = area.Area;
            ICurve curve = feature.Shape as ICurve;
            curve.ReverseOrientation();
            double afterReverse = area.Area;
            System.Windows.Forms.MessageBox.Show(String.Format("The polygon area is originally {0}, after the orientation was reversed the area is {1}.",beforeReverse,afterReverse));
        }
    }











ICurve_SetEmpty()

virtual void ICurve_SetEmpty()

ICurve_SnapToSpatialReference()

virtual void ICurve_SnapToSpatialReference()

ICurve_SpatialReference

virtual ISpatialReference ICurve_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve_ToPoint

The 'to' point of the curve.

virtual IPoint ICurve_ToPoint { get; set; }

Returns

IPoint

Remarks

 

ToPoint Example

IGeometry_Dimension

The topological dimension of this geometry.

virtual esriGeometryDimension IGeometry_Dimension { get; }

Returns

esriGeometryDimension

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





IGeometry_Envelope

Creates a copy of this geometry's envelope and returns it.

virtual IEnvelope IGeometry_Envelope { get; }

Returns

IEnvelope

Examples

Sample Snippet

<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<img src="./bitmaps/envelope.gif" align=
"baseline"></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
 </p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> <span style=
"COLOR: blue">public</span> <span style="COLOR: blue">static</span>
<span style="COLOR: teal">IGeometry</span>
GetEnvelopeGeometry()</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaX = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaY = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaZ = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">IPoint</span> centerPoint =
GetPoint();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">IEnvelope</span> envelope = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">EnvelopeClass</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.XMin = centerPoint.X - DeltaX;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.XMax = centerPoint.X + DeltaX;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.YMin = centerPoint.Y - DeltaY;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.YMax = centerPoint.Y + DeltaY;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.ZMin = centerPoint.Z - DeltaZ;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
envelope.ZMax = centerPoint.Z + DeltaZ;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
MakeZAware(envelope <span style="COLOR: blue">as</span>
<span style="COLOR: teal">IGeometry</span>);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">return</span> envelope <span style=
"COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style=
"FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
<span style=
"mso-spacerun: yes">       </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: teal">IPoint</span>
GetPoint()</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Min = -10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Max = 10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">Random</span> random = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">Random</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> x = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> y = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">double</span> z = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: blue">return</span> ConstructPoint3D(x, y,
z);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> }</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint3D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
z)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint2D(x, y);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span>
point.Z = z;<br>
<br>
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
}<br>
<br style="mso-special-character: line-break">
<br style="mso-special-character: line-break"></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint2D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point =</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
new</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
PointClass</span><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span>
point.PutCoords(x, y);<br>
<span style="mso-spacerun: yes"> </span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">           </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes">       </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: blue">void</span>
MakeZAware(<span style="COLOR: teal">IGeometry</span>
geometry)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
<span style="COLOR: teal">IZAware</span> zAware = geometry
<span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IZAware</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
           </span>
zAware.ZAware = <span style="COLOR: blue">true</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
       </span> }</span></p>

Remarks

 

Envelope Example

IGeometry_GeoNormalize()

Shifts longitudes, if need be, into a continuous range of 360 degrees.

virtual void IGeometry_GeoNormalize()

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.
 

IGeometry_GeoNormalizeFromLongitude(double)

Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.

virtual void IGeometry_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

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).

IGeometry_GeometryType

The type of this geometry.

virtual esriGeometryType IGeometry_GeometryType { get; }

Returns

esriGeometryType

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

IGeometry_IsEmpty

Indicates whether this geometry contains any points.

virtual bool IGeometry_IsEmpty { get; }

Returns

bool

IGeometry_Project(ISpatialReference)

Projects this geometry into a new spatial reference.

virtual void IGeometry_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

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.

[C#]
//Create Spatial Reference Factory
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass();
ISpatialReference sr1;
//GCS to project from 
IGeographicCoordinateSystem gcs = srFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_NAD1983);
sr1 = gcs;
sr1.SetFalseOriginAndUnits(-180, -90, 1000000);
//Projected Coordinate System to project into
IProjectedCoordinateSystem pcs = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983N_AmericaLambert);
pcs.SetFalseOriginAndUnits(0, 0, 1000);
ISpatialReference sr2;
sr2 = pcs;
//Point to project
IPoint point = new PointClass() as IPoint;
point.PutCoords(-117.17, 34.06);
//Geometry Interface to do actual project
IGeometry geometry;
geometry = point;
geometry.SpatialReference = sr1;
geometry.Project(sr2);
point = geometry as IPoint;
double x;
double y;
point.QueryCoords(out x, out y);
Debug.Print("X: " + x.ToString());
Debug.Print("Y: " + y.ToString());

IGeometry_QueryEnvelope(IEnvelope)

Copies this geometry's envelope properties into the specified envelope.

virtual void IGeometry_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

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

IGeometry_SetEmpty()

Removes all points from this geometry.

virtual void IGeometry_SetEmpty()

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.


[C#]     private bool EmptyGeometry(IGeometry geometry)
    {
        geometry.SetEmpty();
        return geometry.IsEmpty;
    }



IGeometry_SnapToSpatialReference()

Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.

virtual void IGeometry_SnapToSpatialReference()

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.

IGeometry_SpatialReference

The spatial reference associated with this geometry.

virtual ISpatialReference IGeometry_SpatialReference { get; set; }

Returns

ISpatialReference

ISegment_Dimension

virtual esriGeometryDimension ISegment_Dimension { get; }

Returns

esriGeometryDimension

ISegment_Envelope

virtual IEnvelope ISegment_Envelope { get; }

Returns

IEnvelope

ISegment_FromPoint

virtual IPoint ISegment_FromPoint { get; set; }

Returns

IPoint

ISegment_GeoNormalize()

virtual void ISegment_GeoNormalize()

ISegment_GeoNormalizeFromLongitude(double)

virtual void ISegment_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ISegment_GeometryType

virtual esriGeometryType ISegment_GeometryType { get; }

Returns

esriGeometryType

ISegment_GetSubcurve(double, double, bool, out ICurve)

virtual void ISegment_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ISegment_IsClosed

virtual bool ISegment_IsClosed { get; }

Returns

bool

ISegment_IsEmpty

virtual bool ISegment_IsEmpty { get; }

Returns

bool

ISegment_Length

virtual double ISegment_Length { get; }

Returns

double

ISegment_Project(ISpatialReference)

virtual void ISegment_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ISegment_QueryEnvelope(IEnvelope)

virtual void ISegment_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ISegment_QueryFromPoint(IPoint)

virtual void ISegment_QueryFromPoint(IPoint from)

Parameters

from IPoint

ISegment_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ISegment_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ISegment_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ISegment_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ISegment_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ISegment_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ISegment_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ISegment_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ISegment_QueryToPoint(IPoint)

virtual void ISegment_QueryToPoint(IPoint to)

Parameters

to IPoint

ISegment_ReverseOrientation()

virtual void ISegment_ReverseOrientation()

ISegment_SetEmpty()

virtual void ISegment_SetEmpty()

ISegment_SnapToSpatialReference()

virtual void ISegment_SnapToSpatialReference()

ISegment_SpatialReference

virtual ISpatialReference ISegment_SpatialReference { get; set; }

Returns

ISpatialReference

ISegment_ToPoint

virtual IPoint ISegment_ToPoint { get; set; }

Returns

IPoint

InterfaceSupportsErrorInfo(ref Guid)

virtual void InterfaceSupportsErrorInfo(ref Guid riid)

Parameters

riid Guid

InterpolateVertexAttributes(double, bool, IPoint)

Interpolates Z and M values at distanceAlongSegment and stores the results at point.

virtual void InterpolateVertexAttributes(double distanceAlongSegment, bool asRatio, IPoint atPoint)

Parameters

distanceAlongSegment double
asRatio bool
atPoint IPoint

IsCircular

Indicates if this elliptical arc is acutally circular (major and minor axes same length).

virtual bool IsCircular { get; }

Returns

bool

IsClosed

virtual bool IsClosed { get; }

Returns

bool

IsCounterClockwise

Indicates if this elliptic arc is oriented counter-clockwise from its 'from' point to its 'to' point.

virtual bool IsCounterClockwise { get; set; }

Returns

bool

Remarks

 

IsCCW Example

IsEmpty

virtual bool IsEmpty { get; }

Returns

bool

IsEqual(IClone)

Indicates if the receiver and other have the same properties.

virtual bool IsEqual(IClone other)

Parameters

other IClone

Returns

bool

IsIdentical(IClone)

Indicates if the receiver and other are the same object.

virtual bool IsIdentical(IClone other)

Parameters

other IClone

Returns

bool

IsLine

Indicates if the arc is degenerated to a line.

virtual bool IsLine { get; }

Returns

bool

Remarks

 

EllipticArc IsLine Example

IsMinor

Indicates whether the arc is a minor arc or a major arc.

virtual bool IsMinor { get; set; }

Returns

bool

Remarks

 

EllipticArc IsMinor Example

IsPoint

Indicates if the arc is degenerated to a point.

virtual bool IsPoint { get; }

Returns

bool

Length

virtual double Length { get; }

Returns

double

MaxDistanceFromLine(ref WKSPoint, ref WKSPoint, double, double, double, ref double, ref double, ref WKSPoint)

Returns the maximum distance from the line.

virtual void MaxDistanceFromLine(ref WKSPoint baseFrom, ref WKSPoint baseTo, double minOffset, double fromArcDistance, double toArcDistance, ref double maxOffset, ref double atArcDistance, ref WKSPoint farPoint)

Parameters

baseFrom WKSPoint
baseTo WKSPoint
minOffset double
fromArcDistance double
toArcDistance double
maxOffset double
atArcDistance double
farPoint WKSPoint

Move(double, double)

Moves dx units horizontally and dy units vertically.

virtual void Move(double dx, double dy)

Parameters

dx double
dy double

Remarks

 

Transform2D Move Example

MoveVector(ILine)

Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.

virtual void MoveVector(ILine v)

Parameters

v ILine

Remarks

 

Transform2D MoveVector Example

Project(ISpatialReference)

virtual void Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

PutAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Sets some attributes from this point and copies them to another point. Awareness is not considered.

virtual void PutAttributes(bool PutAttributes, bool putAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

PutAttributes bool
putAwareness bool
from esriPointAttributes
to esriPointAttributes

PutAxes(double, double)

Sets the semi-major and semi-minor axes.

virtual void PutAxes(double semiMajor, double minorMajorRatio)

Parameters

semiMajor double
minorMajorRatio double

Remarks

The Axes can be returned using GetAxes.

EllipticArc PutAxes Example

PutCoords(bool, IPoint, IPoint, IPoint, double, double, esriArcOrientation)

Sets the center point and endpoints, angle of rotation, and orientation.

virtual void PutCoords(bool ellipseStd, IPoint Center, IPoint from, IPoint to, double rotationAngle, double minorMajorRatio, esriArcOrientation orientation)

Parameters

ellipseStd bool
Center IPoint
from IPoint
to IPoint
rotationAngle double
minorMajorRatio double
orientation esriArcOrientation

Remarks

Unless the coordinates of the From and To Points are exactly on the defined Elliptic Arc, PutCoords is likely to create an invalid Elliptic Arc.  Therefore, it is highly recommended that another Elliptic Arc creation method is used unless all of the necessary input parameters are exactly known.

IEllipticArc PutCoords Example

PutCoordsByAngle(bool, IPoint, double, double, double, double, double)

Sets the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.

virtual void PutCoordsByAngle(bool ellipseStd, IPoint Center, double FromAngle, double CentralAngle, double rotationAngle, double semiMajor, double minorMajorRatio)

Parameters

ellipseStd bool
Center IPoint
FromAngle double
CentralAngle double
rotationAngle double
semiMajor double
minorMajorRatio double

Remarks

This is the recommended way to create an arbitrary Elliptic Arc.  However, due to numeric accuracy limitations of computers and trigonometric functions, the From and To Points may be very slightly offset from the expected coordinates.  This is important to keep in mind when attempting to connect the endpoints to other segments.

IEllipticArc PutCoordsByAngle Example

PutCoordsEx(IPoint, IPoint)

Sets this segment's endpoints to 'from' and 'to'.

virtual void PutCoordsEx(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

PutVertexAttributes(esriGeometryAttributes, double, double)

Sets the 'from' and the 'to' attribute values.

virtual void PutVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

QueryAreaCorrection(out double)

Queries the area correction value.

virtual void QueryAreaCorrection(out double areaCorrection)

Parameters

areaCorrection double

QueryAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Gets some attributes from this point and copies them to another point. Awareness is not considered.

virtual void QueryAttributes(bool getAttributes, bool getAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

getAttributes bool
getAwareness bool
from esriPointAttributes
to esriPointAttributes

QueryCenterPoint(IPoint)

Copies the center of this arc to the input point.

virtual void QueryCenterPoint(IPoint Center)

Parameters

Center IPoint

Remarks

The QueryCenterPoint method should be used in performance critical situations, where the center point of several arcs needs to be retrieved. The point is populated (not created) by the method. For example, this can be used to get the center point of several arcs in a loop. Creating the point only once outside the loop may improve performance for large number of arcs.

EllipticArc QueryCenterPoint Example

[C#]

//This example demonstrates how to use the QueryCenterPoint method
private void QueryCenterPoint()
{
    IPoint center = new PointClass();
    center.PutCoords(10, 10);
    IEllipticArc ellipticArc = new EllipticArcClass();
    ellipticArc.PutCoordsByAngle(false, center, 0, Math.PI / 2, 0, 20, 0.4);
    //Cocreate the center point
    IPoint theCenterPoint = new PointClass();

ellipticArc.QueryCenterPoint(theCenterPoint);
System.Windows.Forms.MessageBox.Show("Center point coordinates \n" + theCenterPoint.X + ", " + theCenterPoint.Y);
}










[Visual Basic .NET]

    'This example demonstrates how to use the QueryCenterPoint method
    Sub QueryCenterPoint_example()
        Dim pEArc As IEllipticArc, dpi As Double
        Dim pCenter As IPoint, pTheCenterPoint As IPoint
        dpi = Math.Atan(1) * 4
        pCenter = New Point
        pEArc = New EllipticArc
        pCenter.PutCoords(10, 10)

pEArc.PutCoordsByAngle(False, pCenter, 0, dpi / 2, 0, 20, 0.4)
'Cocreate the center point
pTheCenterPoint = New Point

pEArc.queryCenterPoint(pTheCenterPoint)
Debug.Print("Center point coordinates")

Debug.Print(pTheCenterPoint.X & " , " & pTheCenterPoint.Y)
End Sub














QueryCentroidCorrection(ref double, ref double, ref double)

Queries the centroid correction value.

virtual void QueryCentroidCorrection(ref double weightedCentroidX, ref double weightedCentroidY, ref double areaCorrection)

Parameters

weightedCentroidX double
weightedCentroidY double
areaCorrection double

QueryCoords(bool, IPoint, IPoint, IPoint, ref double, ref double, ref bool, ref bool)

Copies the center and endpoints, angle of rotation, orientation and major/minor properties into the method parameters.

virtual void QueryCoords(bool ellipseStd, IPoint Center, IPoint from, IPoint to, ref double rotationAngle, ref double minorMajorRatio, ref bool isCCW, ref bool minor)

Parameters

ellipseStd bool
Center IPoint
from IPoint
to IPoint
rotationAngle double
minorMajorRatio double
isCCW bool
minor bool

Remarks

These are the necessary inputs for PutCoords, except in special cases (half ellipse, full ellipse, Central Angle = 0, and Minor to Major Ratio = 0) where the ArcOrientation must know which of these cases exists to ensure that the desired Elliptic Arc is unambiguous. Any of the output parameters can be set to nil if that info is not desired.

-isCCW stands for "is counter clockwise"

IEllipticArc QueryCoords Example

QueryCoordsByAngle(bool, IPoint, ref double, ref double, ref double, ref double, ref double)

Returns the center point, starting angle, signed central angle, angle of rotation, ratio of the minor axis to the major axis, and axes.

virtual void QueryCoordsByAngle(bool ellipseStd, IPoint Center, ref double FromAngle, ref double CentralAngle, ref double rotationAngle, ref double semiMajor, ref double minorMajorRatio)

Parameters

ellipseStd bool
Center IPoint
FromAngle double
CentralAngle double
rotationAngle double
semiMajor double
minorMajorRatio double

Remarks

 

IEllipticArc QueryCoordsByAngle Example

QueryCurvature(double, bool, out double, ILine)

Finds curvature and unit vector starting at point on segment and directed to embedded circle center.

virtual void QueryCurvature(double DistanceAlongCurve, bool asRatio, out double curvature, ILine unitVector)

Parameters

DistanceAlongCurve double
asRatio bool
curvature double
unitVector ILine

Remarks

The unit vector returned by QueryCurvature points toward the center of the circle that has the same first and second derivative at the queried point with a curvature value equal to 1 / Radius of that circle.

QueryCurvature Example

QueryEnvelope(IEnvelope)

virtual void QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

QueryFromPoint(IPoint)

virtual void QueryFromPoint(IPoint from)

Parameters

from IPoint

QueryNearestPoint(IPoint, esriSegmentExtension, IPoint)

Copies into 'nearest' a point on this geometry nearest to the input point.

virtual void QueryNearestPoint(IPoint p, esriSegmentExtension extension, IPoint nearest)

Parameters

p IPoint
extension esriSegmentExtension
nearest IPoint

Remarks

 

QueryNearestPoint Example

QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

QueryPointsAndDistances(esriSegmentExtension, double, IPoint, bool, ref double, out IEnumPointAndDistance)

Given an input point, calculates the minimum distance to the geometry and provides an enumerator over all closest points on the geometry, along with additional information.

virtual void QueryPointsAndDistances(esriSegmentExtension extension, double searchRadius, IPoint inPoint, bool asRatio, ref double distanceFromCurve, out IEnumPointAndDistance pointsAndDistances)

Parameters

extension esriSegmentExtension
searchRadius double
inPoint IPoint
asRatio bool
distanceFromCurve double
pointsAndDistances IEnumPointAndDistance

Remarks

AsRatio is an input parameter that only affects the DistanceAlongCurvereturned as part of the output IEnumPointAndDistance enumerator.

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

IEnumPointAndDistance is an enumerator (it inherits from IEnumVertex) over all nearest points on the curve

QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

QueryToPoint(IPoint)

virtual void QueryToPoint(IPoint to)

Parameters

to IPoint

QueryVertexAttributes(esriGeometryAttributes, out double, out double)

Gets the 'from' and the 'to' attribute values.

virtual void QueryVertexAttributes(esriGeometryAttributes attributeType, out double fromAttribute, out double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

QueryWKSEnvelope(ref WKSEnvelope)

Queries the WKS Envelope.

virtual void QueryWKSEnvelope(ref WKSEnvelope Envelope)

Parameters

Envelope WKSEnvelope

QueryWKSFromPoint(out WKSPoint)

Query the WKSPoint at the 'from' point.

virtual void QueryWKSFromPoint(out WKSPoint p)

Parameters

p WKSPoint

QueryWKSToPoint(out WKSPoint)

Query the WKSPoint at the 'to' point.

virtual void QueryWKSToPoint(out WKSPoint p)

Parameters

p WKSPoint

ReturnDistance(IGeometry)

Returns the minimum distance between two geometries.

virtual double ReturnDistance(IGeometry other)

Parameters

other IGeometry

Returns

double

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.

ReturnNearestPoint(IPoint, esriSegmentExtension)

Creates and returns a point on this geometry nearest to the input point.

virtual IPoint ReturnNearestPoint(IPoint p, esriSegmentExtension extension)

Parameters

p IPoint
extension esriSegmentExtension

Returns

IPoint

Remarks

 

ReturnNearestPoint Example

ReturnTurnDirection(ISegment)

Finds turn direction between two connected segments.

virtual int ReturnTurnDirection(ISegment otherSegment)

Parameters

otherSegment ISegment

Returns

int

Remarks

ReturnTurnDirection is only available for Lines and CircularArcs, not BezierCurves or EllipticArcs.

ReturnTurnDirection Example

ReverseOrientation()

virtual void ReverseOrientation()

Rotate(IPoint, double)

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.

virtual void Rotate(IPoint Origin, double rotationAngle)

Parameters

Origin IPoint
rotationAngle double

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

Scale(IPoint, double, double)

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.

virtual void Scale(IPoint Origin, double sx, double sy)

Parameters

Origin IPoint
sx double
sy double

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

[C#]

            //Create Point you wish to scale
            IPoint startingPoint = new PointClass() as IPoint;
            startingPoint.PutCoords(10, 10);
            //Create a point to act as origin
            IPoint origin = new PointClass() as IPoint;
            origin.PutCoords(15, 15);
            //Cast the startingPoint into the correct Interface
            ITransform2D transformScalePoint = startingPoint as ITransform2D;
            //Perform Scale
            transformScalePoint.Scale(origin, .5, .5);
            double x;
            double y;
            startingPoint.QueryCoords(out x, out y);
            Debug.Print(x.ToString());
            Debug.Print(y.ToString());













SetEmpty()

virtual void SetEmpty()

SetIDs(int, int)

Set the IDs on the segment's endpoints.

virtual void SetIDs(int fromID, int toID)

Parameters

fromID int
toID int

SetMs(double, double)

Set the Ms on the segment's endpoints.

virtual void SetMs(double fromM, double toM)

Parameters

fromM double
toM double

SetZs(double, double)

Set the Zs on the segment's endpoints.

virtual void SetZs(double fromZ, double toZ)

Parameters

fromZ double
toZ double

SnapToSpatialReference()

virtual void SnapToSpatialReference()

SpatialReference

virtual ISpatialReference SpatialReference { get; set; }

Returns

ISpatialReference

SplitAtDistance(double, bool, out ISegment, out ISegment)

Split segment at specified distance.

virtual void SplitAtDistance(double distances, bool asRatio, out ISegment fromSegment, out ISegment toSegment)

Parameters

distances double
asRatio bool
fromSegment ISegment
toSegment ISegment

Remarks

 

SplitAtDistance Example

SplitAtVertexAttribute(esriGeometryAttributes, double, out ISegment, out ISegment)

Splits the segment in two segments at the location corresponding to the attribute value.

virtual void SplitAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, out ISegment fromSegment, out ISegment toSegment)

Parameters

attributeType esriGeometryAttributes
attributeValue double
fromSegment ISegment
toSegment ISegment

SplitDivideLength(double, double, bool, ref int, ref ISegment)

Divide segment into smaller segments of the specified length.

virtual void SplitDivideLength(double Offset, double Length, bool asRatio, ref int numSplitSegments, ref ISegment splitSegments)

Parameters

Offset double
Length double
asRatio bool
numSplitSegments int
splitSegments ISegment

Remarks

 

SplitDivideLength Example

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

SynchronizeEmptyAttributes(ISegment)

Synchronize Empty Attributes.

virtual void SynchronizeEmptyAttributes(ISegment toSegment)

Parameters

toSegment ISegment

ToAngle[bool]

The end angle (measured from a horizontal line through the center point) defining where the arc ends.

virtual double ToAngle[bool ellipseStd] { get; set; }

Parameters

ellipseStd bool

Returns

double

Remarks

 

EllipticArc ToAngle Example

ToPoint

virtual IPoint ToPoint { get; set; }

Returns

IPoint

Transform(esriTransformDirection, ITransformation)

Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).

virtual void Transform(esriTransformDirection Direction, ITransformation Transformation)

Parameters

Direction esriTransformDirection
Transformation ITransformation

VertexAttributeAware[esriGeometryAttributes]

Indicates if the segment is aware of the specified attribute type.

virtual bool VertexAttributeAware[esriGeometryAttributes attributeType] { get; set; }

Parameters

attributeType esriGeometryAttributes

Returns

bool

VertexAttributeOn(esriGeometryAttributes, double)

Indicates if attributeValue is located on this segment.

virtual int VertexAttributeOn(esriGeometryAttributes attributeType, double attributeValue)

Parameters

attributeType esriGeometryAttributes
attributeValue double

Returns

int