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

Coordinate value accessors on position classes #94

Closed
navispatial opened this issue Feb 13, 2022 · 1 comment
Closed

Coordinate value accessors on position classes #94

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

Comments

@navispatial
Copy link
Member

The definition for generic coordinate value accessor on BasePosition:

  /// A coordinate value by the coordinate axis index [i].
  /// 
  /// Returns zero when a coordinate axis is not available.
  /// 
  /// For projected or cartesian coordinates, the coordinate ordering is: 
  /// (x, y), (x, y, m), (x, y, z) or (x, y, z, m).
  ///
  /// For geographic coordinates, the coordinate ordering is: 
  /// (lon, lat), (lon, lat, m), (lon, lat, elev) or (lon, lat, elev, m).
  num operator [](int i);

  /// Coordinate values of this position as an iterable of 2, 3 or 4 items.
  /// 
  /// For projected or cartesian coordinates, the coordinate ordering is: 
  /// (x, y), (x, y, m), (x, y, z) or (x, y, z, m).
  ///
  /// For geographic coordinates, the coordinate ordering is: 
  /// (lon, lat), (lon, lat, m), (lon, lat, elev) or (lon, lat, elev, m).
  Iterable<num> get values;

Implemented by Position and GeoPosition.

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

Implemented in pre-release 0.1.0-a.1 of beta 0.1.0 of geobase.

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