from tempfile import tempdir import firebase_admin from firebase_admin import credentials from firebase_admin import db from find_s1_image2 import find_img_value import pandas as pd import statsmodels.api as sm import seaborn as sns sns.set() import time import json import numpy as np from sklearn.cluster import KMeans from find_study_area_values import find_study_area_values from make_area_estimate_image import make_area_estimate_image import json from sentinelhub import WebFeatureService, BBox, CRS, DataSource, MimeType, CRS, BBox, WmsRequest,DataCollection cred = credentials.Certificate('servicekey.json') x = 0.0003 y = 0.0003 fromdate = '20220701' todate = '20220715' s1_images = ['IW-VH-DB'] s2_images = [] # s1_images = ["B02", "B03", "B04", "B05"] #s2_images = ["RVI-NEW"] try: firebase_admin.initialize_app(cred, {'databaseURL': 'https://farmbase-b2f7e-31c0c.firebaseio.com/'}) except: print('fire running') gt_fields_dir = 'Downloads/Barkhedi.geojson' with open(gt_fields_dir) as f: gt_fields = json.load(f) farms_array = gt_fields["features"] for single_farm_obj in farms_array: geometry_obj = single_farm_obj["geometry"] points_obj = geometry_obj["coordinates"] properties_obj = single_farm_obj["properties"] village = properties_obj["villagee"] khasranum = properties_obj["khasranum"] main_obj = {} main_obj["Points"] = points_obj main_obj["Village"] = village main_obj["ID"] = khasranum print(main_obj) break