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

Home » Public Forums » archive » display GeoTIFF image automatically using cgGeoMap
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
display GeoTIFF image automatically using cgGeoMap [message #93698] Mon, 03 October 2016 12:10 Go to next message
Libo Wang is currently offline  Libo Wang
Messages: 6
Registered: October 2009
Junior Member
Hi all,

I just found out that David has added some nice routines to display a GeoTIFF easily. So I thought I could just copy over his example lines at the end of this link and give a try: http://www.idlcoyote.com/map_tips/tiffoverlay.html,

filename = 'AF03sep15b.n16-VIg.tif'
cgDisplay, 500, 500, WID=5, Title='Outline cgMap Object', $
XPOS=50, YPOS=50
alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
scaled = BytScl(tiffImage, Top=253)+1
index = Where(scaled EQ 1)
scaled[index] = 0B
TVLCT, cgColor('ivory', /Triple), 0
cgLoadCT, 33, NColors=253, Bottom=1
cgImage, scaled, POSITION=pos, /KEEP_ASPECT


However,I got the following syntax errors when compile:
alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
^
% Syntax error.

This is probably quite obvious to you, but I have never used Object graphics in IDL before. Can somebody point out why I get the syntax error?

Thanks in advance!
Jenny
Re: display GeoTIFF image automatically using cgGeoMap [message #93700 is a reply to message #93698] Mon, 03 October 2016 18:52 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
That is the syntax error one gets when IDL doesn't know about a function, i.e. the function is not in your !path or in the current directory. Are you sure you have the Coyote library in your !PATH ? What happens when you type

IDL> print,file_which('cggeomap.pro')

-- Wayne

On Monday, October 3, 2016 at 3:10:40 PM UTC-4, Jenny wrote:
> Hi all,
>
> I just found out that David has added some nice routines to display a GeoTIFF easily. So I thought I could just copy over his example lines at the end of this link and give a try: http://www.idlcoyote.com/map_tips/tiffoverlay.html,
>
> filename = 'AF03sep15b.n16-VIg.tif'
> cgDisplay, 500, 500, WID=5, Title='Outline cgMap Object', $
> XPOS=50, YPOS=50
> alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
> scaled = BytScl(tiffImage, Top=253)+1
> index = Where(scaled EQ 1)
> scaled[index] = 0B
> TVLCT, cgColor('ivory', /Triple), 0
> cgLoadCT, 33, NColors=253, Bottom=1
> cgImage, scaled, POSITION=pos, /KEEP_ASPECT
>
>
> However,I got the following syntax errors when compile:
> alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
> ^
> % Syntax error.
>
> This is probably quite obvious to you, but I have never used Object graphics in IDL before. Can somebody point out why I get the syntax error?
>
> Thanks in advance!
> Jenny
Re: display GeoTIFF image automatically using cgGeoMap [message #93716 is a reply to message #93700] Tue, 04 October 2016 06:36 Go to previous message
Libo Wang is currently offline  Libo Wang
Messages: 6
Registered: October 2009
Junior Member
On Monday, October 3, 2016 at 9:53:02 PM UTC-4, wlandsman wrote:
> That is the syntax error one gets when IDL doesn't know about a function, i.e. the function is not in your !path or in the current directory. Are you sure you have the Coyote library in your !PATH ? What happens when you type
>
> IDL> print,file_which('cggeomap.pro')
>
> -- Wayne
>
> On Monday, October 3, 2016 at 3:10:40 PM UTC-4, Jenny wrote:
>> Hi all,
>>
>> I just found out that David has added some nice routines to display a GeoTIFF easily. So I thought I could just copy over his example lines at the end of this link and give a try: http://www.idlcoyote.com/map_tips/tiffoverlay.html,
>>
>> filename = 'AF03sep15b.n16-VIg.tif'
>> cgDisplay, 500, 500, WID=5, Title='Outline cgMap Object', $
>> XPOS=50, YPOS=50
>> alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
>> scaled = BytScl(tiffImage, Top=253)+1
>> index = Where(scaled EQ 1)
>> scaled[index] = 0B
>> TVLCT, cgColor('ivory', /Triple), 0
>> cgLoadCT, 33, NColors=253, Bottom=1
>> cgImage, scaled, POSITION=pos, /KEEP_ASPECT
>>
>> Thanks! Wayne. You're right. We just moved to a new server, I thought the library was all set but it didn't!

Jenny

>> However,I got the following syntax errors when compile:
>> alberMap = cgGeoMap(filename, IMAGE=tiffImage, /OnImage)
>> ^
>> % Syntax error.
>>
>> This is probably quite obvious to you, but I have never used Object graphics in IDL before. Can somebody point out why I get the syntax error?
>>
>> Thanks in advance!
>> Jenny
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: I would like to average the first n columns based on duplicate values of the n+1th column
Next Topic: IDL new graphics memory leak?

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

Current Time: Wed Oct 08 11:37:36 PDT 2025

Total time taken to generate the page: 0.00449 seconds