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!

Thursday, April 19, 2012

Visualizing Acme Township's Annual Phragmites Surveys

Acme Township has been commissioning annual surveys for invasive phragmites stands along its Grand Traverse Bay shoreline since 2009.  The results of these surveys are used to determine the scope of each year's eradication program.  The first survey in 2009 was carried out by Derek Walton, a biologist and summer intern working for the township.  Specially trained township resident volunteers carried out the second survey in 2010.  The Watershed Center Grand Traverse Bay carried out the 2011 survey, and is expected to carry out the 2012 survey as well.

Acme Phragmites Surveys web mapEach year, the survey recorded the location of each observed phragmites stand using a portable GPS (global positioning system) unit, together with any relevant metadata for the observation.  The data were then converted to GIS shapefile format to create phragmites location maps for use by the spraying contractor.

I used the three years of available survey data to make a simple interactive web map showing the location of each year's observed phragmites stands.  You can view the map with your browser at: http://www.nuspari.com/acme/acmefrag.html.

Hence the phragmites GIS data can serve a dual purpose.  When collected each summer, the data are used immediately for planning the season's eradication campaign.  When used together with other years' data, the data can serve as part of a monitoring and evaluation process, helping to formulate and evaluate key performance indicators for the long-term effort.

This particular map was created using Google Maps API v3.  Each year's phragmites data comprises a separate KML file overlaid onto a Google Satellite View basemap, as does the township outline polygon.  The township 2010 parcel polygons are a Google Fusion Tables layer.  Aren't web maps cool?

Sunday, April 8, 2012

Open Source GIS Book Updated ... (yaay!)

There have been precious few books in print that have updated information on how to do GIS using open source software.  One reason for this is the incredibly fast rate at which popular open source GIS packages have been updated.  For example, even as mainstream users fire up QGIS 1.7.4 to do their GIS work, the hard-working members of the world-wide network of developers are working on QGIS 1.9.90 build 110 (as of today).  It's entirely possible that the next major upgrade to QGIS will be version 2.0, skipping public releases of versions 1.8 and 1.9 !!!

(What?  You're not using QGIS 1.7.4?  Go here immediately!)

Geospatial Desktop cover
Last month, a new publisher called Locate Press published a book called The Geospatial Desktop: Open Source GIS & Mapping.  This book is an update of an out-of-print 2008 book called Desktop GIS: Mapping the Planet with Open Source Tools.  It uses more modern versions of open source tools, including QGIS, to teach readers the rudiments of GIS.  It is available from Amazon.com in softcover print (US $50) and kindle (US $29) versions.

I liked the original book, so I will probably be purchasing the Kindle version.  Some of you may have had a chance to look at the original as well.  The author is Gary Sherman, the developer of the original versions of QGIS.  His very informative blog is here.

Gary Sherman also noted in a video interview that he is working on a separate book on QGIS.  If so, this will be the first published "how-to" book (I assume that's what it will be) on QGIS.  (For other QGIS resources --- and there are many, many of them --- see http://www.townshipgis.com/resources/qgis.)

If you're looking to see what you can do using other, non-QGIS open source GIS tools, or if you need to brush up on GIS itself, then you might consider getting this book.  I'll let you know when the QGIS book comes out.

18 April 2012 update:  I left a question last week at Gary Sherman's blog, asking him about the status of his QGIS book project.  He graciously responded, indicating that the project is on hold at the moment.  The incredible pace of establishment of new features, functions, and plug-ins in the development version of QGIS (v. 1.9.90) guarantees that any QGIS book written now will be obsolete upon publication.  The strategy is to wait until version 2.0 comes out before deciding on whether and when to re-start the QGIS book project.

Monday, March 5, 2012

What to Do When a GeoRef Shapefile is Missing a *.prj File --- a new tutorial

A couple of weeks ago, Michigan professional forester Lee Mueller sent me an e-mail asking if it were possible to use uDig to assign a projection to a shapefile. Lee had been given a shapefile that was missing the all-important *.prj file, which defines the map projection to which the shapefile has been projected. The supplier, however, assured him that the shapefile had been projected to Michigan GeoRef.

Lee needed a method whereby a *.prj file could be created for the problem shapefile; without the *.prj file, uDig cannot reproject it to State Plane.

We pondered this question by e-mail over a couple of days, and in the end both he and I came up with different, but equally valid and elegant, solutions. I figured out how to do it using uDig, and Lee figured out how to do it using QGIS. Lee's solution takes advantage of the fact that even though QGIS can't handle GeoRef very well, it still can recognize that two GeoRef-projected files are in the same projection, and can plot both files correctly, relative to each other.

There is a new tutorial in our Township GIS site that presents these two methods. Check out http://www.townshipgis.com/resources/problems-and-workarounds/specifyshapefileprojection.

You folks may find other methods and/or uses for these work-arounds. Be sure to share them with us when you do!

Monday, February 27, 2012

After a long silence, I'm back (sort of)... My wife and I just had a broadband connection installed at our rented apartment in Kuala Lumpur, Malaysia today! We arrived in Malaysia on February 1, and we spent the first three weeks getting over jet lag, getting re-acquainted with old friends, and looking for a place to live. We moved into our apartment on February 17, and Pat promptly got sucked into a conference at the University of Malaya (where she taught from 1983 to 1986) for five days. Only now are we getting some additional furniture and things like broadband internet hooked up!

The photo to the right shows you the brand-new Sinaran condo complex... it's so new that it's only 30% filled, with more people moving in every day. We're in unit 11-K, which I've marked on the photo. The flat belongs to Faridah Begum, a good friend of an old friend of ours. She bought it for her mother, whom she'd hoped would move in, but who, in the event, decided to stay put. Faridah had just decided to put it up for rent, and was telling her friends about it, when we showed up in Kuala Lumpur!

We are located in the Taman Tun Dr. Ismail (TTDI) section of Kuala Lumpur, and the entrance to our complex is at the approximate latitude-longitude pair of +3.140623, +101.627676 in decimal degrees. The image below shows a Google satellite imagery of our building while it was under construction.

View Sinaran Condominium in a larger map

If you're wondering where Malaysia is, just use the "zoom out" (minus) keys in the map above until you can locate the country in the world!

With hi-speed internet now back with Pat and me, I will start producing additional tutorials and such on the Township GIS website, as well as working on long-delayed web maps for TART and Acme Township.

Stay tuned!