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 
Switch to threaded view of this topic Create a new topic Submit Reply
image interplate and overlay lat/lon? [message #81178] Wed, 22 August 2012 08:57 Go to next 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
;-----------------------------------------------------
Re: image interplate and overlay lat/lon? [message #81228 is a reply to message #81178] Tue, 28 August 2012 11:24 Go to previous message
beardown911 is currently offline  beardown911
Messages: 21
Registered: March 2007
Junior Member
I give sincere thanks to David.
It works like a charm.

And thanks to Yngvar & Klemen for nice tips and information.

Have a nice day all,

Kim
Re: image interplate and overlay lat/lon? [message #81249 is a reply to message #81178] Mon, 27 August 2012 05:41 Go to previous message
Klemen is currently offline  Klemen
Messages: 80
Registered: July 2009
Member
Hi, some recommendations to you GeoTag

Here I set 1 instead of 2 as you do:
GTRasterTypeGeoKey: 1, $ ; (RasterPixelIsPoint)

I use also:
GEOGANGULARUNITSGEOKEY: 9102;angular unit decimal degree
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 13:39:50 PDT 2025

Total time taken to generate the page: 0.00422 seconds