Public Function New( _ ByVal multipoint As Multipoint _ )
public MultipointBuilderEx( Multipoint multipoint )
Parameters
- multipoint
- The multipoint to copy which will initialize the builder. It cannot be null.
Public Function New( _ ByVal multipoint As Multipoint _ )
public MultipointBuilderEx( Multipoint multipoint )
| Exception | Description |
|---|---|
| System.ArgumentNullException | The input multipoint is null. |
All attributes of the input multipoint, including the spatial reference, are copied to the builder.
{
// assume a multiPoint has been built from 4 points
// the modified multiPoint will have the first point removed and the last point moved
// use the builderEx constructors which don't need to run on the MCT.
MultipointBuilderEx builderEx = new MultipointBuilderEx(multipoint);
// remove the first point
builderEx.RemovePoint(0);
// modify the coordinates of the last point
var ptEx = builderEx.GetPoint(builderEx.PointCount - 1);
builderEx.RemovePoint(builderEx.PointCount - 1);
var newPtEx = MapPointBuilderEx.CreateMapPoint(ptEx.X + 1.0, ptEx.Y + 2.0);
builderEx.AddPoint(newPtEx);
Multipoint modifiedMultiPointEx = builderEx.ToGeometry() as Multipoint;
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)