stac-vrt
stac-vrt copied to clipboard
Minimize dependencies
We can lighten the library up a bit.
- Update
_build_bboxto 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 - Replace all uses of
rasterio.coords.BoundingBoxwith a tuple (or make our ownBoundingBoxnamedtuple). - Replace
rasterio.warp.transform_boundswith... something. Maybe in pyproj. If this is hard then I'm fine with just depending on rasterio.
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