-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Hi sen2like team,
I'm encountering an issue when processing tile 19KEP (and also tested with neighboring tile 19KEQ where worked perfectly) using the latest version of sen2like (v4.5). The processing fails during the MGRS to latitude/longitude conversion step due to what seems to be a hardcoded MGRS suffix.
Here is the traceback I receive for tile 19KEP:
Traceback (most recent call last):
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/sen2like.py", line 367, in <module>
sys.exit(main(sys.argv[1:]))
^^^^^^^^^^^^^^^^^^
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/sen2like.py", line 358, in main
process_tile(tile, _search_url, args, date_range.start_date, date_range.end_date)
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/sen2like.py", line 297, in process_tile
process_an_input_product(tile, input_product, config, args, _tile_ref_image)
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/sen2like.py", line 208, in process_an_input_product
process.run()
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/core/product_process.py", line 94, in run
self._preprocess()
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/core/product_process.py", line 164, in _preprocess
proc_block.preprocess(self._product)
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/s2l_processes/S2L_Nbar.py", line 433, in preprocess
lat = product.mtl.get_scene_center_coordinates()[1]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/agrospace/agrospace/sen2like_software/sen2likev4-5/sen2like/sen2like/sen2like/core/readers/sentinel2.py", line 370, in get_scene_center_coordinates
lat, lon = m.toLatLon(self.mgrs + '5490045100')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/agrospace/miniconda3/envs/sen2like4.5/lib/python3.12/site-packages/mgrs/__init__.py", line 103, in toLatLon
core.rt.Convert_MGRS_To_Geodetic(c, plat, plon)
File "/home/agrospace/miniconda3/envs/sen2like4.5/lib/python3.12/site-packages/mgrs/core.py", line 208, in check_error
raise MGRSError(msg)
mgrs.core.MGRSError: Error in "Convert_MGRS_To_Geodetic": MGRS Errors
It seems that appending '5490045100' to self.mgrs results in an invalid MGRS string, which causes the Convert_MGRS_To_Geodetic method to fail.
I believe this issue could be resolved by either:
Avoiding the hardcoded addition of '5490045100', or
Ensuring that self.mgrs is complete and properly formatted before attempting the conversion.
For reference, I’ve attached the complete log file from the run:
Please let me know if any additional information would be helpful.
Best regards,
Italo