A quick and easy request is handled with Select by Location

As we go to press, a fire rages on the Port Hills, reminding many of a similar event in 2017.

Image courtesy of CCC

Just today, I had a quick request from LU student services to get a quick idea of which roads were close to the fire area so they could identify any students potentially affected (and good on them too). While getting this fire under control has proved challenging, this was a pretty easy thing to handle with GIS.

I started out with a basemap of the area.

Searching through various news outlets, I hadn’t come across any maps or images of the fire extent (best I could do was this CCC map) so I had to make some rough estimates based on my observations and what I could see in crowd-sourced pictures and news reports – here was my rough stab at it:

Rather than create this as a stand alone feature class in a geodatabase, I chose to do this as a temporary layer, called a Map Note, just to save a few steps. Map Notes are more temporary graphics than actual GIS data but they can be used for my purpose and took half the time to create. This layer is called Polygon Notes in the text below.

Next we need some roads data. There are lots of roads data available from the LINZ Data Service but I ended up using one that we have in our data warehouse (the J: drive) in the Data\Toposhapefiles folder. All the shapefiles here relate to the features seen on the 1:50,000 scale topographic maps – one of them is roadcentrelines.shp, a national scale layer of roads across the motu:

One nice thing about this layer is that it not only shows us where the roads are, but also gives us their name (and road surface if we need it) in the attribute table.

So, I’ve got all the data I need – what I’m interested in is knowing the names of the roads that are within my very rough fire area:

We can do the visual analysis if I turn on the labels:

But there’s nothing permanent about this, so I’ll go an extra step and do it analytically. For an area this small, it would be easy to do this manually, but imagine if we were looking at much larger areas with many more roads.

Select by Location is the good choice of tool here. Most GIS users will be familiar with Select by Attribute, where we can ask a question of the attribute table (e.g. which features have native tussock as their vegetation?). A Select by Location asks a question of the map. Here the question is: which roads are within the fire affected area?

On the Map ribbon is the Select by Location button:

When clicked, a new window opens where we can set up the query:

So the logic here is to select features in roads-centrelines that Intersect with Polygon Notes. I don’t need to use the Search Distance and finally, I want it to be a New selection. (Invert Spatial Relationship is interesting – it would select all the road-centrelines that are not within the polygon.) Anyway, click Apply and we get:

See how I get features inside the polygon as well as some outside? This is because we used Intersect – any feature that is inside the polygon will get selected even if its full extent goes beyond the polygon boundary. That’s okay, as I’m only really interested in getting the names of those roads.

(As an alternative, I could have clipped out the roads using the polygon and ended up with just those road segments within the boundary.)

I get 21 selected road features after this – here’s the table:

I could stop here and say job done, but as you can see, some roads don’t have a name and others are repeated a few times. To tidy this up a bit, I’ll run the Dissolve tool to get rid of any repeated names.

By pointing it at the “name” attribute, it will combine all the features together that have the same value, and reduce the total number. My result?

Last step – to send this off I need to get it out of ArcGIS and into a more useful format – maybe an Excel spreadsheet. Not unexpectedly, there’s a tool for that – Table to Excel:

And my end user now has the results in Excel:

May sound like a lot of work, but in the end this probably took less than 10 minutes to do.

In an event like this, there’s a lot of location based information that can be helpful to the public, decision makers, and on the ground responders; GIS can come in very handy for creating maps, identifying features that may be affected (buildings and the people living there, roads, habitats) as well as making that information publicly available. It can also provide information on water sources for helicopter pilots refilling monsoon buckets, or letting people know about road closures.

Let’s hope this gets under control quickly and we can all breath a little more easily.

C