How to Use QGIS to Identify Fire Areas (Shallow Thoughts)

Akkana's Musings on Open Source Computing and Technology, Science, and Nature.

Thu, 23 Nov 2023

How to Use QGIS to Identify Fire Areas

[]

(A QGIS beginner's tutorial.)

For quite a while I've been wanting a map showing the perimeters of the big local fires. When walking through a burned area, I wonder, was this one from the Cerro Grande fire? Or Las Conchas? Or another fire?

Yesterday, inspired by Ryan Peek's #30DayMapChallenge toot on California Fire Perimeters, I decided to look for the data and load it in QGIS.

Also, I never did an entry for Day 3 of the #30DayMapChallenge, "Polygons", so this is it, not quite three weeks late.

I've been using QGIS for map data for a couple years now, off and on, but I still feel like a newbie. It's such a capable, feature-full program and the user interface isn't always intuitive (to me). So here's a tutorial on how to use QGIS for a task like this. Some of this I already knew, some I didn't.
[]

Step 1: Load a Basemap

I sometimes feel like the basemap is the hardest part of a QGIS project. So much so that I've formed the habit of starting new QGIS projects by copying one of my existing projects, deleting all the layers except the basemap then adding whatever new layers I need. But it's gotten a lot easier since the last time I tried.

It has. MapScaping has a pretty extensive guide to Adding Basemaps in QGIS, which I'll summarize thusly:

But it's actually simpler than that.

In the past I've always used QMS to get OSM tiles. However, in my current QGIS I notice that the Browser pane that's already open when I start a new project already has XYZ Tiles there, and if I expand it, it has OpenStreetMap as an option. Double-clicking that gives me an OSM world overview basemap layer in the layer list, and I can zoom in to whatever area I want to cover. As easy as that.

Get Fire Perimeter Data

I couldn't use Ryan's Peek's data source because it's only for California. Searching for fire perimeter data initially led me to a USGS page, Where Can I find Wildfire Perimeter Data?, which was sounded ideal but turned out to be completely useless — basically none of the links there lead to a page where you can download actual data.

But eventually I found my way to a Forest Service GeoData page which had exactly what I wanted.

I chose the ESRI geodatabase format because it was less than half the size of the shape file format. Unzipping the S_USA.FinalFirePerimeter.gdb.zip file creates a directory named S_USA.FinalFirePerimeter.gdb.

To load a vector dataset into QGIS, use Layer→Add Layer→Add Vector layer... Click on the tiny unobtrusive ... button to the right of Vector Dataset(s). At least, that's what you do for most datasets.

But wait! Loading a geodatabase into QGIS requires a trick: before clicking on the ... button, you first have to change Source Type to Directory, then under Source, change Type to OpenFileGDB. (And watch out: once changed, that Source Type stays changed, so if you load other vector datasets you may have to change it back to file.)

Then click on the ... button, navigate to the S_USA.FinalFirePerimeter.gdb directory, and don't doubleclick, but Instead, click once on it, then click Choose in the dialog.

Then in the parent Data Source Manager dialog, click Add. In the next dialog that pops up, click Add Layers. That yields yet another dialog asking about converting between coordinate reference systems: you can use the default, NAD83 to WGS84 (1).

Now you can Close the Data Source Manager and zoom in on your area of interest.

Colorize the Polygons

[QGIS after loading a new vector layer] Pretty much every vector layer you load into QGIS will initially show up with everything in the same ugly color. So immediately after loading the layer, right-click on the layer in the Layers pane and choose Properties...

At the very top of the dialog, you'll see a menu that defaults to Single Symbol. Click there and change it to Categorized. Then, immediately below, click on Value and pick the parameter that's of most interest to you. In this case, likely choices are FIRENAME and COMPLEXNAME. I chose FIRENAME. I almost always leave Color Ramp set to Random Colors, but you can change it to a different color scheme if you want. For instance, if you have a dataset where the values are 1 through 100, you might want to use a specific color ramp so the colors will reflect the value.

[QGIS after setting Categorized symbology] Click Classify near the bottom of the dialog. For this dataset, you'll see a warning, "High number of classes. Classification would yield 24749 entries which might not be expected. Continue? That's because this is a database of historic fires throughout the US, and there have been a lot of fires. Click OK and wait a while for it to assign all the colors.

One more step. Just below the Classify button, click on the right-arrow to expand Layer Rendering. Slide the Opacity slider to somewhere around 50%, so you can see through the fire areas to the map below.

Click Apply. If you don't like the opacity, adjust it. When you're happy, click OK.

The Identify Tool

Now you can use the Identify button in the toolbar, [QGIS info button] the one with an arrow pointing to a letter "i". In Identify mode, when you click on an area, you get information in the right pane about all its properties including FIRENAME.

By the way, if you need to move around when in Identify mode without going back to Pan Map mode (the Hand icon), you can drag the map using the middle mouse. Use your mouse scroll buttons to zoom in and out.

But that only shows whatever layer is uppermost. If you click on a place that's been burned in multiple fires, you might want to know all the polygons that include that place.

Identifying multiple layers

[Right-click in QGIS showing multiple layers] To find that out, use your right mouse button when in Identify mode. You'll get a list of all FIRENAMEs covering the point where you clicked, and you can choose one if you want to see all the other details of that fire, like what year it happened.

One step left: since the fire database is so large, I wanted to limit it to a smaller area, like just one state or just a few counties. But this has gotten long, so I'll write about that separately: A Smaller, Lighter Dataset: Clip Layers in QGIS.

Tags: , , , ,
[ 12:34 Nov 23, 2023    More mapping | permalink to this entry | ]

Comments via Disqus:

blog comments powered by Disqus