Terrascope logo Proba-V MEP logo
This forum applies to Terrascope and Proba-V MEP. Please note that the forum is in English only.
Please log in using the link in the top menu to add new forum topics or comments.

Encoding error when opening PROBA-V from MTDA/TIFFDERIVED/

I am struggling with an issue that pops up from time to time when reading in PROBA-V Geotiff data. {code:python} import xarray as xr file = '/data/MTDA/TIFFDERIVED/PROBAV_L2A_GEOTIFF/1KM/2020/07/20200707/PROBAV_L2A_20200707_065654_1_1KM_V101/PROBAV_L2A_20200707_065654_1_1KM_V101_RADIOMETRY.tif' f = xr.open_rasterio(file) {code} This gives following error message: "UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 2: invalid continuation byte" Is there something wrong with this data? How can I solve this? My script runs fine over many files and then suddenly this pops up. Google/stackoverflow/... has not been super helpful. Thanks in advance!


From gdalinfo it appears that the metadata of this file is corrupt. How can I solve this so the data becomes useful? $ gdalinfo /data/MTDA/TIFFDERIVED/PROBAV_L2A_GEOTIFF/1KM/2020/07/20200707/PROBAV_L2A_20200707_065654_1_1KM_V101/PROBAV_L2A_20200707_065654_1_1KM_V101_RADIOMETRY.tif Driver: GTiff/GeoTIFF Files: /data/MTDA/TIFFDERIVED/PROBAV_L2A_GEOTIFF/1KM/2020/07/20200707/PROBAV_L2A_20200707_065654_1_1KM_V101/PROBAV_L2A_20200707_065654_1_1KM_V101_RADIOMETRY.tif Size is 4519, 10432 Coordinate System is: GEOGCS["WGS 84",     DATUM["WGS_1984",         SPHEROID["WGS 84",6378137,298.257223563,             AUTHORITY["EPSG","7030"]],         AUTHORITY["EPSG","6326"]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4326"]] Origin = (26.263392857142858,56.084821428571423) Pixel Size = (0.008928571428571,-0.008928571428571) Metadata:   AREA_OR_POINT=Area   TIFFTAG_COPYRIGHT=VITO   xG\ufffd            \ufffd\ufffd=\ufffd1p \ufffdG\ufffd     Image Structure Metadata:   COMPRESSION=DEFLATE   INTERLEAVE=BAND

I found a sollution to circumvent this: The error occurred when using xarray version 0.14.0. Reverting to xarray version 0.12 runs fine.
blijf op de hoogte!
abonneer op onze nieuwsbrief
nieuwe perspectieven

Blijf op de hoogte!