1

I would like to do some basic operations over some downloaded raster files (tiff) and include the process in a package, but I don't want the users of my package to install GDAL, neither rasterio.

In the process I basically download every band of a multiband raster separately, and need to merge all into one single raster tiff. I know it can be done with the mentioned packages, but I need a pure python solution for this simple task. I was thinking in scikit-image but I am not sure how it will be for handling geographic information, mainly CRS.

7
  • What you describe is simple image manipulation? A raster dataset is not much different from a multidimensional array, so you can use whatever image library you prefer. CRS information is just metadata that is either stored in the header or in extra files, so shouldn't be troubled by it. If you have concerns about speed or specific tasks, more specific suggestions can be given.
    – Senshi
    Commented Sep 27, 2018 at 16:47
  • How about PIL/Pillow pythonware.com/products/pil?
    – user30184
    Commented Sep 27, 2018 at 17:12
  • skimage likely leans on numpy, so there goes your pure python. I would recommend looking into freezing packages e.g. with pyinstaller so you can lean on the existing functionality of those purpose-built libraries
    – mikewatt
    Commented Sep 27, 2018 at 19:38
  • Thank you all. I guess all band must be in the same projection in order to use a simple image manipulation library Commented Sep 28, 2018 at 2:37
  • 2
    Neither scikit-image (written in Cython) or PIL/pillow (written in C) are pure python. I don't know of a pure python geotiff/raster package, but if you did find one, I would bet that it has at least one or two binary dependencies (i.e numpy or libtiff).
    – user2856
    Commented Sep 28, 2018 at 2:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.