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

Home » Public Forums » archive » Georeferencing Errors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Georeferencing Errors [message #41513] Tue, 02 November 2004 10:20 Go to next message
will.mccarty is currently offline  will.mccarty
Messages: 2
Registered: November 2004
Junior Member
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

openr,1,'W100N40.DEM'
z = intarr(4800,6000)
readu,1,z
close,1

z = swap_endian(z)
map_set,mean(lat),mean(lon),/cylindrical,limit=[min(lat),min (lon),max(lat),max(lon)],/noborder

rmz = map_patch(z,lon,lat,missing=-9999)
tvscl,rmz
map_continents
end
---end

to put the topographic info to a projection. The result is at
http://vortex.nsstc.uah.edu/~mccarty/georef-err.png. Clearly there
are some georeferencing errors. I've tried both idl 5.6 (my normal
version) as well as 6.0. Similarly, I've tried multiple projections.
I've got some theories, but i'm looking to the experts on this one.

Thanks for any help you folks can provide.

Will
Re: Georeferencing Errors [message #41640 is a reply to message #41513] Wed, 03 November 2004 21:21 Go to previous message
Kelly Dean is currently offline  Kelly Dean
Messages: 92
Registered: March 1997
Member
You are on the right track, but try this instead...

TVscl, MAP_PATCH( z, lon, lat, missing=-9999, XSTART=x0, YSTART=y0 ), x0, y0

This will allow your image to be placed in the same location as your map. So there is no need to
add XMargine=0 and YMargine=0 parameters in the MAP_SET declaration.


Kelly Dean
Colorado State University
Fort Collins, Colorado

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
>
> openr,1,'W100N40.DEM'
> z = intarr(4800,6000)
> readu,1,z
> close,1
>
> z = swap_endian(z)
> map_set,mean(lat),mean(lon),/cylindrical,limit=[min(lat),min (lon),max(lat),max(lon)],/noborder
>
> rmz = map_patch(z,lon,lat,missing=-9999)
> tvscl,rmz
> map_continents
> end
> ---end
>
> to put the topographic info to a projection. The result is at
> http://vortex.nsstc.uah.edu/~mccarty/georef-err.png. Clearly there
> are some georeferencing errors. I've tried both idl 5.6 (my normal
> version) as well as 6.0. Similarly, I've tried multiple projections.
> I've got some theories, but i'm looking to the experts on this one.
>
> Thanks for any help you folks can provide.
>
> Will
Re: Georeferencing Errors [message #41643 is a reply to message #41513] Wed, 03 November 2004 12:19 Go to previous message
will.mccarty is currently offline  will.mccarty
Messages: 2
Registered: November 2004
Junior Member
OK, after months of wondering why, I've finally figured out the
problem!

The double precision adjustment played a role, but not the main role.
I had this problem with lat/lon grids already in double precision
previously, and yet had the exact same georeferencing problems.

It all comes down to two simple parameters. I post this so when I
have the problem again in 6 months, I'll find the answer.

I had been declaring projection information using:

--
map_set,mean(lat),mean(lon),/cylindrical,limit=[min(lat),min (lon),max(lat),max(lon)],/noborder
--

However, this gives a default border around the image. map_patch,
however, assumes no border. Thus by declaring the projection as
having no border:

--
map_set,mean(lat),mean(lon),/cylindrical,limit=[min(lat),min (lon),max(lat),max(lon)],/noborder,xmargin=0,ymargin=0
--

The map_continents vector information and the map_patch result end up
lining up perfectly.

My thought process in why this happens may be flawed, but by setting
xmargin and ymargin to zero, it lines up.

Will
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Help Plotting Cylinders in 3D
Next Topic: Re: Georeferencing Errors

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

Current Time: Wed Oct 08 19:52:01 PDT 2025

Total time taken to generate the page: 0.00654 seconds