Marine Data Literacy 2.0

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data or model simulations, and mapped remote sensing imagery





Home > 7. Bathy/Topo Data > 7.6 3-D in IDV

7.6 Displaying 3-D Relief and Vector Overlays in IDV

  • Exercise Title:  Displaying 3-D Relief Data ("Topography") and Vector Overlays ("Maps") in Integrated Data Viewer (IDV)

  • Abstract:  Demonstrates how to make 3-D maps of selected data in IDV.  The process actually involves the conversion of existing XY-type shapes to XYZ format by adding Z values from specified "topography" grids.  Topographic grids and XYZ shapes can be displayed separately or together.

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

    • N/A

  • Required Software:

  • Other Resources: 

  • Author:  Murray Brown

  • Version:  10-19-2014

1.  Make or download the above NetCDF grid file (the "topography") and the shape graticule (the "map").
2.  Run IDV
3.  Use the dashboard to load both of these files into IDV.  Then select the topography object. 

NOTE:  Your eyes don't deceive you -- the shape can be left unzipped, and it works fine.


5.  Here's the initial view of the grid.  For some reason, it displays as a simple GIF, with only 256 colors (in black/white).


6.  On the dashboard for this object, click GRAY SCALE > CHANGE RANGE
8.  Select FROM ALL DATA and the relief values will appear as you see here.

9.  Now you have a much better image, although it's only "gray scale" (i.e. black to white).


10.  Right-click on the bottom of the image and drag it around to see how the 3-D visualization works.
11.  Select VIEW > PROPERTIES (at top left of map) and you'll see this 5-tab set of controls.  Select ASPECT RATIO  and you'll find these controls for balancing the length scales of the axes.  The Z control is the one you want for increasing or decreasing the height factor for the grid. 

Try some different values.  Keep the one you like.

12.  OPTION.  There is a special color palette for TOPOGRAPHY, which you can also use.
13.  Now let's try to combine the graticule with the 3-D map.  Select that object and click CREATE DISPLAY.
14.  The graticule is a simply XY shape, so it cannot be displayed as a 3-D object yet.  As you see here, it merely plots as a plane below the 3-D relief map.  This would be true of any simple shape we try to plot this way, e.g. coastline, country borders, etc.

To combine shapes with the topography, we need to apply a "formula" to them, which adds the Z-dimension to the existing XY values.

15.  Experiments with some locally stored relief grids have not resulted in acceptable success rates, i.e. too many failures.  To simplify matters, we avoid these problems by using the CATALOGS method to access online relief grids, which apparently is always successful with IDV.  [Questions have been posed to the IDV Help facility to sort out this small problem.]

Here's what we'll do in the next section:

  • Discard the local topography grid we just used
  • Use the data catalog in IDV to access best-quality global relief data
  • Subset the spatial property of the data to the Liberia area
  • Use an IDV "formula" to convert our XY local map (the Liberia graticule) to XYZ type, using the relief grid to obtain the Z values
  • Display the colored graticule on a gray-scale version of the Liberia relief grid
16.  On the dashboard, use DATA CHOOSERS > GENERAL > CATALOGS and navigate down into the items to find the SMITH & SANDWELL V 11.1 relief dataset (S&S).  Then click ADD SOURCE.

(This replaces the GEBCO relief we used above.)

17.  Now you'll have to right-click on the S&S relief grid and select PROPERTIES.
18.  Select the SPATIAL SUBSET tab.  Then draw a small box anywhere on the map to activate the control.  Then enter the Liberia coordinates.

Click OK.

NOTE:  Under certain circumstances, described below, you may need to enter slightly wider and taller coordinates similar to these example values:



-23.01 -2.99


You can read more about this option below.

19.  You can visualize the S&S data now, if you want.  But they are essentially identical to GEBCO, so we won't do it here.

And also select DISPLAYS > TOPOGRAPHY.


21.  Now this FIELD SELECTOR screen opens.  To succeed here, you must have the graticule on the left side (FIELD: MAPDATA) and the S&S topography on the right side (FIELD: TOPOGRAPHY).  Other objects may be shown, but these are the minimal requirement for success.

Make these choices:

  • For FIELD: MAPDATA select the shape you want to convert to XYZ format, in this case the graticule
  • For FIELD : TOPOGRAPHY select the grid whose values you want to add to the shape, in this case the S&S topography

Then click OK.

22.  You can unclick anything else, so they don't show.  But here is the new shape, color-coded with the Z values.

Strangely, the far left column of cells appears to be deleted.

23.  Here is the original XY graticule plotted alone as a check to make sure that it was complete.  You can count the columns to make sure that the left-most column is missing above.

We'll move ahead, but this small mystery needs to be solved.

24.  And here we've rotated the XYZ graticule to see that it really is 3-D now.

The missing left column is very obvious here!   If this small issue is not acceptable for your purposes, there is a fix described below (at the bottom of the exercise).

25.  How to make it look better?  Select VIEWS > PROPERTIES
26.  You can uncheck the SHOW WIREFRAME BOX item to remove that cumbersome item.
27.  Here's what the 3-D grid looks like now.
28.  Now let's put the 3-D relief data back into the map.  Select the S&S object.  Then select FIELDS > TOPOGRAPHY and DISPLAYS > 3D SURFACE > TOPOGRAPHY.

And then click CREATE DISPLAY.

NOTE:  You are invited to try other options here, as the author got immediate satisfaction with TOPOGRAPHY and didn't go any further.

29.  Before you even look at the result, avoid color conflict by selecting COLOR TABLE > BASIC > GRAY SCALE.
30.  Now you have a nice 3-D map with a color-coded shape over topography.  The coastline probably originally also contained Z=0 values, so it is agreeably located exactly where we want it.

Now we have control over 3-D visualizations in IDV (as long as we can find what we need in the CATALOGS).

31.  There's a thousand other interesting things you find to show with IDV's functions, so give it a try.
32.  OPTION:  If the "problem" of the missing row of graticule cells (shown above) creates an unacceptable map, then there is an easy fix described here.
33.  When you are specifying the boundary coordinates of the Liberia area (or whatever area you focus on), then enlarge the area slightly, i.e. wider and taller.
  • Be careful to make sure that you don't actually make the area smaller by using incorrect values
  • The increment/decrement used here is 0.01 deg.  You might find that you must increase or decrease it.  You'll know when to try this when the final map (shown in the next panel) doesn't have the missing column or row of cells.
34.  Here's the 3-D map made from the settings above.  The graticule is complete.