Parameters
- geometry
- The input geometry. Cannot be a GeometryBag.
- factor
- The factor by which each M-value will be multiplied.
| Exception | Description |
|---|---|
| System.ArgumentNullException | Geometry is null. |
| System.InvalidOperationException | This geometry is not M-Aware. |
| System.NotImplementedException | This method is not implemented for GeometryBag. |
{
// Create a multipoint and multiply M-values by 6
Coordinate2D[] coords = [ new Coordinate2D(-4, 4), new Coordinate2D(-1, 1), new Coordinate2D(2, 6),
new Coordinate2D(-8, 2), new Coordinate2D(5, -3), new Coordinate2D(7, 2), new Coordinate2D(5, 3), new Coordinate2D(3, -1) ];
double[] ms = [1, 2, 3, 4, 5, 6, 7, 8];
MultipointBuilderEx builder = new(coords)
{
Ms = ms,
HasM = true
};
Multipoint multipoint = builder.ToGeometry();
Multipoint outMultipoint = GeometryEngine.Instance.MultiplyMs(multipoint, 6) as Multipoint;
// The xy-values of the points in outMultipoint are the same as the points in the input multipoint.
// The M-values in outMultipoint are { 6, 12, 18, 24, 30, 36, 42, 48 }
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)