Geographic Information Systems Asked by Ron Gitson on February 20, 2021
I am trying to mask out some of the Sentinel-2 L1C Bands prior to other applications that require me to keep the classic .SAFE structure of the data.
I usually use rasterio with no trouble, but even with an operation as simple as
import rasterio as rio
input_band = ".../T33NVE_20180101T091351_B02.jp2"
out = ".../test"
with rio.open(input_band) as src:
data = src.read()
prof = src.profile
with rio.open(out, mode='w', **prof) as dst:
dst.write(data)
Here is what I get :
I know JP2000 is a lossy format, and I don’t usually use it….
What can I do to end up with the jp2 files recognized by Sen2cor?
This rasterio
issue suggests to add two parameters to the profile to write the image in a lossless fashion:
profile.update({
'QUALITY': '100',
'REVERSIBLE': 'YES',
})
Correct answer by guampi on February 20, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP