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

Home » Public Forums » archive » Overlaying data on a MODIS reprojected image created with the TrueColor package
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Overlaying data on a MODIS reprojected image created with the TrueColor package [message #92374] Fri, 04 December 2015 02:12 Go to previous message
Steve[7] is currently offline  Steve[7]
Messages: 5
Registered: December 2015
Junior Member
Hi

I have created a reprojected MODIS true color image using the TrueColor package (ftp://ftp.ssec.wisc.edu/pub/IMAPP/MODIS/TrueColor/)

I now want to read this image into IDL and overlay some data on top of the image e.g. an aircraft flight track. I am however having trouble getting the map projection correct.

Note that the gpd file used in the TrueColor packaged to create the original image continas the following

Map Projection: Azimuthal Equal-Area
Map Reference Latitude: 62.500
Map Reference Longitude: -10.000
Grid Map Units per Cell: 0.250
Grid Width: 4400.0
Grid Map Origin Column: 2199.5
Grid Height: 3400.0
Grid Map Origin Row: 1699.5

I have tried the following code which attempts to use the method from David Fanning's page http://www.idlcoyote.com/ng_tips/mapnogrid.php

;read in original image
img = READ_TIFF('true.tif')
img = REVERSE(img,3)

s=SIZE(img,/DIMENSIONS) ;3x4400x3400

projection='Lambert Azimuthal'
latcen = 62.50
loncen = -10.0
res = 0.25

map = Obj_New('cgMap', projection, /OnImage)
uv = map -> Forward(Loncen, Latcen)
uv_xcenter = uv[0,0]
uv_ycenter = uv[1,0]
xrange = [uv_xcenter - ((s[1]/2.)*res*1000.), uv_xcenter + ((s[1]/2.)*res*1000.)]
yrange = [uv_ycenter - ((s[2]/2.)*res*1000.), uv_ycenter + ((s[2]/2.)*res*1000.)]
map -> SetProperty, XRANGE=xrange, YRANGE=yrange
cgDisplay, s[1]/4., s[2]/4.
cgImage, img, Margin=0.1
map -> Draw
cgMap_Grid, MAP=map, /BOX_AXES, /cgGRID
cgMap_Continents, MAP=map, /continents, /hires

The above code displays the original image on a map which looks about right. However the coastlines produced by cgMap_Continents do not overlay the real landmass boundaries in the original image. Clearly the map projection isn't quite correct.

Until I get this sorted I can't overlay data onto the image.

Any ideas on what I am doing wrong?

Thanks in advance

Steve
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Google search from within an IDL program
Next Topic: chrome browser update

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

Current Time: Wed Oct 08 15:13:37 PDT 2025

Total time taken to generate the page: 0.00441 seconds