MultiPoint.parse constructor
MultiPoint.parse(
- String text, {
- TextReaderFormat<
SimpleGeometryContent> format = GeoJSON.geometry, - CoordRefSys? crs,
- Map<
String, dynamic> ? options,
Parses a multi point geometry from text
conforming to format
.
When format
is not given, then the geometry format of GeoJSON is used
as a default.
Use crs
to give hints (like axis order, and whether x and y must
be swapped when read in) about coordinate reference system in text input.
When data itself have CRS information it overrides this value.
Format or decoder implementation specific options can be set by options
.
Examples:
// a multi point from three 2D positions
MultiPoint.parse(
format: GeoJSON.geometry,
'''
{
"type": "MultiPoint",
"coordinates": [[10.0,20.0],[12.5,22.5],[15.0,25.0]]
}
''',
);
MultiPoint.parse(
format: WKT.geometry,
'MULTIPOINT ((10.0 20.0),(12.5 22.5),(15.0 25.0))',
);
// a multi point from three 3D positions
MultiPoint.parse(
format: GeoJSON.geometry,
'''
{
"type": "MultiPoint",
"coordinates": [[10.0,20.0,30.0],[12.5,22.5,32.5],[15.0,25.0,35.0]]
}
''',
);
MultiPoint.parse(
format: WKT.geometry,
'MULTIPOINT Z ((10.0 20.0 30.0),(12.5 22.5 32.5),(15.0 25.0 35.0))',
);
Implementation
factory MultiPoint.parse(
String text, {
TextReaderFormat<SimpleGeometryContent> format = GeoJSON.geometry,
CoordRefSys? crs,
Map<String, dynamic>? options,
}) =>
GeometryBuilder.parse<MultiPoint>(
text,
format: format,
crs: crs,
options: options,
);