pgzmnk commited on
Commit
9324baf
·
1 Parent(s): ffea2b9

set self.roi

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -167,8 +167,8 @@ class IndexGenerator:
167
  "centroid": str(self.centroid),
168
  "project_name": self.project_name,
169
  "value": list(map(self.zonal_mean_index, indices)),
170
- "area": roi.area().getInfo(), # m^2
171
- "geojson": str(roi.getInfo()),
172
  }
173
 
174
  print("data", data)
@@ -351,7 +351,7 @@ with gr.Blocks() as demo:
351
  con = set_up_duckdb()
352
  authenticate_gee(GEE_SERVICE_ACCOUNT, GEE_SERVICE_ACCOUNT_CREDENTIALS_FILE)
353
  # Create circle buffer over point
354
- # roi = ee.Geometry.Point(*LOCATION).buffer(ROI_RADIUS)
355
 
356
  # # Load a raw Landsat ImageCollection for a single year.
357
  # start_date = str(datetime.date(YEAR, 1, 1))
 
167
  "centroid": str(self.centroid),
168
  "project_name": self.project_name,
169
  "value": list(map(self.zonal_mean_index, indices)),
170
+ "area": self.roi.area().getInfo(), # m^2
171
+ "geojson": str(self.roi.getInfo()),
172
  }
173
 
174
  print("data", data)
 
351
  con = set_up_duckdb()
352
  authenticate_gee(GEE_SERVICE_ACCOUNT, GEE_SERVICE_ACCOUNT_CREDENTIALS_FILE)
353
  # Create circle buffer over point
354
+ roi = ee.Geometry.Point(*LOCATION).buffer(ROI_RADIUS)
355
 
356
  # # Load a raw Landsat ImageCollection for a single year.
357
  # start_date = str(datetime.date(YEAR, 1, 1))