navibyte / geospatial

Geospatial data structures, tools and utilities for Dart and Flutter.
Other
51 stars 5 forks source link

Refactor SimpleGeometryContent #202

Closed navispatial closed 9 months ago

navispatial commented 10 months ago

As Position and PositionSeries now allow creating positions and arrays of positions from double arrays and object iterables (#199, #200) it's possible to simplify (and make easier to understand) SimpleGeometryContent.

For example before the change it contained methods like:

  void point(
    Iterable<double> position, {
    Coords? type,
    String? name,
  });

  void lineString(
    Iterable<double> chain, {
    required Coords type,
    String? name,
    Box? bounds,
  });

After this (breaking) change these methods would be refactored as:

  void point(
    Position position, {
    String? name,
  });

  void lineString(
    PositionSeries chain, {
    String? name,
    Box? bounds,
  });

Other methods in similar way.

navispatial commented 9 months ago

Implemented in geobase 0.6.0