MultiPoint.from constructor
A multi point geometry from an iterable of Position
objects in points
.
An optional bounds
can used set a minimum bounding box for a geometry.
The coordinate type of all points should be the same.
Examples:
// a multi point with three 2D positions
MultiPoint.from([
[10.0, 20.0].xy,
[12.5, 22.5].xy,
[15.0, 25.0].xy,
]);
// a multi point with three 3D positions
MultiPoint.from([
[10.0, 20.0, 30.0].xyz,
[12.5, 22.5, 32.5].xyz,
[15.0, 25.0, 35.0].xyz,
]);
Implementation
factory MultiPoint.from(Iterable<Position> points, {Box? bounds}) =>
MultiPoint(
points is List<Position> ? points : points.toList(growable: false),
bounds: bounds,
);