1

I have a TIFF image file and I need to extract the latitude and longitude values (in decimal degrees) for each pixel's corners. I have the latitude and longitude values for the top right, top left , bottom right and bottom left corners. Along with this, I also have the pixel values for each pixel in the image.

How do I perform this task in ENVI or in IDL?

Do I need to some information about the TIFF file in order to proceed?

  • Have you actually tried to do this in either ENVI or IDL? If so, which do you want to ask about in this question, and where did you get stuck when you tried to do it? – PolyGeo Dec 14 '16 at 8:30
  • I am new to both envi and idl. I am not much familiar with their environment so I couldn't do anything on that. However, suggestion for any other platform is also appreciated. – Dark_Knight Dec 14 '16 at 8:33
  • 1
    I recommend not thinking about GIS SE as being some sort of online GIS tutor. For your questions to be answered here they should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. – PolyGeo Dec 14 '16 at 8:39
  • @PolyGeo Will keep in mind. – Dark_Knight Dec 14 '16 at 8:42
  • @nmtoken Isn't that a program for finding pixel values? I already have that. – Dark_Knight Dec 14 '16 at 8:47
3

Do I need to some information about the tiff file in order to proceed?

You'll need to know the size of the pixels for a start, and you could use GDAL for that, see:

How do I find out the resolution in (centimeters per pixel) of a TIF?

I am new to both ENVI and IDL. I am not much familiar with their environment so I couldn't do anything on that. However, suggestion for any other platform is also appreciated.

As far as using IDL to call GDAL, though, it doesn't look like it's possible; there is a discussion on the gdal-dev mailing list about this point. With a conclusion to just use Python.

Apparently:

IDL and Python Numeric have a similar syntax and perhaps you would find it easiest to just write your routines in Python

This page is a summary of the mapping between IDL and numarray commands

http://www.johnny-lin.com/cdat_tips/tips_array/idl2num.html

Reference: http://marc.info/?l=gdal-dev&m=121322983508766&w=2

There are quite a few questions on gis.stackexchange that deal with GDAL+Python+Tiff, so you should be able to get enough of a hint to progress.

  • Is there any way to convert the pixel values to latitude and longitude? If yes then will this lat-long co-ordinate will be at the center of each pixel? – Dark_Knight Dec 14 '16 at 9:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.