While our target audience for the Digital Coast is the management community, the data resources we develop are certainly valuable to a lot of other folks out there. However, the average person probably doesn’t have the pricey software package needed to handle geospatial data. That usually leads to complaints about Tiff images of the elevation appearing black and white after someone tries to open them in the default Windows application. If that sounds familiar, this is the post for you. We’re going to pull down some real elevation data, display it in a free open source GIS package, and make it look nice and clear. If you want to follow along, start by downloading and installing QGIS. It’s not the only option out there, but it’s a pretty good multi-platform one and will serve our purposes.
I’m starting with a file I downloaded from the Digital Coast Data Access Viewer that covers Sunset Beach, Hawaii. We’re going to look at the bathymetry in this surfing area, so the data set is the 2013 USACE NCMP Topobathy Lidar: Oahu (HI). I entered “Sunset Beach, HI” in the search box and accepted the default box, but the link on the data set name should take you there as well. I also used the default options in the download resulting in a 32-bit floating point Tiff file. There is a previous post with tips on using the DAV. I opened QGIS and did a drag and drop of the Tiff file into the main window. The result looks like this:

Not very pretty at this point. Just a greyscale rendering across the range of floating point values. By the way, it’s the fact that it’s floating point and not integers that confuses the default Windows programs. This file has the real elevations in decimal feet as the values for each cell, not colors. To change how it is displayed, right click on the image’s name in the lower left and select properties. The options we need can be found by clicking Style on the left side to get a dialog that looks like this:

Here you’ll see that under band rendering the render type is singleband gray. We need to change that to singleband pseudocolor, so select that from the drop-down render type menu and you’ll see some changes to the dialog. We’re going to go with the spectral palette that comes up, but click the invert box so blue is low instead of high. Also, we want to highlight the bathymetry so we’ll set the max value to zero. Click the classify button and the dialog should now look something like this:

Click OK and you’ll be back in the main window and it should look like this now:

While that looks fine, it could sure use some background for context in the form of a basemap. There are several ways we could do this, including downloading some imagery to put underneath our elevation. For this instance, we’re going to make use of one of the QGIS plugins and then use a map service.
From the plugins menu at the top, choose manage and install plug-ins. You’ll get a dialog box like the one below:

Select the OpenLayers Plugin and install it. Once you’ve done that, you can choose the OpenLayers plugin under the web menu. I found it easiest to first select the OpenLayers Overview, which added a new widget at the bottom of the left side. From there I could pick which basemap I wanted and add it to the map using the little icon with a green plus to the right of the service name (make sure you check the enable map box.) Once you do all that, your map should look something like this image using the Bing Aerial with Labels service:

Note that if the imagery just covered up your elevation, drag the elevation name so it is above the imagery name in the layers panel on the left. That doesn’t look bad, but it sure has a lot of red and since I’m really just interested in the bathymetry, it’s covering up part of the basemap that would help me orient at the shoreline. This is because I effectively made everything above zero feet red in the color map. We’ll go back in and clean that up a bit.
Right click on the elevation on the Layers Panel again and select properties just as you did before. Under the style section, we’re going to add a new range to our color map using the green plus sign (circled in the image below.)

Edit the values so the range is 0 to 350, which was our max value for the data set. Double-click color for your new range and you’ll get the change color dialog box. We don’t really care what the color is (even the horrible pinkish color I have is fine) because we’re going to make it transparent. Make the opacity zero percent and hit OK.

Now you should have something that looks like the image below. It’s not perfect for a number of reasons, such as the zero value for my elevation may not match the tide stage for the imagery and there are areas where the lidar data couldn’t get through the surf zone. But it should give you a good starting point to play with the data and make what you want.

There’s really a lot of detail in the data that you can’t see while looking at the whole data set. If I zoom into the area around Sunset Beach, you can see a lot more of the detail that’s there. I’ll leave it to a real surfer to interpret what’s going on there.

But how to stretch the color scale according to current display extent? Which is a basic function in ArcGIS, but not available in QGIS.?
LikeLike
That ability may not be in QGIS currently, at least not automatically. If you need it, you should certainly choose the program that does it, just as with anything else. Both ArcGIS and QGIS are good programs with different strengths and weaknesses.
LikeLike
Not sure if I properly understand the question, but customizing the output image/render color scale, as regards the number of colors, particular values of any chosen colors, and selection of custom elevation ranges for display of any given color are in fact doable in QGIS.
If any of the above relates to what you’re asking about, I will be very happy to be able to share such limited grasp of things as I have been able to learn, to date.
I will check back periodically, to see if you have further questions or comments regarding any of this.
LikeLike
QGIS has a raster toolbar with a single button that enables a histogram stretch based on current canvas extent. Details are located at the bottom of the following page:
https://docs.qgis.org/2.2/en/docs/training_manual/rasters/changing_symbology.html
Search for 8.2.2.1 to jump there directly.
LikeLike
[…] that will read the floating-point TIFFs correctly and allow the user to create what they want. An earlier GeoZone post showed an example of […]
LikeLike