1

I have never worked with TIF images, I have a specific problem definition where I need to work on satellite raster in .TIF format, which I need to upload on Google Earth Engine. But when I convert image into Numpy array to apply some Image Processing techniques it looses its Georeferencing. Is there any way of preserving that in Output Image?

from PIL import Image
Image.MAX_IMAGE_PIXELS = None
ImagenTotal = numpy.asarray(Image.open('Well/newnew3.tif'))

imshow(ImagenTotal[10:-10,10:-10,:])

pylab.savefig('foo{}.tif'.)
Ameya Wagh
  • 31
  • 1
  • 5
  • 1
    You could use [GDAL](https://gdal.org/python/) to work with geospatial rasters in Python. I believe the question is too broad to fit StackOverflow. Essentially you are asking for an introduction to spatial data processing. – Dima Chubarov Feb 17 '20 at 16:21
  • You could [save the relevant metadata](https://stackoverflow.com/a/46910779/10987432) from the `.tif` before manipulating it. – Paul M. Feb 17 '20 at 16:49

0 Answers0