Skip to content

Type check SpatialExtent bboxes parameter #198

@CloudNiner

Description

@CloudNiner

It's easy to accidentally forget to pass SpatialExtent(bboxes) as a list[list[float]] and just pass a single dimensional bbox. Here's two examples of this happening, #197 and azavea/noaa-flood-mapping#105. This leads to writing a STAC Catalog incompatible with the spec.

Two potential improvements?

  1. Throw a TypeError or some equivalent exception when the incorrect type is passed
  2. pystac could implicitly wrap a passed list[float] to list[list[float]]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions