Aniket2006 commited on
Commit
cb7fde2
·
1 Parent(s): 5eda52a

Fix DataCollection.define() API call

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -257,10 +257,13 @@ async def generate_heatmap(request: HeatmapRequest):
257
  end_date = datetime.now()
258
  start_date = end_date - timedelta(days=30)
259
 
260
- # Define data collection for CDSE
261
- SENTINEL2_L2A_CDSE = DataCollection.define_from(
262
- DataCollection.SENTINEL2_L2A,
263
- service_url='https://sh.dataspace.copernicus.eu'
 
 
 
264
  )
265
 
266
  # Create request for all 13 bands
 
257
  end_date = datetime.now()
258
  start_date = end_date - timedelta(days=30)
259
 
260
+ # Define custom CDSE data collection (same as S2 pipeline)
261
+ SENTINEL2_L2A_CDSE = DataCollection.define(
262
+ "SENTINEL2_L2A_CDSE",
263
+ api_id="sentinel-2-l2a",
264
+ service_url="https://sh.dataspace.copernicus.eu",
265
+ collection_type="Sentinel-2",
266
+ is_timeless=False
267
  )
268
 
269
  # Create request for all 13 bands