geometryCollection abstract method
void
geometryCollection(
- WriteGeometries geometries, {
- Coords? type,
- int? count,
- String? name,
- Box? bounds,
Writes a geometry collection from the content provided by geometries
.
An optional type
specifies the coordinate type of geometry objects in a
collection. When not provided, the type can be resolved from objects.
An optional expected count
, when given, specifies the number of geometry
objects in a collection. Note that when given the count MUST be exact.
Use an optional name
to specify a name for a geometry (when applicable).
An optional bounds
can used set a minimum bounding box for a geometry
written. A writer implementation may use it or ignore it.
An example to write a geometry collection with two child geometries:
content.geometryCollection(
type: Coords.xy
count: 2,
(geom) => geom
..point([10.123, 20.25].xy)
..polygon(
[
[
10.1, 10.1,
5.0, 9.0,
12.0, 4.0,
10.1, 10.1,
].positions(Coords.xy),
],
),
);
Implementation
void geometryCollection(
WriteGeometries geometries, {
Coords? type,
int? count,
String? name,
Box? bounds,
});