geospatial
geospatial copied to clipboard
Add toText and writeValues on Position and Box
Planned methods:
/// A string representation of coordinate values separated by [delimiter].
///
/// Use [decimals] to set a number of decimals (not applied if no decimals).
///
/// A sample with default parameters (for a 3D position):
/// `10.1,20.3,30.3`
///
/// To get WKT compatible text, set `delimiter` to ` `:
/// `10.1 20.2 30.3`
String toText({
String delimiter = ',',
int? decimals,
});
/// Writes coordinate values to [buffer] separated by [delimiter].
///
/// Use [decimals] to set a number of decimals (not applied if no decimals).
///
/// A sample with default parameters (for a 3D point):
/// `10.1,20.3,30.3`
///
/// To get WKT compatible text, set `delimiter` to ` `:
/// `10.1 20.2 30.3`
void writeValues(
StringSink buffer, {
String delimiter = ',',
int? decimals,
});
These were originally defined on the geocore
package as valuesAsString
and writeValues
, but the first one is renamed to be more consistent with naming conventions of the geobase
package.