Parcel viewing applications are notorious for being a bit ugly and a major resource sink for municipalities on the development and maintenance side. Although Mapbox may not have intended for their tools to be used to create this kind of application, the strengths that make it a good choice for VR and AR app development also make it a very interesting play when we apply it to more traditional GIS applications like a parcel viewer.
Anyone that’s tried working with a large, high precision, vector dataset like a parcels layer know that it can be pretty difficult to work with due to amount of data they contain. For example rendering just the parcel shapefile provided by Kitsap County inside of QGIS takes a little bit over 2 seconds.
Exporting that same parcel layer out to a GeoJSON file for use inside of a Leaflet-based webmap results in map that’s better described as a slideshow and that can take upwards of 30 seconds to move between zoom levels and positions.
Simply put parcel layers are too often much data for traditional desktop and web maps to render in real time.
Vector Tiles and OpenGL to the Rescue
The solution of course is to break the data down into bite sized chunks that can be dribbled out quickly, rather than trying to serve up a monolithic vector layer. I’m going to assume that most people are familiar with how most basemaps are rendered on the web. As a refresher, they are rendered as raster tiles; or put more simply a series of square images that are loaded in parallel to improve rendering speed.
A couple of years ago the big players got together and came up with a similar concept aimed at vector data dubbed vector tiles. The process of converting a monolithic vector layer into vector tiles breaks the dataset up into bite sized pieces that browsers can handle. When you upload a shapefile to Mapbox’s servers your vector data is immediately converted into vector tiles.
The combination of vector tiles and the Mapbox GL rendering library allows for us to render every parcel in Kitsap County in a 3D webmap at a buttery smooth 60 frames per second. This is not something that is possible or would require aggressive customization to recreate inside desktop GIS software like QGIS or inside of a 2D web map like leaflet provides using Shapefile or GeoJSON formatted data.
Understanding A Parcel Viewer
Before you can build a decent clone of an existing parcel viewer you need to understand the services that it’s providing.
For this project I’m going to clone Kitsap County’s parcel viewer seen in the screenshot above. Let’s start by identifying the layers that they’re serving up with this map.
- Section Townership Range (Red Grid Squares)
- City Boundaries (Red Outlines)
- First Peoples Reservations (Grey Polygons with a Purple Outline)
- Military Installations (Grey Polygons with a Grey Outline)
- Labels for Cities and Military Installations
- Labels for Section Township Ranges
- Parcel Outlines (Transparent with Grey Outline)
- Tax Parcel Labels (Light and Dark Themes)
- Building Footprints (Grey Polygons)
- A Custom basemap
This is already quite a bit of data. But there are two more pieces to this story.
First up when you click on a parcels Kitsap’s parcel viewer opens a pretty complicated popup window that displays all the open tax accounts that are related to the selected parcel. It also has a button that bumps you into a different popup window that displays the same data but with spreadsheet styling. In addition there are also action buttons that can take bump you into a new window with the specific records.
I’m trying to focus on the mapping aspects of this parcel viewer. So going forward I’m going to ignore these, interesting, but more database and records related features of the Kitsap Parcel viewer.
Moving back to the map the second feature worth talking about are the ‘map themes’ that can be selected in the floating legend of the Kitsap parcel viewer. I actually think these themes are super neat in that they change the data displayed based on the subject you’re inserted in. It’s a cool concept, especially given that a map displaying tax parcels is probably not the right map for looking at areas effected by the shoreline management act. These themes allow you to serve up many different kinds of maps in the same portal.
But I’m not going to replicate this many-maps-in-one theming feature either. Rather my goal is to clone the ‘General Features’ theme which seems to mostly focus on the parcels.
So what layer am I going to include?
- Parcel Outlines
- Parcel ID (PID) Labels
- Section Township Range (Better Known as PLSS Grids)
- Labels for Section Township Grids
- First Peoples Reservations
- Address Points
- Labels for Address Points
- Building Footprints
- OpenStreetMaps basemap
And how is my map going to be an improvement over the existing parcel viewer?
- Extruded building footprints
- 3D Viewing and Panning
- Fluid scrolling and pinch to zoom
- Scales from Desktop to Mobile
- Mapbox ‘Light’ themed basemap
- Modern Grey-scale visual theme
And here is the product of my efforts:
To build this project out into a real Parcel Viewer there are two things you’d have to do: improve the geocoder/search service and enable the popups to show more than just the attribute information from their layer. As it stand now the search service is just the Vanilla Mapbox geocoder which includes addresses from all over the world rather than limiting them to just Kitsap County. Additionally this geocoder lacks the ability to search by Parcel Number or Tax Account ID, hence a custom geocoder would make this Parcel Viewer much more useful.
Of course those two features would require a significantly more detailed data export from Kitsap County or access to their database. 😀 For another day then.