Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add toText and writeValues on Position and Box #153

Closed
navispatial opened this issue Aug 21, 2022 · 1 comment
Closed

Add toText and writeValues on Position and Box #153

navispatial opened this issue Aug 21, 2022 · 1 comment
Labels
enhancement New feature or request 🌐 geobase Related to the code package "geobase"

Comments

@navispatial
Copy link
Member

navispatial commented Aug 21, 2022

Planned methods for Position:

  /// 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 of [position] 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`
  static void writeValues(
    Position position,
    StringSink buffer, {
    String delimiter = ',',
    int? decimals,
  });

Similar also for Box.

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.

@navispatial navispatial added enhancement New feature or request 🌐 geobase Related to the code package "geobase" labels Aug 21, 2022
@navispatial
Copy link
Member Author

Implemented in geobase 0.4.0-dev.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 🌐 geobase Related to the code package "geobase"
Projects
None yet
Development

No branches or pull requests

1 participant