Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`tree_cover_density_2018_romania.tif' not recognized as a supported file format. #6

Closed
jdilger opened this issue Apr 19, 2023 · 4 comments

Comments

@jdilger
Copy link

jdilger commented Apr 19, 2023

Hey there, I am attempting to test out nrt but it seems the example tif (tree_cover_density_2018_romania) is corrupted in some way.

When following the example workflow rasterio throws an error :

# load example mask
mask = (data.romania_forest_cover_percentage() > 20).astype('int')
RasterioIOError: '/nrt/nrt/data/tree_cover_density_2018_romania.tif' not recognized as a supported file format.

Doing a gdalinfo produces the same not recognized as supported file format error, and likewise it cannot be opened in QGIS.

@loicdtx
Copy link
Collaborator

loicdtx commented Apr 19, 2023

How did you install the package? From pypi or from a clone of this repository?

@jdilger
Copy link
Author

jdilger commented Apr 19, 2023

I installed the dependencies with conda (rasterio, xarray, dask, scipy, netCDF4, affine, numba), pypi for the package using python 3.9. I think it could be a me issue though, even if I omit the mask, I run into an error saying xarray is missing the correct IO backends for 'netcdf4' and 'scipy'.

@loicdtx
Copy link
Collaborator

loicdtx commented Apr 26, 2023

Sorry, just seeing now that you responded to the issue. A simple pip install nrt should normally resolve all dependencies. The reason I was asking about how it was installed is because these files (mask, example data cube, etc) are under git lfs which by default is not installed on most systems. Cloning and installing with pip install . or installing with pip install git+https://... when git lfs is not installed would very likely lead to the error you reported.

@jdilger
Copy link
Author

jdilger commented Apr 28, 2023

Ah thank you very much. The issue was certainly git lfs I was not familiar with using that. After installing lfs and pulling the data it appears to be working.

@jdilger jdilger closed this as completed Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants