I'm trying to download sentinel-2 satellite images from sentinel-hub (https://www.sentinel-hub.com/) via WMS requests. The request allows me to specify a time interval with the
time parameter but the I don't seem to be getting all the images in the specified time interval.
The problem I'm trying to solve is the following:
Given a bounding box
(latmin,longmin,latmax,longmax) I would like to get all the satellite images taken in the box from a date
yyyy-mm-dd to another
YYYY-MM-DD. The returned object should be some sort of an array of images, ideally with a timestamp on every image.
I'm building a wms getmap request with python and this is what I've already done.
dist = 5 #i = 21800 for i in range(0,len(fireBC)): if fireBC["FIRE_YEAR"][i] >= 2018: center = np.array(fireBC['geometry'][i].representative_point()) date = fireBC['FIRE_DATE'][i] firedateB = dt.datetime.strptime(date, '%Y%m%d') firedateE = firedateB + dt.timedelta(days=10) firedate_str = firedateB.strftime("%Y-%m-%d") + "/" + firedateE.strftime("%Y-%m-%d") fire_imgnew = wms.getmap( layers=['SWIR'], styles=['default'], srs='EPSG:4326', bbox=boundingBox(center,center,dist), size=(512, 512), #geometry = ade, format='image/png', #Transparent = False, time=firedate_str) print(type(fire_imgnew)) decoded = cv2.imdecode(np.frombuffer(fire_imgnew.read(), np.uint8), -1) cv2.imwrite("Images/fire"+str(i)+".png", decoded)
FireBC is a geopandas files of all historic forest fires in British Columbia Canada.
The number of requests that I can make is limited.
Is there no way to get an array of images with one request?