Steep Slopes Analysis

Click the “Steep” button, in the Cesium map below. A Transparency slider initializes at 50%, below the map area.


 

Legend:
    • no color = 0 – 20.0 degree slopes (transparent)
    • Green = 20.00000001-25.0 degree slopes
    • Yellow = 25.00000001-30.0 degree slopes
    • Peach =  30.00000001-35.0 degree slopes
    • Orange =  35.00000001-40.0 degree slopes
    • Red =  40.00000001-45.0 degree slopes
    • Magenta =  45.00000001-75 degree slopes

The maximum calculated slope angle in this area is 69.8 degrees

As a backcountry skier, search-and-rescue volunteer, and GIS analyst, using ESRI ArcGIS Spatial Analyst to identify steep slopes capable of producing avalanches in the White Mountain National Forest of New Hampshire (US) has been one of my interests for many years. I first worked with a USGS DEM of Mount Washington over 10 years ago, preparing a technical workshop, training GIS analysts to use ArcView 3.x Spatial Analyst.

In October, 2013, I repeated this steep slopes analysis, using a laptop & ArcGIS 10 software available in ESRI’s training lab at the NEARC GIS users conference in Nashua, NH, and exported the GIS raster data from ESRI’s proprietary GRID file format to georeferenced JPEG files that can be viewed “for free” by anyone using the Google Earth app.

USGS National Elevation Dataset, Digital Elevation Model (DEM)
ArcGIS Desktop, Spatial Analyst Tools, Surface, Slope Results

The Digital Elevation Model used as the source data for spatial analysis was a relatively low-resolution DEM with 10-meter by 10-meter grid cells, downloaded from the USGS National Elevation Dataset using the National Map website: http://viewer.nationalmap.gov/viewer/

I learned that Image Overlays in Google Earth are restricted by a device’s graphics processor.  Desktop, laptop, and mobile device’s hardware have a limit to “the maximum size the GPU supports safely”. When the Location Properties of the Image Overlay are correctly set to the full image extent of a 9533 x 9933 resolution image, Google Earth clips the source image and displays only about 60% of it’s extent.  

Console log debug messages helped decipher this issue: 

var gl = null;
 console.log("CesiumMapViewer.scene.canvas.getContext begin...");
 try{
 gl = CesiumMapViewer.scene.canvas.getContext('experimental-webgl');
 if(gl == null){
 gl = CesiumMapViewer.scene.canvas.getContext('webgl');
 }
 } catch(error){
 console.log("a .getContext error occurred getting WebGL");
 } finally{
 console.log("CesiumMapViewer.scene.canvas.getContext done...", gl);
 };
 if(gl != null){ // WebGL is supported
 console.log("the maximum size the GPU supports safely is: " + gl.getParameter(gl.MAX_TEXTURE_SIZE));
 } else {
 console.log("WebGL is not supported");
 };
 console.log("CesiumMapViewer.scene.canvas.getContext done...", gl);
 console.log("the maximum size the GPU supports safely is:  " + gl.getParameter(gl.MAX_TEXTURE_SIZE));

displays this: 

CesiumMapViewer.scene.canvas.getContext done... WebGLRenderingContext {drawingBufferHeight: 450, drawingBufferWidth: 700, canvas: canvas, activeTexture: function, attachShader: function…}canvas: canvasdrawingBufferHeight: 450drawingBufferWidth: 700__proto__: WebGLRenderingContext
 the maximum size the GPU supports safely is:  8192 

I believe this means my laptop’s hardware GPU can render an image up to 8192×8192; 4096×4096 and 2048×2048 were common maximums for older hardware. Similar GPU hardware limits restrict (or prevent!) rendering datasources added to a Cesium 3D web map viewer, within the WebGL and HTML5 framework, which make this debugging snippet useful for other rendering errors.

As a workaround to this maximum image resolution rendering limit in Google Earth, and to improve performance loading the Steep Slopes overlay, I split the White Mountain National Forest JPEG image into two-halves, east and west. The steep slopes analysis image overlay was posted…

  • on the Google Earth Community forum
  • The Eastern half of the WMNF image, from Crawford Notch to the Maine state line, is here (corner coordinates are -71.5, 44.0, -71.0, 44.375):
    The Western half of the White Mountains, from Mt Mooselauke and Franconia Notch, to Twin Mt and Bretton Woods, is here (corner coordinates are -72.0, 44.0, -71.5, 44.375):
    The following KMZ file shows the major ravines on the slopes of Mount Washington. If you have Google Earth installed, download this KMZ:
    https://groups.google.com/a/googlepr…t=4&authuser=0

    Slope_WMNF-72.0_44.0_-71.5_44.375.jpg Image Overlay.KMZ

    The following KMZ file shows Franconia Notch:
    https://groups.google.com/a/googlepr…t=4&authuser=0

    In 2015, using the same east-west two-image approach, I re-exported the GRID from ESRI ArcMap in PNG format for the Cesium web map. I used open-source GIMP software to edit the images, set the no-data pixels to the alpha channel for transparency, and change the color-mode from RGB to Indexed. “Generate optimum palette”, with 256 colors max, generated a color-map of the exact same 6  RGB colors chosen in ArcGIS to symbolize the 5-degree class breaks of the Steep Slopes layer,  and the resulting Indexed-color PNG file is a fraction of the RGB-color PNG  file-size.

      

      

     

    Cesium loads these PNG images as single-tile image providers. Higher resolution and faster performance could be achieved by converting the original resolution raster into a Tile Map Service, although ultimately, as you zoom-in on the map, resolution is limited to the original 10 square-meter pixels of the DEM.

    Cesium loads these PNG images as two single-tile image providers. Greater resolution and faster performance could be achieved by converting the original resolution GRID raster into a Tile Map Service, although ultimately, the maximum zoom-level for this Steep Slopes layer is limited to the original 10×10 meter pixels of the DEM source data, though now in geographic projection.

0 comments on “Steep Slopes AnalysisAdd yours →

Leave a Reply

Your email address will not be published. Required fields are marked *