Re: image interplate and overlay lat/lon? [message #81176 is a reply to message #81175] |
Wed, 22 August 2012 09:49   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
go cats writes:
> My goal is to take an image(s) and overlay geographic lat/lon information onto the image. I have lat/lon information of four boundaries and tried to create a regular grid using them.
>
> I?ve used David?s code to generate a regular lat/lon grid, and tried to interpolate image with gridded lat/lon data.
>
> However, outImage looks blank and only geographin lat/lon data are shown with 0 image pixel values. I am working on 8-bit tif images.
>
> Would anybody give me some tips how to make this work or what I did wrong?
After doing a bit of research, I guess this is the right way
to create a GeoTiff grid with an equal-area cylindrical (called
other names!) projection. Although, I really don't know what
"Raster Pixel is Point" means. It seems to me a raster pixel
describes an area.
Anyway, I don't see any reason for Interpolating the input
image. Presumably your grid *describes* the input image.
If you really want to make it another size, I would use
Congrid. That has the advantage of doing the interpolation
correctly and in a way I don't have to worry about it. :-)
As far as not seeing anything, is this because you haven't
scaled the data, or because you tried to interpolate byte
data, or ... God only knows what.
I would *guess* your image might be upside down. When I
work with images and GeoTiff files, I always reverse the
Y direction when I read from the Tiff file, and reverse
it again when I write it.
Write_Tiff, Reverse(outimage,2), GEOTIFF=geoTag
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|