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

Home » Public Forums » archive » image interplate and overlay lat/lon?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
image interplate and overlay lat/lon? [message #81178] Wed, 22 August 2012 08:57 Go to previous message
beardown911 is currently offline  beardown911
Messages: 21
Registered: March 2007
Junior Member
Hello all,

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?

Thanks in advance,
Kim

P.S. Below is what I've been working on.
;---------------------------------------------------------
; image(0,0)locates at the upper left corner
xOrigin = maxLon
yOrigin = maxLat

xscale = (maxLon – minLon)/nS
yscale = (maxLat – minLat)/nL

uvec = Findgen(nS) * xscale + xOrigin
vvec = yOrigin - (Findgen(nL) * yscale)

uarray = Rebin(uvec, nS, nL)
varray = Rebin(Reform(vvec, 1, nL), nS, nL)

outImage = Interpolate(inImage, varray, uarray)
.
.
.
geoTag = { $
ModelTiepointTag: [0.0, 0.0, 0.0, xOrigin, yOrigin, 0.0], $
ModelPixelScaleTag: [xscale, yscale, 0.0], $
GTModelTypeGeoKey: 2, $ ; (ModelType Geographic)
GTRasterTypeGeoKey: 2, $ ; (RasterPixelIsPoint)
GeographicTypeGeoKey: 4326 $ ; (WGS84)
}
.
.
WRITE_TIFF, outImage, GEOTIFF = geoTag
;-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Read Large files
Next Topic: Re: Format code to trim leading zeroes?

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

Current Time: Thu Oct 09 11:44:30 PDT 2025

Total time taken to generate the page: 0.80634 seconds