This document is archived and information here might be outdated.  Recommended version.


Multipoint Class (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Classes > M > Multipoint Class
ArcGIS Developer Help

MultipointClass Class

An ordered collection of points; optionally has measure, height and ID attributes.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Extended Error Information

Use the ISupportErrorInfo method InterfaceSupportsErrorInfo to determine if the object supports extended error information. If the object supports extended error info, VC++ developers should use the OLE/COM IErrorInfo interface to access the ErrorInfo object. Visual Basic developers should use the global error object Err to retrieve this extended error information.

Interfaces

Interfaces Description
IClone (esriSystem) Provides access to members that control cloning of objects.
IConstructMultipoint Provides access to members that construct multiple points using other geometries and values.
IGeometry Provides access to members that describe properties and behavior of all geometric objects.
IGeometry2 Provides access to members that extend the IGeometry interface with a more sophisticated projection method.
IGeometry3 Provides rapid access to a geometry's extent in the x-y plane.
IGeometry4 Provides access to methods that indicate if a geometry has been changed (edited, projected, etc).
IGeometry5 Provides access to members that extend the IGeometry interface with a more sophisticated projection method.
IGeometryCollection Provides access to members that can be used for accessing, adding and removing individual geometries of a multi-part geometry (Multipoint, Polyline, Polygon, MultiPatch, and GeometryBag).
IHitTest Provides access to members that locate a part of a geometry closest to a point.
IHitTest3D Provides access to members that locate a part of a geometry closest to a point.
IMAware Indicator interface that identifies geometric objects that can have persistent M values attached to their vertices.
IMCollection Provides access to members that control operations on M-aware multipoints, polylines, polygons and multipatches.
IMSnap Provides access to a method that snaps ms of the geometry to the precision of the spatial reference associated with the geometry.
IMultipoint Indicator interface that identifies a multipoint object.
IPersist (esriSystem)
IPersistStream (esriSystem)
IPointCollection Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
IPointCollection2 Provides access to members that manipulate the points of a Multipoint.
IPointCollection3 Provides access to members that manipulate the points of a Multipoint.
IPointCollection4 Provides access to members that manipulate the points of a Multipoint, Path, Ring, Polyline, Polygon, TriangleFan, TriangleStrip, or MultiPatch.
IPointCollection5 Provides access to members that manipulate the vertices as lightweight point+attribute structures (VA - vertex attribute)
IPointIDAware Indicator interface that identifies geometries that can have persistent point ID values attached to coordinates.
IProximityOperator Provides access to members that find the 2D distance between two geometries.
IProximityOperator3D Provides access to members that find the 3D distance between two geometries with Zs.
IRelationalOperator Provides access to members that determine if a certain spatial relationship exists between two geometries.
IRelationalOperator2 Additional relational functions.
IRelationalOperator3D Provides access to members that determine if a certain spatial relationship exists between two geometries with Zs.
IRelationalOperator3D2 Provides access to members that determine if a certain spatial relationship exists between two geometries with Zs.
ISpatialIndex Provides access to members that create a temporary spatial index for improving performance of "Disjoint" and some other relational operators.
ISupportErrorInfo (esriSystem)
ITopologicalOperator Provides access to members for constructing new geometries based upon topological relationships between existing geometries.
ITopologicalOperator2 Provides access to members that extend the ITopologicalOperator interface.
ITopologicalOperator6 .
ITransform2D Provides access to methods for transforming geometries using either specific parameters or arbitrary transformation objects (affine transformations, geographic transformations, etc.).
ITransform3D Provides access to methods for transforming 3D geometries using either specific parameters or arbitrary transformation objects.
IXMLSerialize (esriSystem) Provides access to members that XML serialize and deserialize an object to/from XML.
IZAware Indicator interface that identifies geometries that can have persistent Z values attached to their vertices.
IZCollection Provides access to operations on Z-aware geometries.

Remarks

Note: The order of the points and their number can be modified by ITopologicalOperator::Simplify. Simplify sorts the points by X and Y and removes duplicate.

[C#]

 

        private static object _missing = Type.Missing;

 

        public static IGeometry GetMultipointGeometry()

        {

               const double MultipointPointCount = 25;

               IPointCollection pointCollection = new MultipointClass();

 

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

               {

                      pointCollection.AddPoint(GetPoint(), ref _missing, ref _missing);

               }

 

               MakeZAware(pointCollection as IGeometry);

 

               return pointCollection as IGeometry;

        }

        private static IPoint GetPoint()

        {

            const double Min = -10;

            const double Max = 10;

 

            Random random = new Random();

 

            double x = Min + (Max - Min) * random.NextDouble();

            double y = Min + (Max - Min) * random.NextDouble();

            double z = Min + (Max - Min) * random.NextDouble();

 

            return ConstructPoint3D(x, y, z);

        }

 

        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;

        }