Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Re: How to use ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 5721 of 5937
Post > Topic >>

Re: How to use Envi GLT when there are NaNs in the lat/lon files?

by Allard de Wit <allard.dewit@[EMAIL PROTECTED] > May 13, 2008 at 03:55 AM

On May 8, 7:10 pm, Jenny <env...@[EMAIL PROTECTED]
> wrote:
> Hi, I'm trying to georeference an image covering a very large area -
> pixels in the ocean were given as NaN. This image was projected, but I
> was not able to set up its projection in Envi based on the available
> parameters. However, there are lat/lon files for all of the grid
> points in the image. So I thought I could use GLT to register the
> image myself. Then there are NaNs in the lat/lon files same as in the
> image file. Does anybody have expereince of applying GLT from lat/lon
> with missing values? Is this possible?
>
> Thanks for any advice,
>
> Jenny



Jenny,

I've never tried to use the GLT in ENVI but my guess is that you need
to
filter out the NaN in all three images and write them to a new ENVI
image.
These images can then be used as input to the GLT module.

In pseudo code:

image = envi_get_data('imagefile')
lat = envi_get_data('latitudefile')
lon = envi_get_data('longitudefile')
; Asssuming NaN values are on the same locations in all files
index = Where(Finite(image) EQ 1, c)
IF c gt 1 THEN BEGIN
  nimage = image[index]
  nlat = lat[index]
  nlon = lon[index]
ENDIF
writeu, nmimage
writeu, nlat
writeu, nlon
envi_setup_head, nimage, nb=1, nr=1, nc=N_Elements(image)
envi_setup_head, nlat, nb=1, nr=1, nc=N_Elements(image)
envi_setup_head, nlon, nb=1, nr=1, nc=N_Elements(image)

Then use the nimage, nlon and nlat images as input to the GLT module
as described in the ENVI manual.
ENVI's GLT module will then put the data on the right place based on
the corresponding lat/lon values.


Allard
 




 2 Posts in Topic:
How to use Envi GLT when there are NaNs in the lat/lon files?
Jenny <envi35@[EMAIL P  2008-05-08 10:10:01 
Re: How to use Envi GLT when there are NaNs in the lat/lon files
Allard de Wit <allard.  2008-05-13 03:55:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 6:25:08 CDT 2008.