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

Home » Public Forums » archive » /fill_ocean
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
/fill_ocean [message #10406] Mon, 24 November 1997 00:00
Kelly Dean is currently offline  Kelly Dean
Messages: 92
Registered: March 1997
Member
The MAP_CONTINENTS in IDL 5.0 has a /FILL_CONTINENT keyword which
works out great, but I need a /FILL_OCEAN keyword. I am attempting to
add the worldelev.dat to a map, but I don't need the ocean depths.
Anyone have an idea how to do a /FILL_OCEAN on a map projection?

The example below use the /FILL_CONTIENTS.

Kelly Dean
CSU/CIRA

=========================Satmap.pro=====================

FUNCTION GetElevation, DISPLAY=DISPLAY, SHIFT180=SHIFT180
;
; Open IDL data file with world elevation data.
;
OpenR, LUN, FILEPATH('worldelv.dat', SUB=['examples','data']), /GET_LUN
elev = BYTARR(360,360)
ReadU, LUN, elev
CLOSE, LUN
FREE_LUN, LUN
;
; Shift data 180 pixels to the right. Required for adding to maps.
;
IF ( KEYWORD_SET(SHIFT180) ) THEN BEGIN
elev = SHIFT(elev, 180, 0 )
ENDIF
;
; Display Elevation data in a separate window.
;
IF ( KEYWORD_SET(DISPLAY) ) THEN BEGIN
WINDOW, 0, XSIZE= 360, YSIZE =360, Title = 'World Elevation'
; LOADCT, 26
TV, elev
ENDIF

RETURN, elev
END

PRO EarthSat, longitude, latitude, ElevMap=ElevMap
;
; Load discrete color table.
;
tek_color
;
; Match color indices to colors we want to use
;
IF ( !D.N_COLORS GT 256 ) THEN BEGIN
TVLCT, RedTable, GreenTable, BlueTable, /GET
black = ( 256L * BlueTable(0) + GreenTable(0) ) * 256L + RedTable(0)

white = ( 256L * BlueTable(1) + GreenTable(1) ) * 256L + RedTable(1)

red = ( 256L * BlueTable(2) + GreenTable(2) ) * 256L + RedTable(2)

green = ( 256L * BlueTable(3) + GreenTable(3) ) * 256L + RedTable(3)

dk_blue = ( 256L * BlueTable(4) + GreenTable(4) ) * 256L + RedTable(4)

lt_blue = ( 256L * BlueTable(5) + GreenTable(5) ) * 256L + RedTable(5)

ENDIF ELSE BEGIN
black=0 & white=1 & red=2 & green=3 & dk_blue=4 & lt_blue=5
ENDELSE
;
; Define map region.
;
MAP_SET, /ORTHO, latitude, longitude, 0, $
TITLE = 'Orthographic Projection' + STRING(latitude,
FORMAT="(1x,F6.1)") + STRING(longitude, FORMAT="(1x,F7.1)"), $
XMargin = [0.0,1.0], $
YMargin = [0.0,1.0], $
; E_HORIZON={FILL:1, COLOR:dk_blue}, $
; COLOR=lt_blue, $
/Advance, $
/HORIZON, $
/ISOTROPIC, $
; /Label, $
/NoBorder, $
/NoErase
;
; Use the map parameters to remap the image.
;
IF ( KEYWORD_SET(ElevMap) GT 0 ) THEN BEGIN
elev = GetElevation(/Shift180)
rmdata = MAP_IMAGE(elev,sx,sy, /BILIN)
TV, rmdata, SX, SY
ENDIF
;
; Add Grid and continental outlines, Fill the continent boundaries with
solid white. and
; and grid map
MAP_CONTINENTS, /FILL_CONTINENTS, COLOR=white
MAP_CONTINENTS, /COASTS, COLOR=black
MAP_GRID, LatDel = 15, LonDel = 30, Label=2, Color = black

END

PRO SATmap
;
; Draw maps
;
WINDOW, 2, XSIZE = 512, YSIZE = 512, Title = 'Elevation View'
EarthSat, -104.0, 40., /ElevMap

END
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: /fill_ocean
Next Topic: climate regions

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

Current Time: Sun Nov 30 15:35:12 PST 2025

Total time taken to generate the page: 0.01111 seconds