Skip to content

PySTAC minimum constraint needs to be at least 1.9.0 #785

@ghidalgo3

Description

@ghidalgo3

PySTAC 1.9.0 introduced the .ext accessor for STAC item extensions. STACReader uses the accessor when computing the minzoom and maxzoom for an Item, and if it doesn't find the extension then it uses the TMS default. Previously the reader was using the Asset information to compute the minzoom, maxzoom which was different because the author of the STAC item may not have included the proj extension.

Consider the following situation:

  1. Someone is using rio-tiler with a version of pySTAC before 1.9.0 (i.e, pystac.Item does not have a ext accessor).
  2. They want to call info() and get the asset's minzoom maxzoon. The STAC item may have the proj extension but because the extension accessor call is gated behind a hasattr check then STACReader will never read the extension properties and the minzoom/maxzoom will be the TMS default.

I think rio-tiler should increase the minimum version of pySTAC supported so that you can properly check for the presence of the proj extension. Otherwise, the current pySTAC version constraint allows some combinations of pySTAC and rio-tiler to always default to the TMS minzoom, maxzoom which is a regression from previous behavior.

The specific versions I'm using:

  • rio-tiler==7.3.1
  • pystac==1.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions