Class MultiPatchClass

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll
[Guid("F3C041C6-AE4D-11D2-9C93-00C04FB17838")]
[ClassInterface(ClassInterfaceType.None)]
public class MultiPatchClass : MultiPatch, IGeometry5, IGeometry4, IGeometry3, IGeometry2, IGeometryCollection, IPointCollection4, IPointCollection3, IPointCollection2, IPointCollection, IMultiPatch, IGeometry, IConstructMultiPatch, ITopologicalOperator3, ITopologicalOperator2, ITopologicalOperator, IHitTest, IHitTest3D, IArea, IArea3D, IZAware, IMAware, IMCollection, IPointIDAware, ISupportErrorInfo, IPersistStream, IPersist, IClone, ITransform2D, ITransform3D, IXMLSerialize, IMSnap, IGeneralMultiPatchInfo, IProximityOperator, IRelationalOperator2, IRelationalOperator, IProximityOperator3D, IRelationalOperator3D2, IRelationalOperator3D, IVolume, IZ2, IZ, IZCollection
Inheritance
MultiPatchClass
Implements
Inherited Members

Constructors

MultiPatchClass()

public MultiPatchClass()

Explicit Interface Implementations

AddGeometries(int, ref IGeometry)

Adds references to the specified geometries. This method is intended for internal use only.

virtual void AddGeometries(int Count, ref IGeometry newGeometries)

Parameters

Count int
newGeometries IGeometry

Remarks


The geometries are added last in the list. Use an array of geometries (IGeometry) and the exact number (count ) of elements in the array. Exceeding the boundary of the array will cause an application error. If you don't want to place the geometries last in the collection then use the InsertGeometries method.



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

AddGeometry(IGeometry, ref object, ref object)

Adds a reference to the input geometry either at the end, or before, or after the specified index.

virtual void AddGeometry(IGeometry inGeometry, ref object before, ref object after)

Parameters

inGeometry IGeometry
before object
after object

Remarks

When applying the AddGeometry method give either the before or after index and not both. Adding a Geometry to the collection as the first one is done by setting the before index as 0.

The spatial reference of the GeometryCollection is transferred (objects projected if necessary) to any objects added to it. However the spatial reference of the added geometry is not transferred to the GeometryCollection. Always make sure to set the spatial reference on the object GeometryCollection prior to add other geometries to it to avoid creating invalid geometry. For example, adding geometry objects to a GeometryBag that doesn't have a well-defined spatial reference will set an undefined spatial reference to all the objects added to the bag. Using this GeometryBag may cause unexpected behavior with the ITopologicalOperator::ConstructUnion method.

 
[C#]

IPoint pnt = new PointClass();

pnt.PutCoords(x, y);

IGeometryCollection geomColl = new MultipointClass() as IGeometryCollection;

object obj = Type.Missing;

geomColl.AddGeometry(pnt, ref obj, ref obj);

AddGeometryCollection(IGeometryCollection)

Adds references to geometries in the input collection.

virtual void AddGeometryCollection(IGeometryCollection newGeometries)

Parameters

newGeometries IGeometryCollection

AddPoint(IPoint, ref object, ref object)

Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.

virtual void AddPoint(IPoint inPoint, ref object before, ref object after)

Parameters

inPoint IPoint
before object
after object

AddPointCollection(IPointCollection)

Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.

virtual void AddPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

AddPoints(int, ref IPoint)

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

virtual void AddPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

AddWKSPointZs(int, ref WKSPointZ)

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

virtual void AddWKSPointZs(int Count, ref WKSPointZ pointStructures)

Parameters

Count int
pointStructures WKSPointZ

AddWKSPoints(int, ref WKSPoint)

Adds vertices to this Path, Ring, Polyline, or Polygon, or adds new points to this Multipoint, TriangleFan, or TriangleStrip.

virtual void AddWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

Area

The area.

virtual double Area { get; }

Returns

double

Remarks

 

Area Example

Area3D

The 3D surface area.

virtual double Area3D { get; }

Returns

double

Remarks

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

[C#]

        public static void CalculateArea3D()

        {

IGeometry

multiPatchGeometry = GetMultiPatchGeometry();

IArea3D area3D = multiPatchGeometry as IArea3D;




               double calculatedArea3D = area3D.Area3D;


               //calculatedArea3D = 480

        }

Assign(IClone)

Assigns the properties of src to the receiver.

virtual void Assign(IClone src)

Parameters

src IClone

BeginningRingCount[int]

The number of beginning rings, counting only those of the desired types.

virtual int BeginningRingCount[int ringTypesDesired] { get; }

Parameters

ringTypesDesired int

Returns

int

Boundary

The boundary of this geometry. A polygon's boundary is a polyline. A polyline's boundary is a multipoint. A point or multipoint's boundary is an empty point or multipoint.

virtual IGeometry Boundary { get; }

Returns

IGeometry

Remarks

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

This method does not support GeometryBags.



 

Boundary Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

Buffer(double)

Constructs a polygon that is the locus of points at a distance less than or equal to a specified distance from this geometry.

virtual IGeometry Buffer(double distance)

Parameters

distance double

Returns

IGeometry

Remarks


The buffer distance is in the same units as the source shape that is being buffered.

A negative distance can be specified to produce a buffer inside the original polygon. This cannot be used with polyline.

ITopologicalOperator methods must be applied on top-level geometries only. Top-Level geometries are point, multipoint, polyline and polygon. To use this method with segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), paths or rings, they must be wrapped with a top-level type.

A buffer distance of 0 will generate an empty polygon with the input geometry being a polyline and multipoint.  However, if the input geometry is a point, the output will be the original point.

Buffer Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods


[C#]//This example demonstrates how to use ITopologicalOperator::Buffer
private void BufferArea()
  {
  IPoint[] points = new IPoint[5];
  //The spatial reference should be set here using IGeometry::SpatialReference (Code skipped here)
  for(int i = 0; i < points.Length; i++)
  {
     points[i] = new PointClass();
  }
  points[0].PutCoords(0, 0);
  points[1].PutCoords(0, 10);
  points[2].PutCoords(10, 10);
  points[3].PutCoords(10, 0);
  points[4].PutCoords(0, 0);
  IPointCollection4 pointCollection = new PolygonClass();
  IGeometryBridge geometryBride = new GeometryEnvironmentClass();
  geometryBride.AddPoints(pointCollection, ref points);
  IArea area = pointCollection as IArea;
  System.Windows.Forms.MessageBox.Show("Area original polygon : " + area.Area);
  ITopologicalOperator topologicalOperator = pointCollection as ITopologicalOperator;
  //Outside buffer
  IPolygon polygon = topologicalOperator.Buffer(1) as IPolygon;
  area = polygon as IArea;
  System.Windows.Forms.MessageBox.Show( "Area polygon positive distance : " + area.Area);
  //Inside buffer
  polygon = topologicalOperator.Buffer(-1) as IPolygon;
  area = polygon as IArea;
  System.Windows.Forms.MessageBox.Show("Area polygon negative distance : " + area.Area);
}




























 

 

 

 

 

 

[Visual Basic .NET]

    Sub exampleITopologicalOperator_Buffer()
        Dim ptc As ESRI.ArcGIS.Geometry.IPointCollection, i As Long, pa As ESRI.ArcGIS.Geometry.IArea, ptopo As ESRI.ArcGIS.Geometry.ITopologicalOperator
        ptc = New ESRI.ArcGIS.Geometry.Polygon
        Dim pt(4) As ESRI.ArcGIS.Geometry.IPoint, poutPoly As ESRI.ArcGIS.Geometry.IPolygon
        'The spatial reference should be set here using IGeometry::SpatialReference (Code skipped here)
        For i = 0 To 4

pt(i) = New ESRI.ArcGIS.Geometry.Point
Next
pt(0).PutCoords(0, 0)
pt(1).PutCoords(0, 10)
pt(2).PutCoords(10, 10)
pt(3).PutCoords(10, 0)
pt(4).PutCoords(0, 0)
Dim geometryBride As ESRI.ArcGIS.Geometry.IGeometryBridge
geometryBride = New ESRI.ArcGIS.Geometry.GeometryEnvironmentClass()

geometryBride.AddPoints(ptc, pt)
pa = ptc
Debug.Print("Area original polygon : " & pa.Area)
ptopo = ptc
poutPoly = ptopo.Buffer(1) 'Outside buffer
pa = poutPoly
Debug.Print("Area polygon positive distance : " & pa.Area)
poutPoly = ptopo.Buffer(-1) 'Inside buffer
pa = poutPoly
Debug.Print("Area polygon negative distance : " & pa.Area)
End Sub

























 

CalculateNonSimpleZs()

virtual void CalculateNonSimpleZs()

Centroid

The center of gravity (centroid).

virtual IPoint Centroid { get; }

Returns

IPoint

Remarks

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

 

Centroid Example

Centroid3D

A 3D point whose XY coordinates are set to the center of gravity of the shape'ss 2D footprint and Z set to the shape's ZMax.

virtual IPoint Centroid3D { get; }

Returns

IPoint

CentroidEx

The center of gravity (centroid).

virtual IPoint CentroidEx { get; }

Returns

IPoint

Changed

Indicates if a geometry has been changed (edited, projected, etc).

virtual bool Changed { get; set; }

Returns

bool

Clip(IEnvelope)

Constructs the intersection of this geometry and the specified envelope.

virtual void Clip(IEnvelope clipperEnvelope)

Parameters

clipperEnvelope IEnvelope

Remarks

Use QueryClipped or QueryClippedDense methods to send the results to a different polygon.

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

ITopologicalOperator Clip Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

ClipDense(IEnvelope, double)

Constructs the intersection of this geometry and the specified envelope; densifies lines in output contributed by the clipping envelope.

virtual void ClipDense(IEnvelope clipperEnvelope, double denseDistance)

Parameters

clipperEnvelope IEnvelope
denseDistance double

Remarks

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

This method does not support GeometryBags.

ClipToDomain()

Clips the geometry to the domain of the spatial reference. Useful for ensuring that buffers can be fit within the spatial domain of the feature class to which they are being added.

virtual void ClipToDomain()

Clone()

Clones the receiver and assigns the result to *clone.

virtual IClone Clone()

Returns

IClone

ConstructBuffers(int, ref double)

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

virtual IEnumGeometry ConstructBuffers(int numBuffers, ref double distances)

Parameters

numBuffers int
distances double

Returns

IEnumGeometry

Remarks

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

 

This method is only implemented for polygons and polylines.

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

ConstructExtrude(double, IGeometry)

Construct a MultiPatch by using an input (non-point) geometry as one base and offsetting the Zs already set on the input geometry to get the second base.

virtual void ConstructExtrude(double OffsetZ, IGeometry baseGeom)

Parameters

OffsetZ double
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.

ConstructMultiPatch Extrude Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetMultiPatchGeometry()

        {

            const int DensificationDivisions = 20;

            const double MaxDeviation = 0.1;

            const double BaseZ = 0;

            const double OffsetZ = -7;

 

            //Extrusion: 3D Polyline Having Vertices With Varying Z Values, Extruded Relative To Existing

            //           Vertex Z Values Via ConstructExtrude()

 

            IPointCollection polylinePointCollection = new PolylineClass();

 

            polylinePointCollection.AddPoint(ConstructPoint2D(-10, -10), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(0, -5), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(0, 5), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(10, 10), ref _missing, ref _missing);

 

            IPolyline polyline = polylinePointCollection as IPolyline;

            polyline.Densify(polyline.Length / DensificationDivisions, MaxDeviation);

 

            IGeometry polylineGeometry = polyline as IGeometry;

 

            MakeZAware(polylineGeometry);

 

            Random random = new Random();

 

            for (int i = 0; i < polylinePointCollection.PointCount; i++)

            {

                IPoint polylinePoint = polylinePointCollection.get_Point(i);

 

                polylinePointCollection.UpdatePoint(i, ConstructPoint3D(polylinePoint.X, polylinePoint.Y, BaseZ - 2 * Math.Sin(random.NextDouble())));

            }

 

            ITopologicalOperator topologicalOperator = polylineGeometry as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrude(OffsetZ, polylineGeometry);

 

            return constructMultiPatch as IGeometry;

        }

 


        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }

 

        private static double GetRadians(double decimalDegrees)

        {

            return decimalDegrees * (Math.PI / 180);

        }

 

        private static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        private static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);
 

            return point;

        }

 

        private static void MakeZAware(IGeometry geometry)

        {

            IZAware zAware = geometry as IZAware;

            zAware.ZAware = true;

        }

ConstructExtrudeAbsolute(double, IGeometry)

Construct a MultiPatch by extruding a (non-point) geometry using its initial Zs for one base, and a uniform input Z for the other.

virtual void ConstructExtrudeAbsolute(double toZ, IGeometry baseGeom)

Parameters

toZ double
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.

ConstructMultiPatch ExtrudeAbsolute Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetMultiPatchGeometry()

        {

            const int DensificationDivisions = 20;

            const double MaxDeviation = 0.1;

            const double BaseZ = 0;

            const double ToZ = -10;

 

            //Extrusion: 3D Polyline Having Vertices With Varying Z Values, Extruded To Specified Z Value

            //           Via ConstructExtrudeAbsolute()

 

            IPointCollection polylinePointCollection = new PolylineClass();

 

            polylinePointCollection.AddPoint(ConstructPoint2D(-10, -10), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(0, -5), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(0, 5), ref _missing, ref _missing);

            polylinePointCollection.AddPoint(ConstructPoint2D(10, 10), ref _missing, ref _missing);

 

            IPolyline polyline = polylinePointCollection as IPolyline;

            polyline.Densify(polyline.Length / DensificationDivisions, MaxDeviation);

 

            IGeometry polylineGeometry = polyline as IGeometry;

 

            MakeZAware(polylineGeometry);

 

            Random random = new Random();

 

            for (int i = 0; i < polylinePointCollection.PointCount; i++)

            {

                IPoint polylinePoint = polylinePointCollection.get_Point(i);

 

                polylinePointCollection.UpdatePoint(i, ConstructPoint3D(polylinePoint.X, polylinePoint.Y, BaseZ - 2 * Math.Sin(random.NextDouble())));

            }

 

            ITopologicalOperator topologicalOperator = polylineGeometry as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrudeAbsolute(ToZ, polylineGeometry);

 

            return constructMultiPatch as IGeometry;

        }

 

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

        private static void MakeZAware(IGeometry geometry)

        {

            IZAware zAware = geometry as IZAware;

            zAware.ZAware = true;

        }

ConstructExtrudeAlongLine(ILine, IGeometry)

Construct a MultiPatch by extruding a (non-point) geometry along a specified line, using the Zs on the two ends of the line to set Zs on the top and bottom.

virtual void ConstructExtrudeAlongLine(ILine extrusionLine, IGeometry baseGeom)

Parameters

extrusionLine ILine
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.

ConstructMultiPatch ExtrudeAlongLine Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetExample10()

        {

            const double CircleDegrees = 360.0;

            const int CircleDivisions = 36;

            const double VectorComponentOffset = 0.0000001;

            const double CircleRadius = 3.0;

            const double BaseZ = 0.0;

 

            //Extrusion: 3D Circle Polygon Extruded Along 3D Line Via ConstructExtrudeAlongLine()

 

            IPointCollection polygonPointCollection = new PolygonClass();

 

            IGeometry polygonGeometry = polygonPointCollection as IGeometry;

 

            MakeZAware(polygonGeometry);

 

            IPoint originPoint = ConstructPoint3D(0, 0, 0);

 

            IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);

 

            IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);

 

            lowerAxisVector3D.XComponent += VectorComponentOffset;

 

            IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;

 

            normalVector3D.Magnitude = CircleRadius;

 

            double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);

 

            for (int i = 0; i < CircleDivisions; i++)

            {

                normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);

 

                IPoint vertexPoint = ConstructPoint3D(originPoint.X + normalVector3D.XComponent,

                                                                      originPoint.Y + normalVector3D.YComponent,

                                                                      BaseZ);

 

                polygonPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);

            }

 

            polygonPointCollection.AddPoint(polygonPointCollection.get_Point(0), ref _missing, ref _missing);

 

            ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            //Define Line To Extrude Along

 

            ILine extrusionLine = new LineClass();

            extrusionLine.FromPoint = ConstructPoint3D(-4, -4, -5);

            extrusionLine.ToPoint = ConstructPoint3D(4, 4, 5);

 

            //Perform Extrusion

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrudeAlongLine(extrusionLine, polygonGeometry);

 

            //Transform Extrusion Result

 

            IArea area = polygonGeometry as IArea;

 

            ITransform2D transform2D = constructMultiPatch as ITransform2D;

            transform2D.Move(extrusionLine.FromPoint.X - area.Centroid.X, extrusionLine.FromPoint.Y - area.Centroid.Y);

 

            return constructMultiPatch as IGeometry;

        }


        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }

 

        private static double GetRadians(double decimalDegrees)

        {

            return decimalDegrees * (Math.PI / 180);

        }

 

        private static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        private static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);
 

            return point;

        }

 

        private static void MakeZAware(IGeometry geometry)

        {

            IZAware zAware = geometry as IZAware;

            zAware.ZAware = true;

        }

ConstructExtrudeBetween(IFunctionalSurface, IFunctionalSurface, IGeometry)

Construct a MultiPatch by extruding a (non-point) geometry between two functional surfaces.

virtual void ConstructExtrudeBetween(IFunctionalSurface fromSurface, IFunctionalSurface toSurface, IGeometry baseGeom)

Parameters

fromSurface IFunctionalSurface
toSurface IFunctionalSurface
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.  Z values from the FunctionalSurfaces are only calculated at Points in the input Geometry. If the input Geometry extents exceed the extents of the Functional Surfaces then an output Oeometry with NaNs will be produced. Currently not implemented for RasterSurfaces.

IConstructMultiPatch ExtrudeBetween Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetMultiPatchGeometry()

        {

            const double CircleDegrees = 360.0;

            const int CircleDivisions = 36;

            const double VectorComponentOffset = 0.0000001;

            const double CircleRadius = 9.5;

            const int PointCount = 100;

            const double UpperZMin = 7;

            const double UpperZMax = 10;

            const double LowerZMin = 0;

            const double LowerZMax = 3;

 

            //Extrusion: Circle Shaped Base Geometry Extruded Between Two Different TIN-Based Functional Surfaces

 

            IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();

 

            //Base Geometry

 

            IPointCollection polygonPointCollection = new PolygonClass();

 

            IPoint originPoint = ConstructPoint3D(0, 0, 0);

 

            IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);

 

            IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);

 

            lowerAxisVector3D.XComponent += VectorComponentOffset;

 

            IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;

 

            normalVector3D.Magnitude = CircleRadius;

 

            double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);

 

            for (int i = 0; i < CircleDivisions; i++)

            {

                normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);

 

                IPoint vertexPoint = ConstructPoint2D(originPoint.X + normalVector3D.XComponent,

                                                                        originPoint.Y + normalVector3D.YComponent);

 

                polygonPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);

            }

 

            IPolygon polygon = polygonPointCollection as IPolygon;

            polygon.Close();

 

            IGeometry baseGeometry = polygon as IGeometry;

 

            ITopologicalOperator topologicalOperator = polygon as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            //Functional Surfaces

 

            IEnvelope envelope = new EnvelopeClass();

            envelope.XMin = -10;

            envelope.XMax = 10;

            envelope.YMin = -10;

            envelope.YMax = 10;

 

            Random random = new Random();

 

            //Upper Functional Surface

 

            ITinEdit upperTinEdit = new TinClass();

            upperTinEdit.InitNew(envelope);

 

            for (int i = 0; i < PointCount; i++)

            {

                double x = envelope.XMin + (envelope.XMax - envelope.XMin) * random.NextDouble();

                double y = envelope.YMin + (envelope.YMax - envelope.YMin) * random.NextDouble();

                double z = UpperZMin + (UpperZMax - UpperZMin) * random.NextDouble();

 

                IPoint point = ConstructPoint3D(x, y, z);

 

                upperTinEdit.AddPointZ(point, 0);

            }

 

            IFunctionalSurface upperFunctionalSurface = upperTinEdit as IFunctionalSurface;

 

            //Lower Functional Surface

 

            ITinEdit lowerTinEdit = new TinClass();

            lowerTinEdit.InitNew(envelope);

 

            for (int i = 0; i < PointCount; i++)

            {

                double x = envelope.XMin + (envelope.XMax - envelope.XMin) * random.NextDouble();

                double y = envelope.YMin + (envelope.YMax - envelope.YMin) * random.NextDouble();

                double z = LowerZMin + (LowerZMax - LowerZMin) * random.NextDouble();

 

                IPoint point = ConstructPoint3D(x, y, z);

 

                lowerTinEdit.AddPointZ(point, 0);

            }

 

            IFunctionalSurface lowerFunctionalSurface = lowerTinEdit as IFunctionalSurface;

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrudeBetween(upperFunctionalSurface, lowerFunctionalSurface, baseGeometry);

 

            return constructMultiPatch as IGeometry;

        }

 

        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }

 

        private static double GetRadians(double decimalDegrees)

        {

            return decimalDegrees * (Math.PI / 180);

        }

 

        private static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        private static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);
 

            return point;

        }

ConstructExtrudeFromTo(double, double, IGeometry)

Construct a MultiPatch by extruding a (non-point) geometry between two specified Z values.

virtual void ConstructExtrudeFromTo(double fromZ, double toZ, IGeometry baseGeom)

Parameters

fromZ double
toZ double
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.

ConstructMultiPatch ExtrudeFromTo Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetMultiPatchGeometry()

        {

            const double FromZ = 0;

            const double ToZ = 8.5;

 

            //Extrusion: 2D Polygon Composed Of Multiple Square Shaped Exterior Rings And Corresponding Interior Rings,

            //           Extruded To Generate Multiple 3D Buildings With Hollow Interiors Via ConstructExtrudeFromTo()

 

            IPolygon polygon = new PolygonClass();

 

            IGeometryCollection geometryCollection = polygon as IGeometryCollection;

 

            //Exterior Ring 1

 

            IPointCollection exteriorRing1PointCollection = new RingClass();

            exteriorRing1PointCollection.AddPoint(ConstructPoint2D(1, 1), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint2D(1, 4), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint2D(4, 4), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint2D(4, 1), ref _missing, ref _missing);

 

            IRing exteriorRing1 = exteriorRing1PointCollection as IRing;

            exteriorRing1.Close();

 

            geometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);

 

            //Interior Ring 1

 

            IPointCollection interiorRing1PointCollection = new RingClass();

            interiorRing1PointCollection.AddPoint(ConstructPoint2D(1.5, 1.5), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint2D(1.5, 3.5), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint2D(3.5, 3.5), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint2D(3.5, 1.5), ref _missing, ref _missing);

 

            IRing interiorRing1 = interiorRing1PointCollection as IRing;

            interiorRing1.Close();

 

            geometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);

 

            //Exterior Ring 2

 

            IPointCollection exteriorRing2PointCollection = new RingClass();

            exteriorRing2PointCollection.AddPoint(ConstructPoint2D(1, -1), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint2D(4, -1), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint2D(4, -4), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint2D(1, -4), ref _missing, ref _missing);

 

            IRing exteriorRing2 = exteriorRing2PointCollection as IRing;

            exteriorRing2.Close();

 

            geometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);

 

            //Interior Ring 2

 

            IPointCollection interiorRing2PointCollection = new RingClass();

            interiorRing2PointCollection.AddPoint(ConstructPoint2D(1.5, -1.5), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint2D(3.5, -1.5), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint2D(3.5, -3.5), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint2D(1.5, -3.5), ref _missing, ref _missing);

 

            IRing interiorRing2 = interiorRing2PointCollection as IRing;

            interiorRing2.Close();

 

            geometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);

 

            //Exterior Ring 3

 

            IPointCollection exteriorRing3PointCollection = new RingClass();

            exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-1, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-4, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-4, 4), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint2D(-1, 4), ref _missing, ref _missing);

 

            IRing exteriorRing3 = exteriorRing3PointCollection as IRing;

            exteriorRing3.Close();

 

            geometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);

 

            //Interior Ring 3

 

            IPointCollection interiorRing3PointCollection = new RingClass();

            interiorRing3PointCollection.AddPoint(ConstructPoint2D(-1.5, 1.5), ref _missing, ref _missing);

            interiorRing3PointCollection.AddPoint(ConstructPoint2D(-3.5, 1.5), ref _missing, ref _missing);

            interiorRing3PointCollection.AddPoint(ConstructPoint2D(-3.5, 3.5), ref _missing, ref _missing);

            interiorRing3PointCollection.AddPoint(ConstructPoint2D(-1.5, 3.5), ref _missing, ref _missing);

 

            IRing interiorRing3 = interiorRing3PointCollection as IRing;

            interiorRing3.Close();

 

            geometryCollection.AddGeometry(interiorRing3 as IGeometry, ref _missing, ref _missing);

           

            //Exterior Ring 4

 

            IPointCollection exteriorRing4PointCollection = new RingClass();

            exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-1, -1), ref _missing, ref _missing);

            exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-1, -4), ref _missing, ref _missing);

            exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-4, -4), ref _missing, ref _missing);

            exteriorRing4PointCollection.AddPoint(ConstructPoint2D(-4, -1), ref _missing, ref _missing);

 

            IRing exteriorRing4 = exteriorRing4PointCollection as IRing;

            exteriorRing4.Close();

 

            geometryCollection.AddGeometry(exteriorRing4 as IGeometry, ref _missing, ref _missing);

 

            //Interior Ring 5

 

            IPointCollection interiorRing4PointCollection = new RingClass();

            interiorRing4PointCollection.AddPoint(ConstructPoint2D(-1.5, -1.5), ref _missing, ref _missing);

            interiorRing4PointCollection.AddPoint(ConstructPoint2D(-1.5, -3.5), ref _missing, ref _missing);

            interiorRing4PointCollection.AddPoint(ConstructPoint2D(-3.5, -3.5), ref _missing, ref _missing);

            interiorRing4PointCollection.AddPoint(ConstructPoint2D(-3.5, -1.5), ref _missing, ref _missing);

 

            IRing interiorRing4 = interiorRing4PointCollection as IRing;

            interiorRing4.Close();

 

            geometryCollection.AddGeometry(interiorRing4 as IGeometry, ref _missing, ref _missing);

           

            IGeometry polygonGeometry = polygon as IGeometry;

 

            ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrudeFromTo(FromZ, ToZ, polygonGeometry);

 

            return constructMultiPatch as IGeometry;

        }

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

ConstructExtrudeRelative(IVector3D, IGeometry)

Construct a MultiPatch by extruding a (non-point) geometry along a specified vector, using Zs already set on the input geometry.

virtual void ConstructExtrudeRelative(IVector3D extrusionVector, IGeometry baseGeom)

Parameters

extrusionVector IVector3D
baseGeom IGeometry

Remarks

All non-linear segments are treated as linear segments when extrusion is performed.  Only Polylines, Polygons, and Envelopes are allowed as input geometries.

ConstructMultiPatch ExtrudeRelative Example

[C#]

        private static object _missing = Type.Missing;

        public static IGeometry GetMultiPatchGeometry()

        {

            const double CircleDegrees = 360.0;

            const int CircleDivisions = 36;

            const double VectorComponentOffset = 0.0000001;

            const double CircleRadius = 3.0;

            const double BaseZ = 0.0;

            const double RotationAngleInDegrees = 89.9;

 

            //Extrusion: 3D Circle Polygon Extruded Along 3D Vector Via ConstructExtrudeRelative()

 

            IPointCollection pathPointCollection = new PathClass();

 

            IGeometry pathGeometry = pathPointCollection as IGeometry;

 

            MakeZAware(pathGeometry);

 

            IPoint originPoint = ConstructPoint3D(0, 0, 0);

 

            IVector3D upperAxisVector3D = ConstructVector3D(0, 0, 10);

 

            IVector3D lowerAxisVector3D = ConstructVector3D(0, 0, -10);

 

            lowerAxisVector3D.XComponent += VectorComponentOffset;

 

            IVector3D normalVector3D = upperAxisVector3D.CrossProduct(lowerAxisVector3D) as IVector3D;

 

            normalVector3D.Magnitude = CircleRadius;

 

            double rotationAngleInRadians = GetRadians(CircleDegrees / CircleDivisions);

 

            for (int i = 0; i < CircleDivisions; i++)

            {

                normalVector3D.Rotate(-1 * rotationAngleInRadians, upperAxisVector3D);

 

                IPoint vertexPoint = ConstructPoint3D(originPoint.X + normalVector3D.XComponent,

                                                                      originPoint.Y + normalVector3D.YComponent,

                                                                      BaseZ);

 

                pathPointCollection.AddPoint(vertexPoint, ref _missing, ref _missing);

            }

 

            pathPointCollection.AddPoint(pathPointCollection.get_Point(0), ref _missing, ref _missing);

 

            //Rotate Geometry

 

            IVector3D rotationAxisVector3D = ConstructVector3D(0, 10, 0);

 

            ITransform3D transform3D = pathGeometry as ITransform3D;

            transform3D.RotateVector3D(rotationAxisVector3D, GetRadians(RotationAngleInDegrees));

 

            //Construct Polygon From Path Vertices

 

            IGeometry polygonGeometry = new PolygonClass();

 

            MakeZAware(polygonGeometry);

 

            IPointCollection polygonPointCollection = polygonGeometry as IPointCollection;

 

            for (int i = 0; i < pathPointCollection.PointCount; i++)

            {

                polygonPointCollection.AddPoint(pathPointCollection.get_Point(i), ref _missing, ref _missing);

            }

 

            ITopologicalOperator topologicalOperator = polygonGeometry as ITopologicalOperator;

            topologicalOperator.Simplify();

 

            //Define Vector To Extrude Along

 

            IVector3D extrusionVector3D = ConstructVector3D(10, 0, 5);

 

            //Perform Extrusion

 

            IConstructMultiPatch constructMultiPatch = new MultiPatchClass();

            constructMultiPatch.ConstructExtrudeRelative(extrusionVector3D, polygonGeometry);

 

            return constructMultiPatch as IGeometry;

        }


        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }

 

        private static double GetRadians(double decimalDegrees)

        {

            return decimalDegrees * (Math.PI / 180);

        }

 

        private static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            MakeZAware(point as IGeometry);

 

            return point;

        }

 

        private static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);
 

            return point;

        }

 

        private static void MakeZAware(IGeometry geometry)

        {

            IZAware zAware = geometry as IZAware;

            zAware.ZAware = true;

        }

ConstructUnion(IEnumGeometry)

Defines this geometry to be the union of the inputs. More efficient for unioning multiple geometries than calling Union repeatedly.

virtual void ConstructUnion(IEnumGeometry geometries)

Parameters

geometries IEnumGeometry

Remarks

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

This method does not support GeometryBags.

Temproray files might be created.  If environment variable "ARCTMPDIR" exists, then the files are written to the path, otherwise written to current directory or system temp directory.

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

Contains(IGeometry)

Indicates if this geometry contains the other geometry.

virtual bool Contains(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

If geometry1 Contains geometry2, then geometry2 is Within geometry1.

An empty geometry does not contain another geometry.  On the other hand, an empty geometry is contained in another geometry, unless the other geometry is empty.

Contains examples. Only "true" relationships are showed in this picture.

ContainsEx(IGeometry, esriSpatialRelationExEnum)

Indicates if this geometry contains the other geometry, optionally using Celementini's definition.

virtual bool ContainsEx(IGeometry pOther, esriSpatialRelationExEnum Relation)

Parameters

pOther IGeometry
Relation esriSpatialRelationExEnum

Returns

bool

ConvexHull()

Constructs the convex hull of this geometry.

virtual IGeometry ConvexHull()

Returns

IGeometry

Remarks

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

This method does not support GeometryBags. 

ConvexHull method does not deal with Z attribute now.

ConvexHull Example

Crosses(IGeometry)

Indicates if the two geometries intersect in a geometry of lesser dimension.

virtual bool Crosses(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Cross only applies to polyline/polyline, polyline/polygon, or polygon/polyline relations.

If either one of the geometries is empty, the geometries do not cross.

Crosses examples. Only "true" relationships are showed in this picture.

Cut(IPolyline, out IGeometry, out IGeometry)

Splits this geometry into a part left of the cutting polyline, and a part right of it.

virtual void Cut(IPolyline cutter, out IGeometry leftGeom, out IGeometry rightGeom)

Parameters

cutter IPolyline
leftGeom IGeometry
rightGeom IGeometry

Remarks

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

When a polyline/polygon is cut, it is split where it intersects the cutter polyline. Each piece is classified as ‘left of’ or ‘right of’ the cutter. This classification is based on the orientation of the cutter line. Parts of the target polyline that do not intersect the cutting polyline are returned as part of the ‘right of’ result for that input polyline.  If a geometry is not cut, the left geometry will be empty.

When using a multi-part polyline to cut a single ring of a polyline, the orientation of the polyline paths is important. The cut piece of the ring must be on the same side of each cutting path as defined by the orientation of each path.

This method does not support GeometryBags.

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

Deserialize(IXMLSerializeData)

Deserializes an object from XML.

virtual void Deserialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

Difference(IGeometry)

Constructs the geometry containing points from this geometry but not the other geometry.

virtual IGeometry Difference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

Remarks

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

This method does not support GeometryBags.

ITopologicalOperator Differenece Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

Dimension

The topological dimension of this geometry.

virtual esriGeometryDimension 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





Disjoint(IGeometry)

Indicates if the two geometries share no points in common. Negate this result to compute the Intersect relation.

virtual bool Disjoint(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Two geometries are disjoint if either one is empty.

Disjoint example. Only "true" relationships are showed in this picture.

Disjoint3D(IGeometry)

Indicates if the two geometries share no points in common. Negate this result to compute the Intersect relation.

virtual bool Disjoint3D(IGeometry pOther)

Parameters

pOther IGeometry

Returns

bool

DropMs()

Sets all the M values to a non-valid number (NaN).

virtual void DropMs()

DropPointIDs()

Unsets all PointID values without changing awareness. Only works if geometry is aware of PointIDs.

virtual void DropPointIDs()

DropZs()

Sets all the Z values to a non-valid number (NaN).

virtual void DropZs()

EnumVertices

A new enumerator for this point collection.

virtual IEnumVertex EnumVertices { get; }

Returns

IEnumVertex

Envelope

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

virtual IEnvelope 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

Equals(IGeometry)

Indicates if the two geometries are of the same type and define the same set of points in the plane.

virtual bool Equals(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries. GeometryBags are not supported. IRelationalOperator::Equals delegates to ITopologicalOperatorSymmetricDifference and returns true when that method returns an empty geometry; M's and Z's are ignored. Please use IClone::IsEqual if M's and Z's need to be compared.

IClone::IsEqual simply iterates over each segment in each geometry, in index order, and compares their types and coordinates (but using the spatial reference's cluster tolerances to determine equality of coordinates).

Only "true" relationships are showed in this picture.

[C#]

The RCW for the IRelationalOperator inherits from System.Object, as do all reference types in .NET. The System.Object type has a method called Equals, which results in the IRelationalOperator RCW having two overloaded versions of the Equals method. Ensure that you are not using the Equals method inherited from the System.Object class by mistake, by making sure you pass in an IGeometry reference to the Equals method. For example, the following extract of code from a C# console application demonstrates calling Equals correctly.

ESRI.ArcGIS.Geometry.IPoint pt1 = new ESRI.ArcGIS.Geometry.PointClass();
pt1.PutCoords(5, 5);

ESRI.ArcGIS.Geometry.IPoint pt2 = new ESRI.ArcGIS.Geometry.PointClass(); pt2.PutCoords(5, 5);

ESRI.ArcGIS.Geometry.IRelationalOperator rel1 = pt1 as ESRI.ArcGIS.Geometry.IRelationalOperator; ESRI.ArcGIS.Geometry.IGeometry geom2 = pt2 as ESRI.ArcGIS.Geometry.IGeometry;

bool relEqual = rel1.Equals(pt2); //calling IRelationalOperator::Equals Console.WriteLine("Equal: " + relEqual.ToString()); bool netEqual = rel1.Equals(pt2 as object); //calling Object::Equals Console.WriteLine("Equal: " + netEqual.ToString());

FindBeginningRing(IRing)

Returns the beginning ring of the ring group containing the specified following ring.

virtual IRing FindBeginningRing(IRing followingRing)

Parameters

followingRing IRing

Returns

IRing

FollowingRingCount[IRing]

The number of following rings in the ring group that starts with the specified beginning ring.

virtual int FollowingRingCount[IRing beginningRing] { get; }

Parameters

beginningRing IRing

Returns

int

GeoNormalize()

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

virtual void 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.
 

GeoNormalizeEx(ISpatialReference, double)

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

virtual void GeoNormalizeEx(ISpatialReference SR, double denseDistance)

Parameters

SR ISpatialReference
denseDistance double

Remarks

Not implemented for Multipatches.

GeoNormalizeFromLongitude(double)

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

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

GeometriesChanged()

Tells this geometry collection that some of its geometries have been altered. Use this method on polylines, polygons and multipatches after directly editing one of its parts.

virtual void GeometriesChanged()

Geometry[int]

A reference to the ith geometry.

virtual IGeometry Geometry[int Index] { get; }

Parameters

Index int

Returns

IGeometry

Remarks

Note: The GeometryType returned by the Geometry method depends on which object type points the IGeometryCollection pointer.

IGeometryCollection Object GeometryType Returned Object GeometryType
Polygon
Rings
Polyline
Paths
Multipoint
Points
Multipatch
TriangleFans or TriangleStrips or Rings
TriangleFan
Points
TriangleStrip
Points
Geometry Bag
Any type of IGeometry

GeometryCount

The number of geometries in this collection.

virtual int GeometryCount { get; }

Returns

int

GeometryType

The type of this geometry.

virtual esriGeometryType 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

GetClassID(out Guid)

virtual void GetClassID(out Guid pClassID)

Parameters

pClassID Guid

GetPoints(int, int, out IPoint)

virtual void GetPoints(int Index, int Count, out IPoint Points)

Parameters

Index int
Count int
Points IPoint

GetRingType(IRing, ref bool)

Gets the esriMultiPatchRingType of the input Ring and returns a boolean indicating if that ring is a beginning ring.

virtual esriMultiPatchRingType GetRingType(IRing queryRing, ref bool isBeginningRing)

Parameters

queryRing IRing
isBeginningRing bool

Returns

esriMultiPatchRingType

Remarks

 

IMultiPatch GetRingType Example

[C#]

 

        private static object _missing = Type.Missing;

 

        public static void QueryMultiPatchRings()

        {

            const esriMultiPatchRingType DesiredRingTypeMask = esriMultiPatchRingType.esriMultiPatchBeginningRingMask;

 

            IGeometryBridge geometryBridge = new GeometryEnvironmentClass();

 

            IMultiPatch multiPatch = GetMultiPatchGeometry() as IMultiPatch;

 

            int beginningRingCount = multiPatch.get_BeginningRingCount((int)DesiredRingTypeMask);

            Trace.WriteLine("BeginningRingCount = " + beginningRingCount);

           

            IRing[] beginningRingArray = new IRing[beginningRingCount];

 

            geometryBridge.QueryBeginningRings(multiPatch, (int)DesiredRingTypeMask, ref beginningRingArray);

 

            for (int i = 0; i < beginningRingArray.Length; i++)

            {

                IRing beginningRing = beginningRingArray[i];

                Trace.WriteLine("BeginningRing[" + i + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].IsBeginningRing = " + IsBeginningRing(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].Length = " + beginningRing.Length);

 

                int followingRingCount = multiPatch.get_FollowingRingCount(beginningRing);

                Trace.WriteLine("BeginningRing[" + i + "].FollowingRingCount = " + followingRingCount);

 

                IRing[] followingRingArray = new IRing[followingRingCount];

 

                geometryBridge.QueryFollowingRings(multiPatch, beginningRing, ref followingRingArray);

 

                for (int j = 0; j < followingRingArray.Length; j++)

                {

                    IRing followingRing = followingRingArray[j];

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].IsBeginningRing = " + IsBeginningRing(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].Length = " + followingRing.Length);

                   

                    IRing foundBeginningRing = multiPatch.FindBeginningRing(followingRing);

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.IsBeginningRing = " + IsBeginningRing(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.Length = " + foundBeginningRing.Length);

                }

            }

        }

 

        private static esriMultiPatchRingType GetMultiPatchRingType(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return multiPatchRingType;

        }

 

        private static bool IsBeginningRing(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return isBeginningRing;

        }

 

        private static IGeometry GetMultiPatchGeometry()

        {

            //RingGroup: Upright Square Composed Of Multiple Exterior Rings And Multiple Interior Rings

 

            IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();

 

            IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;

 

            //Exterior Ring 1

 

            IPointCollection exteriorRing1PointCollection = new RingClass();

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing1, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 1

 

            IPointCollection interiorRing1PointCollection = new RingClass();

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing1, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 2

 

            IPointCollection exteriorRing2PointCollection = new RingClass();

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing2, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 2

 

            IPointCollection interiorRing2PointCollection = new RingClass();

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing2, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 3

 

            IPointCollection exteriorRing3PointCollection = new RingClass();

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing3, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            return multiPatchGeometryCollection as IGeometry;

        }

 

        public static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

 

GetSizeMax(out _ULARGE_INTEGER)

virtual void GetSizeMax(out _ULARGE_INTEGER pcbSize)

Parameters

pcbSize _ULARGE_INTEGER

HitTest(IPoint, double, esriGeometryHitPartType, IPoint, ref double, ref int, ref int, ref bool)

Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

virtual bool HitTest(IPoint QueryPoint, double searchRadius, esriGeometryHitPartType geometryPart, IPoint hitPoint, ref double hitDistance, ref int hitPartIndex, ref int hitSegmentIndex, ref bool bRightSide)

Parameters

QueryPoint IPoint
searchRadius double
geometryPart esriGeometryHitPartType
hitPoint IPoint
hitDistance double
hitPartIndex int
hitSegmentIndex int
bRightSide bool

Returns

bool

Remarks

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


EsriGeometryPartVertex: returns a vertex index


EsriGeometryPartBoundary, esriGeometryPartMidpoint and esriGeometryPartEndpoint: return a segment index


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

 

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

 

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

HitTest3D(IPoint, double, esriGeometryHitPartType, IPoint, ref double, ref int, ref int)

Locates a part of a geometry closest to a query point. Any located part must be within searchRadius units from the query point.

virtual bool HitTest3D(IPoint QueryPoint, double searchRadius, esriGeometryHitPartType geometryPart, IPoint hitPoint, ref double hitDistance, ref int hitPartIndex, ref int hitSegmentIndex)

Parameters

QueryPoint IPoint
searchRadius double
geometryPart esriGeometryHitPartType
hitPoint IPoint
hitDistance double
hitPartIndex int
hitSegmentIndex int

Returns

bool

HitTestCone(IRay, double, esriGeometryHitPartType, IPoint, ref double, ref int, ref int)

Locates a part of a geometry closest to a query ray.

virtual bool HitTestCone(IRay pQueryRay, double minAngle, esriGeometryHitPartType geometryPart, IPoint pHitPoint, ref double pHitDistance, ref int pHitPartIndex, ref int pHitSegmentIndex)

Parameters

pQueryRay IRay
minAngle double
geometryPart esriGeometryHitPartType
pHitPoint IPoint
pHitDistance double
pHitPartIndex int
pHitSegmentIndex int

Returns

bool

IGeometry2_Dimension

virtual esriGeometryDimension IGeometry2_Dimension { get; }

Returns

esriGeometryDimension

IGeometry2_Envelope

virtual IEnvelope IGeometry2_Envelope { get; }

Returns

IEnvelope

IGeometry2_GeoNormalize()

virtual void IGeometry2_GeoNormalize()

IGeometry2_GeoNormalizeFromLongitude(double)

virtual void IGeometry2_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

IGeometry2_GeometryType

virtual esriGeometryType IGeometry2_GeometryType { get; }

Returns

esriGeometryType

IGeometry2_IsEmpty

virtual bool IGeometry2_IsEmpty { get; }

Returns

bool

IGeometry2_Project(ISpatialReference)

virtual void IGeometry2_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

IGeometry2_QueryEnvelope(IEnvelope)

virtual void IGeometry2_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

IGeometry2_SetEmpty()

virtual void IGeometry2_SetEmpty()

IGeometry2_SnapToSpatialReference()

virtual void IGeometry2_SnapToSpatialReference()

IGeometry2_SpatialReference

virtual ISpatialReference IGeometry2_SpatialReference { get; set; }

Returns

ISpatialReference

IGeometry3_Dimension

virtual esriGeometryDimension IGeometry3_Dimension { get; }

Returns

esriGeometryDimension

IGeometry3_Envelope

virtual IEnvelope IGeometry3_Envelope { get; }

Returns

IEnvelope

IGeometry3_GeoNormalize()

virtual void IGeometry3_GeoNormalize()

IGeometry3_GeoNormalizeFromLongitude(double)

virtual void IGeometry3_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

IGeometry3_GeometryType

virtual esriGeometryType IGeometry3_GeometryType { get; }

Returns

esriGeometryType

IGeometry3_IsEmpty

virtual bool IGeometry3_IsEmpty { get; }

Returns

bool

IGeometry3_Project(ISpatialReference)

virtual void IGeometry3_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

IGeometry3_ProjectEx(ISpatialReference, esriTransformDirection, IGeoTransformation, bool, double, double)

virtual void IGeometry3_ProjectEx(ISpatialReference newReferenceSystem, esriTransformDirection Direction, IGeoTransformation GeoTransformation, bool bAngularDensify, double maxSegmentLength, double maxDeviation)

Parameters

newReferenceSystem ISpatialReference
Direction esriTransformDirection
GeoTransformation IGeoTransformation
bAngularDensify bool
maxSegmentLength double
maxDeviation double

IGeometry3_QueryEnvelope(IEnvelope)

virtual void IGeometry3_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

IGeometry3_SetEmpty()

virtual void IGeometry3_SetEmpty()

IGeometry3_SnapToSpatialReference()

virtual void IGeometry3_SnapToSpatialReference()

IGeometry3_SpatialReference

virtual ISpatialReference IGeometry3_SpatialReference { get; set; }

Returns

ISpatialReference

IGeometry4_Dimension

virtual esriGeometryDimension IGeometry4_Dimension { get; }

Returns

esriGeometryDimension

IGeometry4_Envelope

virtual IEnvelope IGeometry4_Envelope { get; }

Returns

IEnvelope

IGeometry4_GeoNormalize()

virtual void IGeometry4_GeoNormalize()

IGeometry4_GeoNormalizeFromLongitude(double)

virtual void IGeometry4_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

IGeometry4_GeometryType

virtual esriGeometryType IGeometry4_GeometryType { get; }

Returns

esriGeometryType

IGeometry4_IsEmpty

virtual bool IGeometry4_IsEmpty { get; }

Returns

bool

IGeometry4_Project(ISpatialReference)

virtual void IGeometry4_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

IGeometry4_ProjectEx(ISpatialReference, esriTransformDirection, IGeoTransformation, bool, double, double)

virtual void IGeometry4_ProjectEx(ISpatialReference newReferenceSystem, esriTransformDirection Direction, IGeoTransformation GeoTransformation, bool bAngularDensify, double maxSegmentLength, double maxDeviation)

Parameters

newReferenceSystem ISpatialReference
Direction esriTransformDirection
GeoTransformation IGeoTransformation
bAngularDensify bool
maxSegmentLength double
maxDeviation double

IGeometry4_QueryEnvelope(IEnvelope)

virtual void IGeometry4_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

IGeometry4_QueryWKSEnvelope(out WKSEnvelope)

virtual void IGeometry4_QueryWKSEnvelope(out WKSEnvelope e)

Parameters

e WKSEnvelope

IGeometry4_SetEmpty()

virtual void IGeometry4_SetEmpty()

IGeometry4_SnapToSpatialReference()

virtual void IGeometry4_SnapToSpatialReference()

IGeometry4_SpatialReference

virtual ISpatialReference IGeometry4_SpatialReference { get; set; }

Returns

ISpatialReference

IGeometry5_Changed

virtual bool IGeometry5_Changed { get; set; }

Returns

bool

IGeometry5_Dimension

virtual esriGeometryDimension IGeometry5_Dimension { get; }

Returns

esriGeometryDimension

IGeometry5_Envelope

virtual IEnvelope IGeometry5_Envelope { get; }

Returns

IEnvelope

IGeometry5_GeoNormalize()

virtual void IGeometry5_GeoNormalize()

IGeometry5_GeoNormalizeFromLongitude(double)

virtual void IGeometry5_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

IGeometry5_GeometryType

virtual esriGeometryType IGeometry5_GeometryType { get; }

Returns

esriGeometryType

IGeometry5_IsEmpty

virtual bool IGeometry5_IsEmpty { get; }

Returns

bool

IGeometry5_Project(ISpatialReference)

virtual void IGeometry5_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

IGeometry5_ProjectEx(ISpatialReference, esriTransformDirection, IGeoTransformation, bool, double, double)

virtual void IGeometry5_ProjectEx(ISpatialReference newReferenceSystem, esriTransformDirection Direction, IGeoTransformation GeoTransformation, bool bAngularDensify, double maxSegmentLength, double maxDeviation)

Parameters

newReferenceSystem ISpatialReference
Direction esriTransformDirection
GeoTransformation IGeoTransformation
bAngularDensify bool
maxSegmentLength double
maxDeviation double

IGeometry5_QueryEnvelope(IEnvelope)

virtual void IGeometry5_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

IGeometry5_QueryWKSEnvelope(out WKSEnvelope)

virtual void IGeometry5_QueryWKSEnvelope(out WKSEnvelope e)

Parameters

e WKSEnvelope

IGeometry5_SetEmpty()

virtual void IGeometry5_SetEmpty()

IGeometry5_SnapToSpatialReference()

virtual void IGeometry5_SnapToSpatialReference()

IGeometry5_SpatialReference

virtual ISpatialReference IGeometry5_SpatialReference { get; set; }

Returns

ISpatialReference

IMultiPatch_Dimension

virtual esriGeometryDimension IMultiPatch_Dimension { get; }

Returns

esriGeometryDimension

IMultiPatch_Envelope

virtual IEnvelope IMultiPatch_Envelope { get; }

Returns

IEnvelope

IMultiPatch_GeoNormalize()

virtual void IMultiPatch_GeoNormalize()

IMultiPatch_GeoNormalizeFromLongitude(double)

virtual void IMultiPatch_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

IMultiPatch_GeometryType

virtual esriGeometryType IMultiPatch_GeometryType { get; }

Returns

esriGeometryType

IMultiPatch_IsEmpty

virtual bool IMultiPatch_IsEmpty { get; }

Returns

bool

IMultiPatch_Project(ISpatialReference)

virtual void IMultiPatch_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

IMultiPatch_QueryEnvelope(IEnvelope)

virtual void IMultiPatch_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

IMultiPatch_SetEmpty()

virtual void IMultiPatch_SetEmpty()

IMultiPatch_SnapToSpatialReference()

virtual void IMultiPatch_SnapToSpatialReference()

IMultiPatch_SpatialReference

virtual ISpatialReference IMultiPatch_SpatialReference { get; set; }

Returns

ISpatialReference

IPersistStream_GetClassID(out Guid)

virtual void IPersistStream_GetClassID(out Guid pClassID)

Parameters

pClassID Guid

IPointCollection4_AddPoint(IPoint, ref object, ref object)

virtual void IPointCollection4_AddPoint(IPoint inPoint, ref object before, ref object after)

Parameters

inPoint IPoint
before object
after object

IPointCollection4_AddPointCollection(IPointCollection)

virtual void IPointCollection4_AddPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

IPointCollection4_AddPoints(int, ref IPoint)

virtual void IPointCollection4_AddPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

IPointCollection4_AddWKSPoints(int, ref WKSPoint)

virtual void IPointCollection4_AddWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

IPointCollection4_EnumVertices

virtual IEnumVertex IPointCollection4_EnumVertices { get; }

Returns

IEnumVertex

IPointCollection4_InsertPointCollection(int, IPointCollection)

virtual void IPointCollection4_InsertPointCollection(int Index, IPointCollection newPoints)

Parameters

Index int
newPoints IPointCollection

IPointCollection4_InsertPoints(int, int, ref IPoint)

virtual void IPointCollection4_InsertPoints(int Index, int Count, ref IPoint newPoints)

Parameters

Index int
Count int
newPoints IPoint

IPointCollection4_InsertWKSPoints(int, int, ref WKSPoint)

virtual void IPointCollection4_InsertWKSPoints(int Index, int Count, ref WKSPoint newPoints)

Parameters

Index int
Count int
newPoints WKSPoint

IPointCollection4_Point[int]

virtual IPoint IPointCollection4_Point[int i] { get; }

Parameters

i int

Returns

IPoint

IPointCollection4_PointCount

virtual int IPointCollection4_PointCount { get; }

Returns

int

IPointCollection4_QueryPoint(int, IPoint)

virtual void IPointCollection4_QueryPoint(int Index, IPoint Point)

Parameters

Index int
Point IPoint

IPointCollection4_QueryPoints(int, int, ref IPoint)

virtual void IPointCollection4_QueryPoints(int Index, int Count, ref IPoint Points)

Parameters

Index int
Count int
Points IPoint

IPointCollection4_QueryWKSPoints(int, int, out WKSPoint)

virtual void IPointCollection4_QueryWKSPoints(int Index, int Count, out WKSPoint pointStructures)

Parameters

Index int
Count int
pointStructures WKSPoint

IPointCollection4_RemovePoints(int, int)

virtual void IPointCollection4_RemovePoints(int Index, int Count)

Parameters

Index int
Count int

IPointCollection4_ReplacePointCollection(int, int, IPointCollection)

virtual void IPointCollection4_ReplacePointCollection(int Index, int goingAway, IPointCollection newPoints)

Parameters

Index int
goingAway int
newPoints IPointCollection

IPointCollection4_ReplacePoints(int, int, int, ref IPoint)

virtual void IPointCollection4_ReplacePoints(int Index, int comingIn, int goingAway, ref IPoint newPoints)

Parameters

Index int
comingIn int
goingAway int
newPoints IPoint

IPointCollection4_SetPointCollection(IPointCollection)

virtual void IPointCollection4_SetPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

IPointCollection4_SetPoints(int, ref IPoint)

virtual void IPointCollection4_SetPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

IPointCollection4_SetWKSPoints(int, ref WKSPoint)

virtual void IPointCollection4_SetWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

IPointCollection4_UpdatePoint(int, IPoint)

virtual void IPointCollection4_UpdatePoint(int i, IPoint p)

Parameters

i int
p IPoint

IRelationalOperator2_Contains(IGeometry)

virtual bool IRelationalOperator2_Contains(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Crosses(IGeometry)

virtual bool IRelationalOperator2_Crosses(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Disjoint(IGeometry)

virtual bool IRelationalOperator2_Disjoint(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Equals(IGeometry)

virtual bool IRelationalOperator2_Equals(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Overlaps(IGeometry)

virtual bool IRelationalOperator2_Overlaps(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Relation(IGeometry, string)

virtual bool IRelationalOperator2_Relation(IGeometry other, string relationDescription)

Parameters

other IGeometry
relationDescription string

Returns

bool

IRelationalOperator2_Touches(IGeometry)

virtual bool IRelationalOperator2_Touches(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator2_Within(IGeometry)

virtual bool IRelationalOperator2_Within(IGeometry other)

Parameters

other IGeometry

Returns

bool

IRelationalOperator3D2_Disjoint3D(IGeometry)

virtual bool IRelationalOperator3D2_Disjoint3D(IGeometry pOther)

Parameters

pOther IGeometry

Returns

bool

ITopologicalOperator2_Boundary

virtual IGeometry ITopologicalOperator2_Boundary { get; }

Returns

IGeometry

ITopologicalOperator2_Buffer(double)

virtual IGeometry ITopologicalOperator2_Buffer(double distance)

Parameters

distance double

Returns

IGeometry

ITopologicalOperator2_Clip(IEnvelope)

virtual void ITopologicalOperator2_Clip(IEnvelope clipperEnvelope)

Parameters

clipperEnvelope IEnvelope

ITopologicalOperator2_ClipDense(IEnvelope, double)

virtual void ITopologicalOperator2_ClipDense(IEnvelope clipperEnvelope, double denseDistance)

Parameters

clipperEnvelope IEnvelope
denseDistance double

ITopologicalOperator2_ConstructUnion(IEnumGeometry)

virtual void ITopologicalOperator2_ConstructUnion(IEnumGeometry geometries)

Parameters

geometries IEnumGeometry

ITopologicalOperator2_ConvexHull()

virtual IGeometry ITopologicalOperator2_ConvexHull()

Returns

IGeometry

ITopologicalOperator2_Cut(IPolyline, out IGeometry, out IGeometry)

virtual void ITopologicalOperator2_Cut(IPolyline cutter, out IGeometry leftGeom, out IGeometry rightGeom)

Parameters

cutter IPolyline
leftGeom IGeometry
rightGeom IGeometry

ITopologicalOperator2_Difference(IGeometry)

virtual IGeometry ITopologicalOperator2_Difference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator2_Intersect(IGeometry, esriGeometryDimension)

virtual IGeometry ITopologicalOperator2_Intersect(IGeometry other, esriGeometryDimension resultDimension)

Parameters

other IGeometry
resultDimension esriGeometryDimension

Returns

IGeometry

ITopologicalOperator2_IsKnownSimple

virtual bool ITopologicalOperator2_IsKnownSimple { get; }

Returns

bool

ITopologicalOperator2_IsKnownSimple_2

Indicates whether this geometry is known (or assumed) to be topologically correct.

virtual bool ITopologicalOperator2_IsKnownSimple_2 { set; }

Returns

bool

ITopologicalOperator2_IsSimple

virtual bool ITopologicalOperator2_IsSimple { get; }

Returns

bool

ITopologicalOperator2_QueryClipped(IEnvelope, IGeometry)

virtual void ITopologicalOperator2_QueryClipped(IEnvelope clipperEnvelope, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
clippedGeometry IGeometry

ITopologicalOperator2_QueryClippedDense(IEnvelope, double, IGeometry)

virtual void ITopologicalOperator2_QueryClippedDense(IEnvelope clipperEnvelope, double denseDistance, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
denseDistance double
clippedGeometry IGeometry

ITopologicalOperator2_Simplify()

virtual void ITopologicalOperator2_Simplify()

ITopologicalOperator2_SymmetricDifference(IGeometry)

virtual IGeometry ITopologicalOperator2_SymmetricDifference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator2_TopologyCache(out long)

virtual void ITopologicalOperator2_TopologyCache(out long topologyCacheHandle)

Parameters

topologyCacheHandle long

ITopologicalOperator2_Union(IGeometry)

virtual IGeometry ITopologicalOperator2_Union(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator3_Boundary

virtual IGeometry ITopologicalOperator3_Boundary { get; }

Returns

IGeometry

ITopologicalOperator3_Buffer(double)

virtual IGeometry ITopologicalOperator3_Buffer(double distance)

Parameters

distance double

Returns

IGeometry

ITopologicalOperator3_Clip(IEnvelope)

virtual void ITopologicalOperator3_Clip(IEnvelope clipperEnvelope)

Parameters

clipperEnvelope IEnvelope

ITopologicalOperator3_ClipDense(IEnvelope, double)

virtual void ITopologicalOperator3_ClipDense(IEnvelope clipperEnvelope, double denseDistance)

Parameters

clipperEnvelope IEnvelope
denseDistance double

ITopologicalOperator3_ClipToDomain()

virtual void ITopologicalOperator3_ClipToDomain()

ITopologicalOperator3_ConstructBuffers(int, ref double)

virtual IEnumGeometry ITopologicalOperator3_ConstructBuffers(int numBuffers, ref double distances)

Parameters

numBuffers int
distances double

Returns

IEnumGeometry

ITopologicalOperator3_ConstructUnion(IEnumGeometry)

virtual void ITopologicalOperator3_ConstructUnion(IEnumGeometry geometries)

Parameters

geometries IEnumGeometry

ITopologicalOperator3_ConvexHull()

virtual IGeometry ITopologicalOperator3_ConvexHull()

Returns

IGeometry

ITopologicalOperator3_Cut(IPolyline, out IGeometry, out IGeometry)

virtual void ITopologicalOperator3_Cut(IPolyline cutter, out IGeometry leftGeom, out IGeometry rightGeom)

Parameters

cutter IPolyline
leftGeom IGeometry
rightGeom IGeometry

ITopologicalOperator3_Difference(IGeometry)

virtual IGeometry ITopologicalOperator3_Difference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator3_Intersect(IGeometry, esriGeometryDimension)

virtual IGeometry ITopologicalOperator3_Intersect(IGeometry other, esriGeometryDimension resultDimension)

Parameters

other IGeometry
resultDimension esriGeometryDimension

Returns

IGeometry

ITopologicalOperator3_IntersectMultidimension(IGeometry)

virtual IGeometry ITopologicalOperator3_IntersectMultidimension(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator3_IsKnownSimple

virtual bool ITopologicalOperator3_IsKnownSimple { get; }

Returns

bool

ITopologicalOperator3_IsKnownSimple_2

virtual bool ITopologicalOperator3_IsKnownSimple_2 { set; }

Returns

bool

ITopologicalOperator3_IsSimple

virtual bool ITopologicalOperator3_IsSimple { get; }

Returns

bool

ITopologicalOperator3_QueryClipped(IEnvelope, IGeometry)

virtual void ITopologicalOperator3_QueryClipped(IEnvelope clipperEnvelope, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
clippedGeometry IGeometry

ITopologicalOperator3_QueryClippedDense(IEnvelope, double, IGeometry)

virtual void ITopologicalOperator3_QueryClippedDense(IEnvelope clipperEnvelope, double denseDistance, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
denseDistance double
clippedGeometry IGeometry

ITopologicalOperator3_Simplify()

virtual void ITopologicalOperator3_Simplify()

ITopologicalOperator3_SymmetricDifference(IGeometry)

virtual IGeometry ITopologicalOperator3_SymmetricDifference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

ITopologicalOperator3_TopologyCache(out long)

virtual void ITopologicalOperator3_TopologyCache(out long topologyCacheHandle)

Parameters

topologyCacheHandle long

ITopologicalOperator3_Union(IGeometry)

virtual IGeometry ITopologicalOperator3_Union(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

IZ2_MultiplyZs(double)

virtual void IZ2_MultiplyZs(double factor)

Parameters

factor double

IZ2_OffsetZs(double)

virtual void IZ2_OffsetZs(double Offset)

Parameters

Offset double

IZ2_ZMax

virtual double IZ2_ZMax { get; }

Returns

double

IZ2_ZMin

virtual double IZ2_ZMin { get; }

Returns

double

IdCount

Get Id Count.

virtual int IdCount { get; }

Returns

int

IndexedEnumVertices[IGeometry]

virtual IEnumVertex IndexedEnumVertices[IGeometry queryGeometry] { get; }

Parameters

queryGeometry IGeometry

Returns

IEnumVertex

InsertGeometries(int, int, ref IGeometry)

Inserts at the specified index references to some number of geometries in the input array. This method is intended for internal use only.

virtual void InsertGeometries(int Index, int Count, ref IGeometry newGeometries)

Parameters

Index int
Count int
newGeometries IGeometry

Remarks

The geometries are inserted before the ith (index) element in the list. Use an array of geometries and give the exact number (count ) of elements in the array. A too large value for the count parameter causes exceeding the boundary of the array and will cause an application error. To place the geometries last in the collection then use the addGeometries method.

 

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

InsertGeometryCollection(int, IGeometryCollection)

Inserts at the specified index references to all if the geometries in the input collection.

virtual void InsertGeometryCollection(int Index, IGeometryCollection newGeometries)

Parameters

Index int
newGeometries IGeometryCollection

Remarks

InsertGeometryCollection merges one GeometryCollection within another at a specified index.

[C#]
//C# Example: Insert GeometryCollection geomColl2 within geomColl at index 3.
geomColl.InsertGeometryCollection(3, geomColl2);

InsertPointCollection(int, IPointCollection)

Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.

virtual void InsertPointCollection(int Index, IPointCollection newPoints)

Parameters

Index int
newPoints IPointCollection

InsertPoints(int, int, ref IPoint)

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

virtual void InsertPoints(int Index, int Count, ref IPoint newPoints)

Parameters

Index int
Count int
newPoints IPoint

InsertWKSPointZs(int, int, ref WKSPointZ)

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

virtual void InsertWKSPointZs(int Index, int Count, ref WKSPointZ newPoints)

Parameters

Index int
Count int
newPoints WKSPointZ

InsertWKSPoints(int, int, ref WKSPoint)

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

virtual void InsertWKSPoints(int Index, int Count, ref WKSPoint newPoints)

Parameters

Index int
Count int
newPoints WKSPoint

InterfaceSupportsErrorInfo(ref Guid)

virtual void InterfaceSupportsErrorInfo(ref Guid riid)

Parameters

riid Guid

InterpolateFromSurface(IFunctionalSurface)

virtual void InterpolateFromSurface(IFunctionalSurface interpolationSurface)

Parameters

interpolationSurface IFunctionalSurface

InterpolateZsBetween(int, int, int, int)

virtual void InterpolateZsBetween(int startPart, int startPoint, int endPart, int endPoint)

Parameters

startPart int
startPoint int
endPart int
endPoint int

Intersect(IGeometry, esriGeometryDimension)

Constructs the geometry that is the set-theoretic intersection of the input geometries. Use different resultDimension values to generate results of different dimensions.

virtual IGeometry Intersect(IGeometry other, esriGeometryDimension resultDimension)

Parameters

other IGeometry
resultDimension esriGeometryDimension

Returns

IGeometry

Remarks

Intersection is basically an AND between input geometries.

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

Note that when esriGeometryNoDimension is specified as resultDimension, the output will be in the dimension of the minimum dimension of the input geometries.

This method does not support GeometryBags.

Since ArcGIS 9.2, Intersect has a larger cost - it takes longer to run the method.  Therefore, it is a better approach to test if the two geometries are disjoint before calling Intersect.

Intersection Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

IntersectMultidimension(IGeometry)

Constructs the set-theoretic intersection of the inputs. The results are returned in a geometry bag with one element per result dimension.

virtual IGeometry IntersectMultidimension(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

Remarks

This method only works with the following combination of geometries: Polygon with Polyline (and vice versa), Polyline with Multipoint (and vice versa), Polygon with Multipoint (and vice versa).
 
When using this method to intersect a Polygon with a Polyline (or vice versa) the geometry returned will be a GeometryBag.

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

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

InvalXYFootprint()

Notifies the multipatch that its cached footprint has been modified by an outside agent. The footprint will be recalculated the next time it is requested.

virtual void InvalXYFootprint()

IsDirty()

virtual void IsDirty()

IsEmpty

Indicates whether this geometry contains any points.

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

IsKnownSimple

Indicates whether this geometry is known (or assumed) to be topologically correct.

virtual bool IsKnownSimple { get; }

Returns

bool

Remarks

Here is the status of the IsKnownSimple flag in some common situations:


IsKnownSimple = 'False'
    - A non-empty newly created geometry. For example, creating a polygon using IPointCollection sets the flag IsKnownSimple = 'false' on that geometry.
    - Geometry after projection (IGeometry::Project )
    - Geometry after generalization (IPolycurve::Generalize ) or smoothing(IPolycurve::Smooth )
    - …




 

IsKnownSimple = 'True'
    - A geometry coming directly from a feature class
    - An empty geometry
    - Output geometry of any method on ITopologicalOperator
    - …



 

 

This method does not support GeometryBags.

IsMaterialTextured[int]

Get Is Material textured.

virtual bool IsMaterialTextured[int Index] { get; }

Parameters

Index int

Returns

bool

IsNear(IGeometry, double)

Indicates if this geometry is within distance from the other geometry.

virtual bool IsNear(IGeometry pOther, double distance)

Parameters

pOther IGeometry
distance double

Returns

bool

IsNear3D(IGeometry, double)

Indicates if this geometry is within distance from the other geometry; both geometries must have Zs.

virtual bool IsNear3D(IGeometry pOther, double distance)

Parameters

pOther IGeometry
distance double

Returns

bool

IsSimple

Indicates whether this geometry is known (or assumed) to be topologically correct, after explicitly determining this if the geometry is not already known (or assumed) to be simple.

virtual bool IsSimple { get; }

Returns

bool

Remarks

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

The xy cluster tolerance value of the geometry's associated spatial reference is used by this method. If the goal of this method is to determine if a geometry can be persisted in an sde (or other integer-based) layer without alteration, you may wish to use the minimum xy cluster tolerance value (ISpatialReferenceTolerance::SetMinimumXYTolerance) before applying this method (don't forget to set it back).

This method does not support GeometryBags.

ITopologicalOperator IsSimple SimplePolygon Example

ITopologicalOperator IsSimple SimplePolyline Example

ITopologicalOperator IsSimple SimplePoint Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

IsSimpleEx[esriNonSimpleReasonEnum]

Determines why a geometry is not simple. Currently only implemented for polygons.

virtual bool IsSimpleEx[out esriNonSimpleReasonEnum reason] { get; }

Parameters

reason esriNonSimpleReasonEnum

Returns

bool

Remarks

Note: All geometries involved in ITopologicalOperator operations must be high-level geometries. High-Level geometries are point, multipoint, polyline and polygon. To use it with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), path or ring they must be wrapped into high-level geometries type.

 

The xy cluster tolerance value of the geometry's associated spatial reference is used by this method. If the goal of this method is to determine if a geometry can be persisted in an sde (or other integer-based) layer without alteration, you may wish to use the minimum xy cluster tolerance value (ISpatialReferenceTolerance::SetMinimumXYTolerance) before applying this method (don't forget to set it back).

[C#]

//How to use get_IsSimpleEx

ITopologicalOperator3 topoOp3 = inGeom as ITopologicalOperator3; //Must be polygon

ESRI.ArcGIS.Geometry.esriNonSimpleReasonEnum reason = ESRI.ArcGIS.Geometry.esriNonSimpleReasonEnum.esriNonSimpleOK; //Initialize

topoOp3.IsKnownSimple_2 = false;

Boolean pBool = topoOp3.get_IsSimpleEx(out reason); //Inspect pReason for description code

 

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

LabelPoint

A point guaranteed to be inside this area.

virtual IPoint LabelPoint { get; }

Returns

IPoint

LabelPoint3D

A point guaranteed to be on this 3D surface area.

virtual IPoint LabelPoint3D { get; }

Returns

IPoint

Load(IStream)

virtual void Load(IStream pstm)

Parameters

pstm IStream

MAware

Indicates whether or not the geometry is aware of and capable of handling Ms.

virtual bool MAware { get; set; }

Returns

bool

MCount

Get M Count.

virtual int MCount { get; }

Returns

int

MMax

The maximum M value.

virtual double MMax { get; }

Returns

double

MMin

The minimum M value.

virtual double MMin { get; }

Returns

double

MSimple

Indicates if all the Ms are valid numbers.

virtual bool MSimple { get; }

Returns

bool

MaterialColor[int]

Get material color.

virtual int MaterialColor[int Index] { get; }

Parameters

Index int

Returns

int

MaterialCount

Get Material Count.

virtual int MaterialCount { get; }

Returns

int

MaterialCullBackface[int]

Get backface culling enabled,

virtual bool MaterialCullBackface[int Index] { get; }

Parameters

Index int

Returns

bool

Remarks

Backface Culling is a property acquired through the process of importing 3D models into the MultiPatch format. It cannot currently be set programmatically.

MaterialTextureBytesPerPixel[int]

Get Material texture bytes per pixel.

virtual int MaterialTextureBytesPerPixel[int Index] { get; }

Parameters

Index int

Returns

int

Remarks

This property shows how many bands exist in a geometry material.  For a geometry material, the minimum value of this property is 1 and the maximum is 4.  The fourth channel is usually the alpha channel used for material pixel transparency - the 'A' in 'RGBA'.

MaterialTextureColumnCount[int]

Get Material texture column count.

virtual int MaterialTextureColumnCount[int Index] { get; }

Parameters

Index int

Returns

int

MaterialTexturePixelColor[int, int, int]

Get Material texture pixel color.

virtual int MaterialTexturePixelColor[int Index, int row, int column] { get; }

Parameters

Index int
row int
column int

Returns

int

MaterialTextureRowCount[int]

Get Material texture row count.

virtual int MaterialTextureRowCount[int Index] { get; }

Parameters

Index int

Returns

int

MaterialTransparencyPercent[int]

Get transparency %, in range of 0 - 100

virtual int MaterialTransparencyPercent[int Index] { get; }

Parameters

Index int

Returns

int

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

Move3D(double, double, double)

Moves the object by dx, dy and dz along the x, y, and z axes respectively.

virtual void Move3D(double dx, double dy, double dz)

Parameters

dx double
dy double
dz double

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

MoveVector3D(IVector3D)

Moves the object by an offset defined by a 3D vector.

virtual void MoveVector3D(IVector3D v)

Parameters

v IVector3D

MultiplyMs(double)

Multiplies all the M values by a factor.

virtual void MultiplyMs(double factor)

Parameters

factor double

Remarks

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

[C#]

    public IPolyline MultiplyMs(IPolyline polyline, double factor)
    {
        //Offset (add) the M values on a PolyLine by a factor
        IMAware mAware = polyline as IMAware;
        IMCollection mCollection = mAware as IMCollection;
        if (mAware.MAware)
        {
            mCollection.MultiplyMs(factor);
            return mCollection as IPolyline;
        }
        else
        {
            return null;
        }












    }

MultiplyZs(double)

Multiplies all the Z values by a factor.

virtual void MultiplyZs(double factor)

Parameters

factor double

NormalCount

Get Normal Count.

virtual int NormalCount { get; }

Returns

int

OffsetMs(double)

Offsets all the M values by an offset value.

virtual void OffsetMs(double Offset)

Parameters

Offset double

Remarks

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

[C#]

    public IPolyline OffsetMs(IPolyline polyline, double offset)
    {
        //Offset (add) the M values on a PolyLine by a factor
        IMAware mAware = polyline as IMAware;
        IMCollection mCollection = mAware as IMCollection;
        if (mAware.MAware)
        {
            mCollection.OffsetMs(offset);
            return mCollection as IPolyline;
        }
        else
        {
            return null;
        }
    }













OffsetZs(double)

Offsets all the Z values by an offset value.

virtual void OffsetZs(double Offset)

Parameters

Offset double

Overlaps(IGeometry)

Indicates if the intersection of the two geometries has the same dimension as one of the input geometries.

virtual bool Overlaps(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Overlaps only applies to polyline/polyline, polygon/polygon and multipoint/multipoint relations.

Two geometries do not overlap if either one is empty.

Overlaps examples. Only "true" relationships are showed in this picture.

PatchCount

Get Patch Count.

virtual int PatchCount { get; }

Returns

int

PatchM[int, int]

Get M for patch at vertex index.

virtual double PatchM[int patch, int Index] { get; }

Parameters

patch int
Index int

Returns

double

PatchMaterialIndex[int]

Get patch material index.

virtual int PatchMaterialIndex[int patch] { get; }

Parameters

patch int

Returns

int

PatchPriority[int]

Get patch priority.

virtual int PatchPriority[int patch] { get; }

Parameters

patch int

Returns

int

Remarks

When overlapping patches are defined within the same multipatch, patch priorities can be used to explicitly specify the order in which patches should be drawn when rendered. The larger the number assigned, the higher the patch priority or precedence the patch takes when rendered.

PatchTextureVertex[int, int]

Get Texture WKSPoint for a patch at vertex index.

virtual WKSPoint PatchTextureVertex[int patch, int Index] { get; }

Parameters

patch int
Index int

Returns

WKSPoint

PatchTextureVertexCount[int]

Get texture vertex count for a patch.

virtual int PatchTextureVertexCount[int patch] { get; }

Parameters

patch int

Returns

int

Remarks

The index specified refers to the index within the list of texture vertices. This is different than the index used to specify geometry vertices.

PatchType[int]

Get patch type.

virtual esriPatchType PatchType[int patch] { get; }

Parameters

patch int

Returns

esriPatchType

PatchVertex[int, int]

Get Point for patch at vertex index.

virtual WKSPointZ PatchVertex[int patch, int Index] { get; }

Parameters

patch int
Index int

Returns

WKSPointZ

PatchVertexCount[int]

Get count of vertices in patch.

virtual int PatchVertexCount[int patch] { get; }

Parameters

patch int

Returns

int

Remarks

The index specified refers to the index within the list of geometry vertices. This is different than the index used to specify texture vertices.

PatchVertexID[int, int]

Get vertex Id for a patch at vertex index.

virtual int PatchVertexID[int patch, int Index] { get; }

Parameters

patch int
Index int

Returns

int

Point[int]

A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.

virtual IPoint Point[int i] { get; }

Parameters

i int

Returns

IPoint

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/point.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 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>
GetPointGeometry()</span></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>
<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">
 </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="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 = ConstructPoint3D(x, y, z);</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="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
<span style=
"mso-spacerun: yes">           </span>
MakeZAware(point <span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>);</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> point <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 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

Note: Since a copy of the point is returned by Point (get_Point) for path, ring, polyline and polygon the IPointCollection::UpdatePoint method must be used to update points on those geometry types.

PointCount

The number of points in the collection.

virtual int PointCount { get; }

Returns

int

PointIDAware

Indicates whether or not the geometry is aware of and capable of handling PointIDs.

virtual bool PointIDAware { get; set; }

Returns

bool

PointIDSimple

Indicates if all PointID values for this geometry are well-defined. Only works if geometry is aware of PointIDs.

virtual bool PointIDSimple { get; }

Returns

bool

Project(ISpatialReference)

Projects this geometry into a new spatial reference.

virtual void 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());

Project5(ISpatialReference, int)

Same as Project, but with additional parameter projectionHint.

virtual void Project5(ISpatialReference newSpatialReference, int ProjectionHint)

Parameters

newSpatialReference ISpatialReference
ProjectionHint int

ProjectEx(ISpatialReference, esriTransformDirection, IGeoTransformation, bool, double, double)

Projects a geometry, optionally applies a GeoTransformation, and optionally densifies the geometry.

virtual void ProjectEx(ISpatialReference newReferenceSystem, esriTransformDirection Direction, IGeoTransformation GeoTransformation, bool bAngularDensify, double maxSegmentLength, double maxDeviation)

Parameters

newReferenceSystem ISpatialReference
Direction esriTransformDirection
GeoTransformation IGeoTransformation
bAngularDensify bool
maxSegmentLength double
maxDeviation double

Remarks

By default, ProjectEx will not densify geometries as they are projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Set the bAngularDensify parameter if you want to densify the geometries while they are projected.

[C#]

    //This example demonstrates how to use IGeometry2::ProjectEx
    public void ProjectExExample()
    {
        //Create source spatial reference
        ISpatialReferenceFactory spatialReferenceFactory = new SpatialReferenceEnvironmentClass();
        ISpatialReference spatialReference = spatialReferenceFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);
        spatialReference.SetFalseOriginAndUnits(-80.0000000232831, 39.9999999767169, 42949672.9);
        //Create envelope and define its spatial reference
        IEnvelope envelope = new EnvelopeClass();
        envelope.PutCoords(-68.6076204314651, 49.6186709634653, -68.5531907607304, 49.6530789785679);
        envelope.SpatialReference = spatialReference;
        //Destination spatial reference
        IProjectedCoordinateSystem projectedCoordinateSystem = spatialReferenceFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1927UTM_19N);
        //Define the XYDomain equivalent to SetFalseOriginAndUnits
        projectedCoordinateSystem.SetDomain(500000, 600000, 5300000, 5600000);
        //Create a Geotransformation (Datum transformation)
        IGeoTransformation geoTransformation = spatialReferenceFactory.CreateGeoTransformation((int)esriSRGeoTransformationType.esriSRGeoTransformation_NAD1927_To_WGS1984_12) as IGeoTransformation;















        String report = "Print envelope coordinates before projection:\n" +
        envelope.XMin + " , " + envelope.YMin + " , " + envelope.XMax + " , " + envelope.YMax + "\n\n\n";

        //Project envelope
        IGeometry2 geometry = envelope as IGeometry2;
        geometry.ProjectEx(projectedCoordinateSystem as ISpatialReference, esriTransformDirection.esriTransformReverse, geoTransformation, false, 0, 0);

        report = report + "Print envelope coordinates after projection:\n" +
        envelope.XMin + " , " + envelope.YMin + " , " + envelope.XMax + " , " + envelope.YMax;
        System.Windows.Forms.MessageBox.Show(report);
    }


ProjectEx5(ISpatialReference, esriTransformDirection, ITransformation, bool, double, double, int)

Same as ProjectEx, but with additional parameter projectionHint.

virtual void ProjectEx5(ISpatialReference newReferenceSystem, esriTransformDirection Direction, ITransformation Transformation, bool bAngularDensify, double maxSegmentLength, double maxDeviation, int ProjectionHint)

Parameters

newReferenceSystem ISpatialReference
Direction esriTransformDirection
Transformation ITransformation
bAngularDensify bool
maxSegmentLength double
maxDeviation double
ProjectionHint int

Remarks

By default, ProjectEx will not densify geometries as they are projected. This can lead to the output geometries not reflecting the 'true' shape in the new coordinate system. A straight line in one coordinate system is not necessarily a straight line in a different coordinate system. Set the bAngularDensify parameter if you want to densify the geometries while they are projected.

ProjectToPlane(IPoint, IVector3D, IVector3D)

Generates a polygon footprint for the object in an arbitrary plane. The footprint may have multiple parts.

virtual IGeometry ProjectToPlane(IPoint planarOrigin, IVector3D planarPositiveX, IVector3D planarNorm)

Parameters

planarOrigin IPoint
planarPositiveX IVector3D
planarNorm IVector3D

Returns

IGeometry

Remarks

This method can be used to get the xy-footprint of a multipatch if set all the parameters to Null.


[C#]

 

        public static void TransformMultiPatchGeometry()

        {

            //Transform3D: Cylinder Projected To XY Plane Via ProjectToPlane()

 

            //Define Origin At Which ProjectToPlane Operation Should Be Performed


            IPoint planarOriginPoint = ConstructPoint3D(0, 0, 0);

 

            //Construct A Vector3D Corresponding To The Positive X Vector

 

            IVector3D planarPositiveXVector3D = ConstructVector3D(10, 0, 0);

 

            //Construct A Vector3D Corresponding To The Normal Vector

 

            IVector3D planarNormalVector3D = ConstructVector3D(0, 0, 10);

 

            IGeometry geometry = GetMultiPatchGeometry();

 

            ITransform3D transform3D = geometry as ITransform3D;

 

IGeometry

projectedGeometry =

transform3D.ProjectToPlane(

planarOriginPoint, 

 

                          planarPositiveXVector3D,

planarNormalVector3D

                   );

        }

        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }




PutRingType(IRing, esriMultiPatchRingType)

Defines the type of the input Ring.

virtual void PutRingType(IRing queryRing, esriMultiPatchRingType ringType)

Parameters

queryRing IRing
ringType esriMultiPatchRingType

Remarks

 

IMultiPatch PutRingType Example

[C#]

 

        private static object _missing = Type.Missing;

 

        public static void QueryMultiPatchRings()

        {

            const esriMultiPatchRingType DesiredRingTypeMask = esriMultiPatchRingType.esriMultiPatchBeginningRingMask;

 

            IGeometryBridge geometryBridge = new GeometryEnvironmentClass();

 

            IMultiPatch multiPatch = GetMultiPatchGeometry() as IMultiPatch;

 

            int beginningRingCount = multiPatch.get_BeginningRingCount((int)DesiredRingTypeMask);

            Trace.WriteLine("BeginningRingCount = " + beginningRingCount);

           

            IRing[] beginningRingArray = new IRing[beginningRingCount];

 

            geometryBridge.QueryBeginningRings(multiPatch, (int)DesiredRingTypeMask, ref beginningRingArray);

 

            for (int i = 0; i < beginningRingArray.Length; i++)

            {

                IRing beginningRing = beginningRingArray[i];

                Trace.WriteLine("BeginningRing[" + i + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].IsBeginningRing = " + IsBeginningRing(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].Length = " + beginningRing.Length);

 

                int followingRingCount = multiPatch.get_FollowingRingCount(beginningRing);

                Trace.WriteLine("BeginningRing[" + i + "].FollowingRingCount = " + followingRingCount);

 

                IRing[] followingRingArray = new IRing[followingRingCount];

 

                geometryBridge.QueryFollowingRings(multiPatch, beginningRing, ref followingRingArray);

 

                for (int j = 0; j < followingRingArray.Length; j++)

                {

                    IRing followingRing = followingRingArray[j];

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].IsBeginningRing = " + IsBeginningRing(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].Length = " + followingRing.Length);

                   

                    IRing foundBeginningRing = multiPatch.FindBeginningRing(followingRing);

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.IsBeginningRing = " + IsBeginningRing(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.Length = " + foundBeginningRing.Length);

                }

            }

        }

 

        private static esriMultiPatchRingType GetMultiPatchRingType(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return multiPatchRingType;

        }

 

        private static bool IsBeginningRing(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return isBeginningRing;

        }

 

        private static IGeometry GetMultiPatchGeometry()

        {

            //RingGroup: Upright Square Composed Of Multiple Exterior Rings And Multiple Interior Rings

 

            IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();

 

            IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;

 

            //Exterior Ring 1

 

            IPointCollection exteriorRing1PointCollection = new RingClass();

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing1, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 1

 

            IPointCollection interiorRing1PointCollection = new RingClass();

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing1, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 2

 

            IPointCollection exteriorRing2PointCollection = new RingClass();

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing2, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 2

 

            IPointCollection interiorRing2PointCollection = new RingClass();

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing2, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 3

 

            IPointCollection exteriorRing3PointCollection = new RingClass();

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing3, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            return multiPatchGeometryCollection as IGeometry;

        }

 

        public static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

 

QueryBeginningRings(int, int, out IRing)

Populates an array with references to all beginning rings of the specified types. This method is intended for internal use only.

virtual void QueryBeginningRings(int ringTypesDesired, int numBeginningRingsRequested, out IRing beginningRings)

Parameters

ringTypesDesired int
numBeginningRingsRequested int
beginningRings IRing

Remarks

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

[C#]

 

        private static object _missing = Type.Missing;

 

        public static void QueryMultiPatchRings()

        {

            const esriMultiPatchRingType DesiredRingTypeMask = esriMultiPatchRingType.esriMultiPatchBeginningRingMask;

 

            IGeometryBridge geometryBridge = new GeometryEnvironmentClass();

 

            IMultiPatch multiPatch = GetMultiPatchGeometry() as IMultiPatch;

 

            int beginningRingCount = multiPatch.get_BeginningRingCount((int)DesiredRingTypeMask);

            Trace.WriteLine("BeginningRingCount = " + beginningRingCount);

           

            IRing[] beginningRingArray = new IRing[beginningRingCount];

 

            geometryBridge.QueryBeginningRings(multiPatch, (int)DesiredRingTypeMask, ref beginningRingArray);

 

            for (int i = 0; i < beginningRingArray.Length; i++)

            {

                IRing beginningRing = beginningRingArray[i];

                Trace.WriteLine("BeginningRing[" + i + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].IsBeginningRing = " + IsBeginningRing(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].Length = " + beginningRing.Length);

 

                int followingRingCount = multiPatch.get_FollowingRingCount(beginningRing);

                Trace.WriteLine("BeginningRing[" + i + "].FollowingRingCount = " + followingRingCount);

 

                IRing[] followingRingArray = new IRing[followingRingCount];

 

                geometryBridge.QueryFollowingRings(multiPatch, beginningRing, ref followingRingArray);

 

                for (int j = 0; j < followingRingArray.Length; j++)

                {

                    IRing followingRing = followingRingArray[j];

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].IsBeginningRing = " + IsBeginningRing(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].Length = " + followingRing.Length);

                   

                    IRing foundBeginningRing = multiPatch.FindBeginningRing(followingRing);

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.IsBeginningRing = " + IsBeginningRing(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.Length = " + foundBeginningRing.Length);

                }

            }

        }

 

        private static esriMultiPatchRingType GetMultiPatchRingType(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return multiPatchRingType;

        }

 

        private static bool IsBeginningRing(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return isBeginningRing;

        }

 

        private static IGeometry GetMultiPatchGeometry()

        {

            //RingGroup: Upright Square Composed Of Multiple Exterior Rings And Multiple Interior Rings

 

            IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();

 

            IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;

 

            //Exterior Ring 1

 

            IPointCollection exteriorRing1PointCollection = new RingClass();

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing1, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 1

 

            IPointCollection interiorRing1PointCollection = new RingClass();

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing1, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 2

 

            IPointCollection exteriorRing2PointCollection = new RingClass();

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing2, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 2

 

            IPointCollection interiorRing2PointCollection = new RingClass();

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing2, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 3

 

            IPointCollection exteriorRing3PointCollection = new RingClass();

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing3, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            return multiPatchGeometryCollection as IGeometry;

        }

 

        public static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

 

QueryCentroid(IPoint)

Copies the centroid of this area to the specified point.

virtual void QueryCentroid(IPoint Center)

Parameters

Center IPoint

Remarks

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

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

 

Centroid Example

QueryCentroid3D(IPoint)

Copies the centroid of this 3D surface area to the specified point.

virtual void QueryCentroid3D(IPoint Center)

Parameters

Center IPoint

QueryClipped(IEnvelope, IGeometry)

Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope.

virtual void QueryClipped(IEnvelope clipperEnvelope, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
clippedGeometry IGeometry

Remarks

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

The other geometry must be an high-level geometry. High-Level geometries are point, multipoint, polyline and polygon. To use it with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), path or ring they must be wrapped into high-level geometries type. The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

This method does not support GeometryBags.

QueryClipped Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

QueryClippedDense(IEnvelope, double, IGeometry)

Redefines clippedGeometry to be the intersection of this geometry and the clipping envelope; densifies lines in the output contributed by the clipping envelope.

virtual void QueryClippedDense(IEnvelope clipperEnvelope, double denseDistance, IGeometry clippedGeometry)

Parameters

clipperEnvelope IEnvelope
denseDistance double
clippedGeometry IGeometry

Remarks

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

The other geometry must be an high-level geometry. High-Level geometries are point, multipoint, polyline and polygon. To use it with low-level geometries such as segments (Line, Circular Arc, Elliptic Arc, Bézier Curve), path or ring they must be wrapped into high-level geometries type. The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

This method does not support GeometryBags.

QueryEnvelope(IEnvelope)

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

virtual void 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

QueryFollowingRings(IRing, int, out IRing)

Populates an array with references to following rings that are in the ring group that starts with the specified beginning ring. This method is intended for internal use only.

virtual void QueryFollowingRings(IRing beginningRing, int numFollowingRingsRequested, out IRing followingRings)

Parameters

beginningRing IRing
numFollowingRingsRequested int
followingRings IRing

Remarks

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

[C#]

 

        private static object _missing = Type.Missing;

 

        public static void QueryMultiPatchRings()

        {

            const esriMultiPatchRingType DesiredRingTypeMask = esriMultiPatchRingType.esriMultiPatchBeginningRingMask;

 

            IGeometryBridge geometryBridge = new GeometryEnvironmentClass();

 

            IMultiPatch multiPatch = GetMultiPatchGeometry() as IMultiPatch;

 

            int beginningRingCount = multiPatch.get_BeginningRingCount((int)DesiredRingTypeMask);

            Trace.WriteLine("BeginningRingCount = " + beginningRingCount);

           

            IRing[] beginningRingArray = new IRing[beginningRingCount];

 

            geometryBridge.QueryBeginningRings(multiPatch, (int)DesiredRingTypeMask, ref beginningRingArray);

 

            for (int i = 0; i < beginningRingArray.Length; i++)

            {

                IRing beginningRing = beginningRingArray[i];

                Trace.WriteLine("BeginningRing[" + i + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].IsBeginningRing = " + IsBeginningRing(multiPatch, beginningRing));

                Trace.WriteLine("BeginningRing[" + i + "].Length = " + beginningRing.Length);

 

                int followingRingCount = multiPatch.get_FollowingRingCount(beginningRing);

                Trace.WriteLine("BeginningRing[" + i + "].FollowingRingCount = " + followingRingCount);

 

                IRing[] followingRingArray = new IRing[followingRingCount];

 

                geometryBridge.QueryFollowingRings(multiPatch, beginningRing, ref followingRingArray);

 

                for (int j = 0; j < followingRingArray.Length; j++)

                {

                    IRing followingRing = followingRingArray[j];

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].IsBeginningRing = " + IsBeginningRing(multiPatch, followingRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].Length = " + followingRing.Length);

                   

                    IRing foundBeginningRing = multiPatch.FindBeginningRing(followingRing);

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.MultiPatchRingType = " + GetMultiPatchRingType(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.IsBeginningRing = " + IsBeginningRing(multiPatch, foundBeginningRing));

                    Trace.WriteLine("BeginningRing[" + i + "].FollowingRing[" + j + "].FoundBeginningRing.Length = " + foundBeginningRing.Length);

                }

            }

        }

 

        private static esriMultiPatchRingType GetMultiPatchRingType(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return multiPatchRingType;

        }

 

        private static bool IsBeginningRing(IMultiPatch multiPatch, IRing ring)

        {

            bool isBeginningRing = false;

 

            esriMultiPatchRingType multiPatchRingType = multiPatch.GetRingType(ring, ref isBeginningRing);

 

            return isBeginningRing;

        }

 

        private static IGeometry GetMultiPatchGeometry()

        {

            //RingGroup: Upright Square Composed Of Multiple Exterior Rings And Multiple Interior Rings

 

            IGeometryCollection multiPatchGeometryCollection = new MultiPatchClass();

 

            IMultiPatch multiPatch = multiPatchGeometryCollection as IMultiPatch;

 

            //Exterior Ring 1

 

            IPointCollection exteriorRing1PointCollection = new RingClass();

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, -5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(-5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, 5), ref _missing, ref _missing);

            exteriorRing1PointCollection.AddPoint(ConstructPoint3D(5, 0, -5), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing1, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 1

 

            IPointCollection interiorRing1PointCollection = new RingClass();

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, -4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, 4), ref _missing, ref _missing);

            interiorRing1PointCollection.AddPoint(ConstructPoint3D(-4, 0, -4), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing1 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing1, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 2

 

            IPointCollection exteriorRing2PointCollection = new RingClass();

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, -3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(-3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, 3), ref _missing, ref _missing);

            exteriorRing2PointCollection.AddPoint(ConstructPoint3D(3, 0, -3), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing2, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            //Interior Ring 2

 

            IPointCollection interiorRing2PointCollection = new RingClass();

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, -2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, 2), ref _missing, ref _missing);

            interiorRing2PointCollection.AddPoint(ConstructPoint3D(-2, 0, -2), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(interiorRing2 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(interiorRing2, esriMultiPatchRingType.esriMultiPatchInnerRing);

 

            //Exterior Ring 3

 

            IPointCollection exteriorRing3PointCollection = new RingClass();

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, -1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(-1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, 1), ref _missing, ref _missing);

            exteriorRing3PointCollection.AddPoint(ConstructPoint3D(1, 0, -1), ref _missing, ref _missing);

 

            multiPatchGeometryCollection.AddGeometry(exteriorRing3 as IGeometry, ref _missing, ref _missing);

 

            multiPatch.PutRingType(exteriorRing3, esriMultiPatchRingType.esriMultiPatchOuterRing);

 

            return multiPatchGeometryCollection as IGeometry;

        }

 

        public static IPoint ConstructPoint3D(double x, double y, double z)

        {

            IPoint point = ConstructPoint2D(x, y);

            point.Z = z;

 

            return point;

        }

 

        public static IPoint ConstructPoint2D(double x, double y)

        {

            IPoint point = new PointClass();

            point.PutCoords(x, y);

 

            return point;

        }

 

QueryGeometries(int, int, out IGeometry)

Populates the array with references to a sub-sequence of geometries. This method is intended for internal use only.

virtual void QueryGeometries(int Index, int Count, out IGeometry geometries)

Parameters

Index int
Count int
geometries IGeometry

Remarks

Note: The GeometryType returned by the QueryGeometries method depends on which object type points the IGeometryCollection pointer.

IGeometryCollection Object GeometryType Returned Object GeometryType
Polygon
Rings
Polyline
Paths
Multipoint
Points
Multipatch
TriangleFans or TriangleStrips or Rings
TriangleFan
Points
TriangleStrip
Points
Geometry Bag
Any type of IGeometry

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

QueryLabelPoint(IPoint)

Copies to the input point a point guaranteed to be inside this area.

virtual void QueryLabelPoint(IPoint LabelPoint)

Parameters

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

QueryLabelPoint3D(IPoint)

Copies to the input point a point guaranteed to be on this 3D surface area.

virtual void QueryLabelPoint3D(IPoint LabelPoint)

Parameters

LabelPoint 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

QueryNearestPoint3D(IPoint, esriSegmentExtension, IPoint)

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

virtual void QueryNearestPoint3D(IPoint pInP, esriSegmentExtension extension, IPoint pNearest)

Parameters

pInP IPoint
extension esriSegmentExtension
pNearest IPoint

Remarks

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

[C#]

QueryNearestPoint3D graphic example.

public static void QueryNearestPoint3D()
{
  IGeometry pointGeometry = GetPointGeometry();
  IGeometry envelopeGeometry = GetEnvelopeGeometry();
  IProximityOperator3D proximityOperator3D = envelopeGeometry as IProximityOperator3D;
  IPoint nearestPoint3D = new PointClass();
  proximityOperator3D.QueryNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension, nearestPoint3D);
  //nearestPoint3D = (5.393, -0.583, -6.043)
}








QueryPatchNormal(int, int, IVector3D)

Copies the Normal for patch at specified vertex index into the input vector.

virtual void QueryPatchNormal(int patch, int Index, IVector3D pNormal)

Parameters

patch int
Index int
pNormal IVector3D

Remarks

A Vector3D object must be instantiated before being passed as the normal parameter to this method.

QueryPoint(int, IPoint)

Queries for a point in the PointCollection at given index.

virtual void QueryPoint(int Index, IPoint Point)

Parameters

Index int
Point 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.

QueryPoints(int, int, ref IPoint)

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

virtual void QueryPoints(int Index, int Count, ref IPoint Points)

Parameters

Index int
Count int
Points IPoint

QueryWKSEnvelope(out WKSEnvelope)

Defines the specified wksenvelope to be the current extent of this geometry in the x-y plane.

virtual void QueryWKSEnvelope(out WKSEnvelope e)

Parameters

e WKSEnvelope

QueryWKSPointZs(int, int, out WKSPointZ)

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

virtual void QueryWKSPointZs(int Index, int Count, out WKSPointZ pointStructures)

Parameters

Index int
Count int
pointStructures WKSPointZ

QueryWKSPoints(int, int, out WKSPoint)

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

virtual void QueryWKSPoints(int Index, int Count, out WKSPoint pointStructures)

Parameters

Index int
Count int
pointStructures WKSPoint

Relation(IGeometry, string)

Indicates if the defined relationship exists.

virtual bool Relation(IGeometry other, string relationDescription)

Parameters

other IGeometry
relationDescription string

Returns

bool

Remarks

Here is a VBA example of using the "RELATE" function to detect overlapping polylines. It assumes two polyline features are selected. G1 and G2 are placeholders for, in this example, the VBA variables r1 and r2.

Option Explicit

Public Sub overlapstest()
Dim ef As IEnumFeature
Dim d As IMxDocument
Set d = ThisDocument
Set ef = d.FocusMap.FeatureSelection
Dim r1 As IRelationalOperator, r2 As IRelationalOperator
Set r1 = ef.Next.Shape
Set r2 = ef.Next.Shape






Debug.Print "relation:", r1.Relation(r2, "RELATE(G1, G2, ""1********"")")

End Sub

RemoveGeometries(int, int)

Removes references to some geometries from this collection.

virtual void RemoveGeometries(int Index, int Count)

Parameters

Index int
Count int

Remarks

RemoveGeometries deletes count number of geometries from the index location.

RemovePoints(int, int)

Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.

virtual void RemovePoints(int Index, int Count)

Parameters

Index int
Count int

ReplacePointCollection(int, int, IPointCollection)

Replaces vertices/points within a PointCollection.

virtual void ReplacePointCollection(int Index, int goingAway, IPointCollection newPoints)

Parameters

Index int
goingAway int
newPoints IPointCollection

ReplacePoints(int, int, int, ref IPoint)

Replaces vertices/points within a PointCollection.

virtual void ReplacePoints(int Index, int comingIn, int goingAway, ref IPoint newPoints)

Parameters

Index int
comingIn int
goingAway int
newPoints IPoint

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.

ReturnDistance3D(IGeometry)

Returns the minimal distance between two geometries.

virtual double ReturnDistance3D(IGeometry pOther)

Parameters

pOther IGeometry

Returns

double

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

ReturnNearestPoint3D(IPoint, esriSegmentExtension)

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

virtual IPoint ReturnNearestPoint3D(IPoint pInP, esriSegmentExtension extension)

Parameters

pInP IPoint
extension esriSegmentExtension

Returns

IPoint

Remarks

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

[C#]

 

        public static void ReturnNearestPoint3D()

        {

IGeometry

pointGeometry = GetPointGeometry();

IGeometry envelopeGeometry = GetEnvelopeGeometry();


IProximityOperator3D

 proximityOperator3D = envelopeGeometry as IProximityOperator3D;

IPoint nearestPoint3D = proximityOperator3D.ReturnNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension);


               //nearestPoint3D = (5.393, -0.583, -6.043)


        }

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

RotateVector3D(IVector3D, double)

Rotates the object about axis defined by the specified vector through an angle measured in radians.

virtual void RotateVector3D(IVector3D axis, double rotationAngle)

Parameters

axis IVector3D
rotationAngle double

Remarks

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

[C#]

 

        public static void TransformMultiPatchGeometry()

        {

            const double DegreesOfRotation = 45;

 

            //Transform3D: Cylinder Rotated Around An Axis Via RotateVector3D()

 

            //Construct A Vector3D Corresponding To The Desired Axis Of Rotation

 

            IVector3D axisOfRotationVector3D = ConstructVector3D(0, 10, 0);

 

            //Obtain Angle Of Rotation In Radians

 

            double angleOfRotationInRadians = GetRadians(DegreesOfRotation);

 

            IGeometry geometry = GetMultiPatchGeometry();

 

            ITransform3D transform3D = geometry as ITransform3D;

            transform3D.RotateVector3D(axisOfRotationVector3D, angleOfRotationInRadians);

        }

        private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)

        {

            IVector3D vector3D = new Vector3DClass();

            vector3D.SetComponents(xComponent, yComponent, zComponent);

 

            return vector3D;

        }

 

        private static double GetRadians(double decimalDegrees)

        {

            return decimalDegrees * (Math.PI / 180);

        }


Save(IStream, int)

virtual void Save(IStream pstm, int fClearDirty)

Parameters

pstm IStream
fClearDirty int

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());













Scale3D(IPoint, double, double, double)

Scales the object about the specified origin point. sx, sy, and sz are the scaling factors for the x, y, and z dimensions repectively.

virtual void Scale3D(IPoint Origin, double sx, double sy, double sz)

Parameters

Origin IPoint
sx double
sy double
sz double

Serialize(IXMLSerializeData)

Serializes an object to XML.

virtual void Serialize(IXMLSerializeData data)

Parameters

data IXMLSerializeData

SetConstantZ(double)

virtual void SetConstantZ(double zLevel)

Parameters

zLevel double

SetEmpty()

Removes all points from this geometry.

virtual void 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;
    }



SetGeometries(int, ref IGeometry)

Replaces all geometries in the collection with the specified number of references to those in the input array. This method is intended for internal use only.

virtual void SetGeometries(int Count, ref IGeometry newGeometries)

Parameters

Count int
newGeometries IGeometry

Remarks

SetGeometries is used to reset the references of the geometries within the GeometryCollection . The result is that all references are changed to point only at the geometries contained within the specified array. Note that the GeometryCount changes accordingly also.

 

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

SetGeometryCollection(IGeometryCollection)

Replaces all geometries in the collection with references to geometries from the input collection.

virtual void SetGeometryCollection(IGeometryCollection newParts)

Parameters

newParts IGeometryCollection

Remarks

SetGeometryCollection copies the geometry references from one GeometryCollection to another.

VB Example: Set GeometryCollection m_pGeoColl_A as m_pGeoColl_B


  m_pGeoColl_A.SetGeometryCollection m_pGeoColl_B

SetNonSimpleZs(double)

Replaces undefined (nonsimple) Z values with the specified constant value.

virtual void SetNonSimpleZs(double zLevel)

Parameters

zLevel double

SetPointCollection(IPointCollection)

Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.

virtual void SetPointCollection(IPointCollection newPoints)

Parameters

newPoints IPointCollection

SetPoints(int, ref IPoint)

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

virtual void SetPoints(int Count, ref IPoint newPoints)

Parameters

Count int
newPoints IPoint

SetWKSPointZs(int, ref WKSPointZ)

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

virtual void SetWKSPointZs(int Count, ref WKSPointZ pointStructures)

Parameters

Count int
pointStructures WKSPointZ

SetWKSPoints(int, ref WKSPoint)

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

virtual void SetWKSPoints(int Count, ref WKSPoint pointStructures)

Parameters

Count int
pointStructures WKSPoint

Simplify()

Makes this geometry topologically correct.

virtual void Simplify()

Remarks

This method first looks at the ITopologicalOperator::IsKnownSimple flag before starting processing. If the flag is 'true' then operation is interrupted and the geometry is considered simple. If the flag is 'false' then the geometry consistency is checked and the geometry is updated as needed.

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

Simplify Polygon Example

Simplify Polyline Example

Simplify Point Example

Snap()

Snaps ms to the precision of the spatial reference associated with the geometry. M snapping does not happen automatically as part of calling IGeometry::SnapToSpatialReference.

virtual void Snap()

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

SpatialReference

The spatial reference associated with this geometry.

virtual ISpatialReference SpatialReference { get; set; }

Returns

ISpatialReference

SymmetricDifference(IGeometry)

Constructs the geometry that contains points from either but not both input geometries.

virtual IGeometry SymmetricDifference(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

Remarks

SymmetricDifference is basically an XOR between the input geometries.

SymmetricDifference of G1 and G2 can also be described as the Union(Difference(G1, G2), Difference(G2, G1)).

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

 This method does not support GeometryBags.

Symmetric Difference Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

TextureVertexCount

Get Texture Vertex Count.

virtual int TextureVertexCount { get; }

Returns

int

TopologyCache(out long)

Provides a handle to the TopologyCache.

virtual void TopologyCache(out long topologyCacheHandle)

Parameters

topologyCacheHandle long

Touches(IGeometry)

Indicates if the boundaries of the geometries intersect.

virtual bool Touches(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

Touch does not apply for point/point comparison.

If either one of the two geometries is empty, the geometries are not touched.

 

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

Transform3D(esriTransformDirection, ITransformation3D)

Applies an arbitrary 3D transformation.

virtual void Transform3D(esriTransformDirection Direction, ITransformation3D Transformation)

Parameters

Direction esriTransformDirection
Transformation ITransformation3D

Union(IGeometry)

Constructs the geometry that is the set-theoretic union of the input geometries.

virtual IGeometry Union(IGeometry other)

Parameters

other IGeometry

Returns

IGeometry

Remarks

The Union is basically an OR between the input geometries.

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

This method does not support GeometryBags.

Union Example

[C#]

//The following code shows to wrap a line segment into a polyline in C#

//Assume a line (line1 as ILine) is already created

object obj = Type.Missing;

ISegmentCollection segCollection = new PolylineClass() as ISegmentCollection;

segCollection.AddSegment((ISegment)line1, ref obj, ref obj);

//Set the spatial reference on the new polyline

//The spatial reference is not transfered automatically from the segments

IGeometry geom = segCollection as IGeometry;

geom.SpatialReference = spatialRef;

//Can now be used with ITopologicalOperator methods

 

UpdatePoint(int, IPoint)

Changes the ith vertex or point to be a copy of the input point.

virtual void UpdatePoint(int i, IPoint p)

Parameters

i int
p IPoint

Remarks

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

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

[C#]

//Point to use in the UpdatePoint call
IPoint point = new PointClass() as IPoint;

//Point Collection to UpdatePoint
IPointCollection ptCollection = new MultipointClass() as IPointCollection;

//Set the spatial reference of the Point Collection usually it has already been set
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory;
IGeometry geom = ptCollection as IGeometry;
geom.SpatialReference = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983N_AmericaLambert);
ISpatialReference sr = geom.SpatialReference;

//This line does nothing if the two spatial references are already equal
point.Project(sr);

//The integer is the number of point in the point collection you are updating
ptCollection.UpdatePoint(1, point);

















VertexCount

Get Vertex Count.

virtual int VertexCount { get; }

Returns

int

Volume

The enclosed 3D volume.

virtual double Volume { get; }

Returns

double

Remarks

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

[C#]

 

        public static void CalculateVolume()

        {

IGeometry

geometry = GetMultiPatchGeometry();


IVolume

volume = geometry as IVolume;

double calculatedVolume = volume.Volume;

//calculatedVolume = 225.048


        }

Within(IGeometry)

Indicates if this geometry is contained (is within) another geometry.

virtual bool Within(IGeometry other)

Parameters

other IGeometry

Returns

bool

Remarks

Only geometries that support the IRelationalOperator interface can be used as input geometries.

If geometry1 is Within geometry2, then geometry2 Contains geometry1.

An empty geometry is within another geometry, unless the other geometry is empty.

Within examples. Only "true" relationships are showed in this picture.

WithinEx(IGeometry, esriSpatialRelationExEnum)

Indicates if this geometry contains the other geometry, optionally using Celementini's definition.

virtual bool WithinEx(IGeometry pOther, esriSpatialRelationExEnum Relation)

Parameters

pOther IGeometry
Relation esriSpatialRelationExEnum

Returns

bool

XYFootprint

A reference to a cached copy of the multipatch's footprint in the x-y plane. If the footprint is modified, InvalXYFootprint should be called.

virtual IGeometry XYFootprint { get; }

Returns

IGeometry

Remarks

To ensure that the XYFootprint is current (this is especially important if you directly modify the XYFootprint or one of the MultiPatch parts), call InvalXYFootprint.

ZAware

Indicates whether or not the geometry is aware of and capable of handling Zs.

virtual bool ZAware { get; set; }

Returns

bool

Remarks

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

[C#]

    private Double getZFromPoint(IPoint point)
    {
        return point.Z;
    }


ZMax

The maximum Z value.

virtual double ZMax { get; }

Returns

double

ZMin

The minimum Z value.

virtual double ZMin { get; }

Returns

double

ZSimple

Indicates if all the Zs are valid numbers.

virtual bool ZSimple { get; }

Returns

bool

ZVertical

virtual bool ZVertical { get; }

Returns

bool