Hi Raghu,
As background information, the coordinates of your image are in a projected coordinate system rather than a geographic coordinate system. You can use the function GEOTIFFINFO to return the information structure.
You will see the 'ModelType' field set to 'ModelTypeProjected'; therefore, the RefMatrix is also referenced to map coordinates.
Beginning in R2011a, you will also see a new field, SpatialRef, which in this case will contain a spatialref.MapRasterReference object.
If you want to find the geographic coordinates from the map coordinates, then you need to use the function PROJINV to unproject the coordinates to latitude and longitude.
Here is how you would find the latitude and longitude values for the center of the first pixel in boston.tif:
info = geotiffinfo('boston.tif');
[x,y] = pix2map(info.RefMatrix, 1, 1);
[lat,lon] = projinv(info, x,y)
Beginning in R2011a, you can use:
[x,y] = pix2map(info.SpatialRef, 1, 1)
or
R = info.SpatialRef;
[x,y] = R.intrinsicToWorld(1,1);
followed by:
[lat,lon] = projinv(info, x,y);
I hope this help you.
-Kelly
Best Answer