Re: GOES Follow-up Question [message #59414] |
Tue, 18 March 2008 11:10 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> Clearly, the xscale and yscale values are wrong, since
> the tie point (the 2nd value) is in the right place.
>
> Why are they wrong?
>
> The one assumption I make that I cannot prove is
> that the corners of the warped image have the same
> lat/lon value as the corners of the unwarped GOES
> image and the same center. Is this assumption valid?
>
> If not, how can I determine the corner lat/lons of
> the warped image?
I might have known the one assumption I was making
would screw me up. But even then, IDL had more
curve balls to throw at me. :-(
OK, I needed to warp the latitude and longitude
arrays, in the same way I warped the image. I don't
know how to do this, other than to use MAP_PATCH,
so I tried that:
warp = Map_Patch(peruimage, peru_lon, peru_lat)
warp_lat = Map_Patch(peru_lat, peru_lon, peru_lat)
warp_lon = Map_Patch(peru_lon, peru_lon, peru_lat)
This worked OK, except for the fact that the first
column of warp_lat and warp_lon contain all zeros,
instead of values they were suppose to have. After
I extrapolated from columns 1 and 2, to fill in column
0, then I could calculate the latitude and longitude
corners of the warped image. They are NOT the same
as the latitude and longitude of the original image.
Original lat/lon corners
-99.3065 -19.4763
-98.1629 11.8074
-51.9875 11.8052
-50.8531 -19.4725
Warped lat/lon corners
-97.460799 -19.244392
-97.690084 12.663992
-52.490521 12.664713
-52.718553 -19.243647
Using the warped corners to produce the scale factor
and tie points in UV space, gave me a perfect fit
in the GeoTiff output.
I'll write an article, because no one should have to go
through this by themselves. :-(
Does anyone have ANY idea why the first column of
warped latitude and longitudes are screwed up? That's
sort hard to explain in an article.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|