stac-vrt icon indicating copy to clipboard operation
stac-vrt copied to clipboard

Minimize dependencies

Open TomAugspurger opened this issue 4 years ago • 1 comments

We can lighten the library up a bit.

  1. Update _build_bbox to not need NumPy. I'm guessing a for loop over the bboxes will be roughly as fast as creating an ndarray and doing the min / max, at least for moderately sized datasets. Profile and drop NumPy if it's not much slower. https://github.com/stac-utils/stac-vrt/blob/e881e8c30a1f14032d147577b516a50762820548/stac_vrt.py#L38-L41
  2. Replace all uses of rasterio.coords.BoundingBox with a tuple (or make our own BoundingBox namedtuple).
  3. Replace rasterio.warp.transform_bounds with... something. Maybe in pyproj. If this is hard then I'm fine with just depending on rasterio.

TomAugspurger avatar Mar 02 '21 03:03 TomAugspurger

Rasterio depends on numpy anyways, so IMO removing numpy for the sake of minimizing dependencies isn't too important unless you also plan to remove rasterio. https://github.com/mapbox/rasterio/blob/0a52d52b0c19094cd906c25fe3c23ddb48ee1f48/setup.py#L260

kylebarron avatar Mar 02 '21 18:03 kylebarron