Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Using IDL / Map with Contours

IDL

Map with Contours

Map with Contours

You can enhance map graphics by overplotting contour data to show more detail. In this topic, we will use the IMAGE function along with the CONTOUR function using global cloud data.

The code shown below creates the graphic shown above. You can copy the entire block and paste it into the IDL command line to run it.

  ; Define the data by reading the image into IDL,
  ; creating the daymap variable to hold the data.
  READ_JPEG, FILEPATH('Day.jpg', $
     SUBDIR=['examples','data']), daymap
   
  ; Define the latitude and longitude data for the contour.
  longitude = FINDGEN(360) - 180
  latitude = FINDGEN(180) - 90
  cntrdata = SIN(longitude/30) # COS(latitude/30)
   
  ; Display the global image.
  map2 = IMAGE(daymap, $
  LIMIT=[-90,-180,90,180], GRID_UNITS=2, $
     IMAGE_LOCATION=[-180,-90], IMAGE_DIMENSIONS=[360,180],$
     MAP_PROJECTION='Mollweide')
   
  ; Draw the contour on top of the map image.
  cntr2 = CONTOUR(cntrdata, longitude, latitude, $
     GRID_UNITS=2, N_LEVELS=10, RGB_TABLE=34, /OVERPLOT)

Resources




© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us