Re: Georeferencing Errors [message #41507] |
Tue, 02 November 2004 13:06  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Will McCarty writes:
> lat = fltarr(4800,6000)
> lon = lat
> for i = 0, 4799 do begin
> for j = 0, 5999 do begin
> lat[i,j] = uly - dy*j
> lon[i,j] = ulx + dx*i
> endfor
> endfor
Those other guys probably solved your problems,
but I would have another look at the Dimension
Juggling Tutorial unless you *like* sitting
around for hours drinking coffee. :-)
http://www.dfanning.com/tips/rebin_magic.html
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|
Re: Georeferencing Errors [message #41509 is a reply to message #41507] |
Tue, 02 November 2004 12:57   |
mperrin+news
Messages: 81 Registered: May 2001
|
Member |
|
|
Will McCarty <will.mccarty@msfc.nasa.gov> wrote:
> OK, I've posted on this before, and this time I'm using a bit of a
> more common dataset (GTOPO30 terrain elevation), but getting similar
> geolocation errors. Thus I'm interested in seeing what (if anything)
> you guys can come up with. I use the following code:
>
> --test_lat_lon.pro
> ulx = -99.99583333333334
> uly = 39.99583333333333
> dx = 0.00833333333333
> dy = 0.00833333333333
If you really care about that many significant figures, you need to
declare these as doubles, not floats:
IDL> dx = 0.00833333333333333333333333333
IDL> print,dx,format="(F25.21)"
0.008333333767950534821
IDL> dx = 0.00833333333333333333333333333d
IDL> print,dx,format="(F25.21)"
0.008333333333333333218
- Marshall
|
|
|
Re: Georeferencing Errors [message #41512 is a reply to message #41509] |
Tue, 02 November 2004 12:07   |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <ce4903f3.0411021020.112e251f@posting.google.com>,
will.mccarty@msfc.nasa.gov (Will McCarty) wrote:
> OK, I've posted on this before, and this time I'm using a bit of a
> more common dataset (GTOPO30 terrain elevation), but getting similar
> geolocation errors. Thus I'm interested in seeing what (if anything)
> you guys can come up with. I use the following code:
>
> --test_lat_lon.pro
> ulx = -99.99583333333334
> uly = 39.99583333333333
> dx = 0.00833333333333
> dy = 0.00833333333333
>
> lat = fltarr(4800,6000)
> lon = lat
> for i = 0, 4799 do begin
> for j = 0, 5999 do begin
> lat[i,j] = uly - dy*j
> lon[i,j] = ulx + dx*i
> endfor
> endfor
I don't have the data set, but you might try
ulx = -99.99583333333334D0
uly = 39.99583333333333D0
dx = 0.00833333333333D0
dy = 0.00833333333333D0
lat = DBLARR(4800,6000)
As it is, you are not getting the precision you think you are.
Or, it might be a pixel corner/center thing.
Ken Bowman
|
|
|
Re: Georeferencing Errors [message #41639 is a reply to message #41507] |
Wed, 03 November 2004 21:31  |
Kelly Dean
Messages: 92 Registered: March 1997
|
Member |
|
|
The FOR FOR...ENDFOR ENDFOR will allow you to drink some coffee, but
the MAP_PATCH operation with this image will allow you to get a tennis
match in. IDL's PolyWarp and Poly_2D will get the remapping done in
minutes.
Kelly Dean
Colorado State University
Fort Collins, Colorado
David Fanning wrote:
> Will McCarty writes:
>
>> lat = fltarr(4800,6000)
>> lon = lat
>> for i = 0, 4799 do begin
>> for j = 0, 5999 do begin
>> lat[i,j] = uly - dy*j
>> lon[i,j] = ulx + dx*i
>> endfor
>> endfor
>
> Those other guys probably solved your problems,
> but I would have another look at the Dimension
> Juggling Tutorial unless you *like* sitting
> around for hours drinking coffee. :-)
>
> http://www.dfanning.com/tips/rebin_magic.html
>
> Cheers,
>
> David
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http:/www.dfanning.com/
> Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|