diff --git a/TimeSeries/providers.py b/TimeSeries/providers.py new file mode 100644 index 0000000000000000000000000000000000000000..025c1bdd9914c40c2ab24c70df1e5bf09dd58bbb --- /dev/null +++ b/TimeSeries/providers.py @@ -0,0 +1,15 @@ +import planetary_computer +from pystac_client import Client +import planetary_computer as PC +import rasterio +from osgeo import ogr +from pyproj import Transformer as T + +def get_s2_from_planetary(shp, datetime): + + ds = ogr.Open(shp) + ly = ds.GetLayer(0) + xt = ly.GetExtent() + shp_srs = int(ly.GetSpatialRef().GetAuthorityCode(None)) + + api = Client('https://planetarycomputer.microsoft.com/api/stac/v1', modifier=planetary_computer.sign_inplace)