YashMK89 commited on
Commit
4f49d5e
·
verified ·
1 Parent(s): d6ccf84

update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -117,8 +117,16 @@ def calculate_custom_formula(image, geometry, selected_bands, custom_formula, re
117
 
118
  # Determine the finest (smallest) scale among the selected bands
119
  default_scale = min(band_scales) if band_scales else 30 # Default to 30m if no bands are found
 
 
 
 
 
 
 
120
 
121
  # Use user-defined scale if provided, otherwise use the finest scale
 
122
  scale = user_scale if user_scale is not None else default_scale
123
 
124
  # Rescale all bands to the chosen scale
 
117
 
118
  # Determine the finest (smallest) scale among the selected bands
119
  default_scale = min(band_scales) if band_scales else 30 # Default to 30m if no bands are found
120
+
121
+ # # Compute the finest scale among all bands
122
+ # band_scales = [
123
+ # first_image.select(band).projection().nominalScale().getInfo()
124
+ # for band in first_image.bandNames().getInfo()
125
+ # ]
126
+ # default_scale = min(band_scales)
127
 
128
  # Use user-defined scale if provided, otherwise use the finest scale
129
+
130
  scale = user_scale if user_scale is not None else default_scale
131
 
132
  # Rescale all bands to the chosen scale