Tuesday, December 11, 2012

Using A GIS Layer with Google Fusion Tables:
The 2012 Acme Parcel Map

In creating web map applications, I usually try to use Open Source tools such as QGIS for creating the GIS layers and Open Layers to render the map on the browser screen.  As often as not, though, I use not-quite-public-domain layers like Google satellite or street map images as the basemap layer.

Recently, Google released to the public the (limited) use of its cloud-based database service called Google Fusion Tables.  It lets you store tabular data (with or without geometry), query the data, and plot the data on a Google Maps layer if your table has appropriate coordinate geometry information.  In fact, it's probably one of the easiest ways of creating a webmap if you have some GIS layers you want to display on-line!

(Fusion tables can import KML files using one of its built-in functions, or you can have it import a shapefile using the website http://www.shpescape.com/.  Your fusion table is stored in your cloud-based Google Drive.)

In creating the most recent iteration of the Acme Township web-based parcel data map, I thought I'd combine an Acme Township parcel layer (a KML file zipped to a KMZ file) on Google Maps with the parcel ownership and tax status data (from the Assessor's database) that is stored as a table in Google Fusion Tables.  The map is at http://www.nuspari.com/acme/parcels2012.html

It works like this when you call up the URL:
  • A KML layer containing the Acme Township parcel boundaries is overlaid on a Google hybrid satellite image.  The advantage of using the hybrid image is that street names are automatically rendered on the map as you pan and zoom around the township.
  • In addition to the coordinates of the parcels, the KMZ layer only contains one attribute for each parcel: the parcel ID number (PIN).  This minimizes the size of the KMZ file.
  • After you pan and zoom to find the parcel of interest, you click somewhere in the parcel to get the data you want.  When you click on a parcel,
    1. The app extracts the PIN from the parcel that was clicked, and sends the PIN to Google Fusion Tables;
    2. Google Fusion Tables takes the PIN and finds the parcel record that contains the PIN.
    3. Fusion Tables sends back the parcel record as a JSON-formatted text file, which the app receives, parses and then displays on the side panel.
    Parsing the parcel record that's sent back from Google Fusion Tables required some thought, but thanks to examples from Google, I was able to figure it out after some trial-and-error.
My thanks to the fantastic Acme Township staff for providing the data that made this possible!

No comments:

Post a Comment