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

Home » Public Forums » archive » Re: 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
Re: image interplate and overlay lat/lon? [message #81175] Wed, 22 August 2012 10:13 Go to previous message
beardown911 is currently offline  beardown911
Messages: 21
Registered: March 2007
Junior Member
On Wednesday, August 22, 2012 10:57:48 AM UTC-5, go cats wrote:
> 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
>
> ;-----------------------------------------------------

Thanks David for your prompt answer and guide.
Yes, as you pointed, no interpolate is needed for the input image.
Image array and lat/lon grids have the same size.

I'll read through "Map Structures" and try it.

Thank you again and have a nice day!

Kim
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: For loop avoidance - getting indices of real space
Next Topic: A simple DLM question

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

Current Time: Wed Oct 08 19:20:32 PDT 2025

Total time taken to generate the page: 0.00446 seconds