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

Base interface for bounding boxes compatible with RFC7946 #87

Closed
navispatial opened this issue Feb 3, 2022 · 2 comments
Closed

Base interface for bounding boxes compatible with RFC7946 #87

navispatial opened this issue Feb 3, 2022 · 2 comments
Labels
enhancement New feature or request 🌐 geobase Related to the code package "geobase" 🌐 geocore Related to the code package "geocore"

Comments

@navispatial
Copy link
Member

See Chapter 5 Bounding Box of the GeoJSON sepc.

  • The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point.
  • sample on the antimeridian : "bbox": [177.0, -20.0, -178.0, -16.0]
@navispatial navispatial added enhancement New feature or request 🌐 geocore Related to the code package "geocore" labels Feb 3, 2022
@navispatial
Copy link
Member Author

New definitions.

Bounding box for projected or cartesian coordinates:

/// A bounding box with [minX], [minY], [maxX] and [maxY] coordinates.
  ///
  /// Optional [minZ] and [maxZ] for 3D boxes, and [minM] and [maxM] for
  /// measured boxes can be provided too.
  const Box({
    required num minX,
    required num minY,
    num? minZ,
    num? minM,
    required num maxX,
    required num maxY,
    num? maxZ,
    num? maxM,
  });

Bounding box for geographic coordinates.

  /// A geographic bounding box with [west], [south], [east] and [north] values.
  ///
  /// West and east represents geographic longitude coordinates values. South
  /// and north represents geographic latitude coordinates values.
  ///
  /// For geographic bounding boxes `(west-longitude, south-latitude)` position
  /// represents the most **southwesterly** point, and
  /// `(east-longitude, north-latitude)` position represents the more
  /// **northeasterly** point. When a bounding box spans the antimeridian, it's
  /// possible that "min-longitude" (west) is larger than "max-longitude" (east)
  /// as a number. See also RFC 7946 chapter 5 about bounding boxes in GeoJSON
  /// for reference.
  ///
  /// Optional [minElev] and [maxElev] for 3D boxes, and [minM] and [maxM] for
  /// measured boxes can be provided too.
  const GeoBox({
    required double west,
    required double south,
    double? minElev,
    double? minM,
    required double east,
    required double north,
    double? maxElev,
    double? maxM,
  });

navispatial added a commit that referenced this issue Feb 6, 2022
…sses, imporovements on position/geoposition (#81, #84, #87)
@navispatial
Copy link
Member Author

Implemented and published on the new geobase package (pre-release 0.1.0-a.0).

@navispatial navispatial added the 🌐 geobase Related to the code package "geobase" label Feb 6, 2022
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" 🌐 geocore Related to the code package "geocore"
Projects
None yet
Development

No branches or pull requests

1 participant