display GeoTIFF image automatically using cgGeoMap [message #93698] |
Mon, 03 October 2016 12:10  |
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   |
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  |
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
|
|
|