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

Home » Public Forums » archive » map_proj_* help
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: map_proj_* help [message #66850 is a reply to message #66805] Fri, 12 June 2009 12:32 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I've come to the tentative conclusion that it is NOT
> possible to navigate this image with IDL map projections.
> I do note that ENVI (which uses its own map projection
> software) *is* able to navigate the image correctly.
>
> This is MOST disconcerting. But not, unfortunately,
> all that surprising to me. I could still be wrong
> (I *hope* I am), but the current seems to be running
> in the other direction. :-(

Oh, never mind. I figured it out. :-(

Here you go. The good news is I probably got another
web page article out of it. :-)

;*****************************************************
file = 'G:\data\pine_2009084_1545_modis_ch02.tif'
image = Read_Tiff(file, Geo=geotag)
image = BytScl(Reverse(image,2))

; Display map in window.
pos = [0.1, 0.1, 0.9, 0.9]
TVImage, image, POSITION=pos, /KEEP_ASPECT, /NOINTERP, /ERASE

; Set up Map Projection. Polar Stereographic, WGS-84 Datum.
map = Map_Proj_Init(106, DATUM=8, CENTER_LAT=-70, CENTER_LON=-100)

; Set the limits of the image.
s = Size(image, /Dimensions)
xscale = geotag.ModelPixelScaleTag[0]
yscale = geotag.ModelPixelScaleTag[1]
tp = geotag.ModelTiePointTag[3:4]
xOrigin = tp[0]
yOrigin = tp[1] - (yscale * s[1])
xEnd = xOrigin + (xscale * s[0])
yEnd = tp[1]

; Set up the map coordinate space.
Plot, [xorigin, xend], [yorigin, yend], $
XStyle=5, YStyle=5, /NoData, POSITION=pos, /NOERASE

; Draw map grids.
Map_Grid, MAP_STRUCTURE=map, LONDEL=5, LATDEL=1, $
LATLAB=-110, LONLAB=-75, /LABEL
;*****************************************************

Didn't I tell you we would probably have it whipped by Friday!
This is pretty much how map projections go. At least for me.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idl encoder/decoder of json
Next Topic: Re: file_search: need work around for filenames with square brackets [ ]

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

Current Time: Fri Oct 10 11:05:49 PDT 2025

Total time taken to generate the page: 1.11699 seconds