comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: ENVI Navigating GeoTiff Image Incorrectly?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: ENVI Navigating GeoTiff Image Incorrectly? [message #78200 is a reply to message #78116] Fri, 28 October 2011 07:20 Go to previous message
guillermo.castilla.ca is currently offline  guillermo.castilla.ca
Messages: 27
Registered: September 2008
Junior Member
Hi David,

I think the problem could be that your tiff image does not use the
upper left corner of the tie point pixel as the reference. To make
sure that pixel coordinates refer to the center of the pixel as in the
ENVI convention, I do the following (assuming there is no rotation):

ok = QUERY_TIFF(myTiff, imginfo, GEOTIFF= mapinfo)
psz=mapinfo.ModelPixelSCALETAG[0] ; pixel size
x0= mapinfo.ModelTiePointTag[3] - mapinfo.ModelTiePointTag[0]*psz
y0= mapinfo.ModelTiePointTag[4] + mapinfo.ModelTiePointTag[1]*psz

ModelTiePointTag[0:1] indicate whether the coordinates of the tie
point refer to:
(1)the upper left corner of the pixel
(and in this case ModelTiePointTag[0:1]=[0,0]);
(2) the center of the pixel (ModelTiePointTag[0:1]=[0.5,0.5]); or
(3) the lower left corner of the pixel
(ModelTiePointTag[0:1]=[0,0.5])

See if your ModelTiePointTag[0:1]=[0,0]. If not, you were wrongly
assuming that the geotiff coordinates referred to the upper left
corner of the tie point pixel. This might not be necessarily be the
case.

Cheers

Guillermo
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Alert IDL
Next Topic: Re: questions regarding using cgWindow, cgLoadCT, and something else

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 07:01:55 PDT 2025

Total time taken to generate the page: 0.96261 seconds