MarcYin / SIAC

A sensor invariant Atmospheric Correction (SIAC)
http://www2.geog.ucl.ac.uk/~ucfafyi/Atmo_Cor/
GNU Affero General Public License v3.0
61 stars 17 forks source link

Polygon boundary points order #26

Closed nbennasr closed 1 year ago

nbennasr commented 1 year ago

Hi @MarcYin , I tested siac with antemeridian tiles (i.g id: c164fe15-6ee9-4e8b-b699-a1c222fad5ab, name: S2B_MSIL1C_20220801T233659_N0400_R030_T01WCM_20220801T235506) and that wasn't work.

First I get the error: File "/opt/s2gm/modules/SIAC/SIAC/get_VNP43MA1.py", line 372, in query_VNP43MA1_temporal_spatial raise ValueError(response.reason, response_json) UnboundLocalError: local variable 'response_json' referenced before assignment

fixing it I get another error: File "/opt/s2gm/modules/SIAC/SIAC/get_VNP43MA1.py", line 371, in query_VNP43MA1_temporal_spatial raise ValueError(response.reason, response_json) ValueError: ('Bad Request', {'errors': ['The polygon boundary points are listed in the wrong order. Points must be provided in counter-clockwise order.']})

Could you please take a look?

MarcYin commented 1 year ago

S2 tile crossing antimeridian has caused several issues in both the querying of data from NASA server and reading data for the DEM and CAMS. The new fix 8afc2c3 has been implemented by doing the data query and reading with two polygons, created by splitting the original polygon into two part over the antimeridian line.

nbennasr commented 1 year ago

@MarcYin Thank you!