MSI2 Sline Endline command error
Posted: Tue Aug 01, 2023 5:42 pm
Hello,
I am using the following code to analyze a small section of the sentinel-2 image utilizing the "sline" and "endline" commands to select the boundary. Despite the code running without error and producing an output file in .nc format, it is named with the extension ".SAFE.nc" and cannot be opened. I am wondering if anyone has experience using sline and endline with MSI2 images and if they have found a solution to this issue.
Thank you!
import polymer as polymer
from polymer.main import run_atm_corr
from polymer.level1 import Level1
from polymer.level2 import Level2
from polymer.level1_msi import Level1_MSI
from polymer.level2_nc import Level2_NETCDF
from polymer.ancillary import Ancillary_NASA
run_atm_corr(Level1_MSI('/Users/Desktop/S2A_MSIL1C_20230708T170851_N0509_R112_T15TVN_20230708T223109.SAFE/GRANULE/L1C_T15TVN_A042008_20230708T171755',
resolution='20',
ancillary=Ancillary_NASA(),
sline=5000,
eline=4000,
scol=5000,
ecol=4000),
Level2_NETCDF(outdir='/Users/Desktop')
)
Initialize MSI projection EPSG:32615
/Users....../lib/python3.10/site-packages/pyproj/crs/crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable ... -in-proj-6
in_crs_string = _prepare_from_proj_string(in_crs_string)
Starting processing at 2023-08-01 13:28:39.987322
Initializing output file "/Users/Desktop/S2A_MSIL1C_20230708T170851_N0509_R112_T15TVN_20230708T223109.SAFE.nc"
Done in 0:00:01.497200
<polymer.level2_nc.Level2_NETCDF at 0x1669ef670>
I am using the following code to analyze a small section of the sentinel-2 image utilizing the "sline" and "endline" commands to select the boundary. Despite the code running without error and producing an output file in .nc format, it is named with the extension ".SAFE.nc" and cannot be opened. I am wondering if anyone has experience using sline and endline with MSI2 images and if they have found a solution to this issue.
Thank you!
import polymer as polymer
from polymer.main import run_atm_corr
from polymer.level1 import Level1
from polymer.level2 import Level2
from polymer.level1_msi import Level1_MSI
from polymer.level2_nc import Level2_NETCDF
from polymer.ancillary import Ancillary_NASA
run_atm_corr(Level1_MSI('/Users/Desktop/S2A_MSIL1C_20230708T170851_N0509_R112_T15TVN_20230708T223109.SAFE/GRANULE/L1C_T15TVN_A042008_20230708T171755',
resolution='20',
ancillary=Ancillary_NASA(),
sline=5000,
eline=4000,
scol=5000,
ecol=4000),
Level2_NETCDF(outdir='/Users/Desktop')
)
Initialize MSI projection EPSG:32615
/Users....../lib/python3.10/site-packages/pyproj/crs/crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable ... -in-proj-6
in_crs_string = _prepare_from_proj_string(in_crs_string)
Starting processing at 2023-08-01 13:28:39.987322
Initializing output file "/Users/Desktop/S2A_MSIL1C_20230708T170851_N0509_R112_T15TVN_20230708T223109.SAFE.nc"
Done in 0:00:01.497200
<polymer.level2_nc.Level2_NETCDF at 0x1669ef670>