pjhartzell / raster-footprint

Create GeoJSON geometries that bound valid raster data
https://raster-footprint.readthedocs.io
Apache License 2.0
6 stars 0 forks source link

Footprint behavior customization? #15

Open pjhartzell opened 1 year ago

pjhartzell commented 1 year ago

The stactools raster footprint utility uses a class for footprint creation. You can override any of the core steps (extract, densify, reproject, simplify) by subclassing. The primary motivation was the ability to use a custom reprojection function, specifically a custom implementation for the sinusoidal projection used by MODIS and VIIRS. By moving to functions only, we've lost that.

We could:

  1. Add a class to the footprint.py module that the existing functions in that module would use. This would keep the the API simple (just function imports and calls) for standard use-cases, but allow subclassing when needed.
  2. Do nothing. If you need different functionality in a specific step, write a custom function, import the others you need, and string them together yourself.

I'm leaning toward the "Do nothing" option

pjhartzell commented 1 year ago

Thinking of ways to make the custom sinusoidal projection available. I hate to lose track of that work.

We could include it in the projection module: