There’s a lot of innovation and progressive policy to celebrate in Kansas City, but my favorite is the City’s commitment to open data. Its GIS data (available for download on the City’s online mapping under the “Download” tab) is particularly helpful to any planner or other civic nerd wanting to contribute to learn more about the city or contribute to planning initiatives.
As the City updates its bike plan and explores new bike routes, there are a number of key variables to consider. The variable I’m most interested in (as someone who isn’t in the greatest cycling shape) is the grade of these potential routes.
There are probably a number of different ways to figure the average slope (including creating a raster slope map of the city using that contour data). Here’s a quick step-by-step guide to a “spatial join” method that ties the slope directly to each street centerline segment.
Step 1: Spatial Join Contour Features to Street Centerline Features
First, GIS will search for every contour and find the highest and lowest elevation along the street centerline (which has been divided into blocks) through a spatial join operation. This can take some time, depending on the size of the geography being joined.
Step 2: Calculate Slope
With the minimum and maximum elevation of each centerline segment, and the length of each segment already calculated, we have everything necessary to calculate the percent slope of each segment. In field calculator, that equation is generally:
((Max slope – Min slope) / Length) * 100
There are a number of “0” entries in the minimum and maximum elevation fields. This just means that there were no contour lines intersecting that particular street segment. Barring more detailed elevation data, we can safely assume the slope is about zero.
Step 3: Symbolize
I’ve chosen 0%-1%, 1%-2%, 2%-5%, 5%-15%, and 15% and up as the slope categories for this map. Everything greater than 15% is most likely an area where there’s a bridge not represented in the elevation contours. These segments can be ignored or manually adjusted.
The final data can be viewed in the map below. Or, you can download the geoJSON file.
Caveat: This method assumes a constant direction in slope within a centerline segment between the minimum and maximum elevation. This isn’t always the case. Sometimes, elevation increases and decreases within the span of a single block. As a result, slope could be underestimated in certain blocks. However, because the centerline segments are relatively short (the length of a city block), these are limited to relatively short runs in a few locations at the tops or bottoms of hills, and it shouldn’t be too problematic in a planning exercise.