MATLAB: How to convert pixel locations to Longitude and Latitude information in Mapping Toolbox 2.2

MATLAB

I have a TIFF-file with no GeoTIFF information tags, accompanied by a TFW-file (worldfile). I need to retrieve the latitude and longitude information for every pixel in the TIFF-file, given the projection type and the TFW-file.

Best Answer

The Mapping Toolbox version 2.2 (R14SP3) does not have built-in capability to convert pixel locations to latitude and longitude coordinates for files with no GeoTIFF tags.
To work around this issue, you need to create a projection structure suitable for PROJINV by executing the following steps:
1- Obtain the pixel centers using PIXCENTERS
2- Create a default mstruct with the appropriate projection using DEFAULTM
3- Manually set the missing parameters in the mstruct object
4- Use PROJINV using the mstruct object to convert the pixel centers to latitude and longitude information.