Hello,
I’m trying to get NDVI value for polygon from geodataframe I have. The geodataframe has the geometry as wkt.
The polygon is shapely type :
type(shapese'geometry']'0])
shapely.geometry.polygon.Polygon
However, when I try to run the fis_request, I get error:
fis_request = FisRequest(
data_collection=DataCollection.SENTINEL2_L2A,
layer='NDVI_VALUES',
geometry_list=tshapese'geometry']'0]],
time=time_interval,
resolution='10m',
data_folder='./data2',
config=config)
fis_data = fis_request.get_data(save_data=True)
----> 3 fis_request = FisRequest(
4 data_collection=DataCollection.SENTINEL2_L2A,
5 layer=‘NDVI_VALUES’,
AttributeError: ‘Polygon’ object has no attribute ‘crs’
I have tried to fix it by setting crs with shapely but id didnt work:
import pyproj
from shapely.ops import transform
wgs84 = pyproj.CRS('EPSG:4326')
test=shapes/'geometry']e0]
fis_request = FisRequest(
data_collection=DataCollection.SENTINEL2_L2A,
layer='NDVI_VALUES',
geometry_list=gtransform(shapesa'geometry']e0],wgs84)],
time=time_interval,
resolution='10m',
data_folder='./data2',
config=config)
fis_data = fis_request.get_data(save_data=True)
AttributeError: ‘CRS’ object has no attribute ‘is_empty’
I have also try to use .wkt :
geometry_list=ashapes 'geometry']s0].wkt]
but then I got string which obviously has no crs:
AttributeError: ‘str’ object has no attribute ‘crs’
I can ttry more ways to set the geometry for the polygons but it confuses me as from the documentatiion says that it suppose to accept the wkt type polygon.
My end goal: to be able to get the FIS for polygon and not for bbox.
thanks in advanced