Sixth Homework
Posted 9 Nov 2005 by herman

This homework is due Monday 14 November.

The task of this homework is to gather and prepare data that can be used for display on a map, such as the Google or Yahoo mapping services.


If you look at the Google Maps API Documentation (there is similar documentation for the Yahoo Maps API), you'll find that locations of maps and items shown on maps are specified using Latitute/Longitude coordinates. The plan is for a future homework to use the API to show some customized content on a map, and for that you need:

  1. A "database" of interesting items, their locations, and probably some extra information associated with the items.
  2. You'll need to convert the locations to the form needed by the Map API, namely as latitude and longitude.
After you have such a database, you can design an interactive application to map the items, respond to queries about the items, and so on. For instance, notice how Google responds to searching for "hotels iowa city iowa" if you enter that into Different queries will show different things on the map (this is enabled by having a database of hotels, restaurants, etc).

Choosing Items

There are many possible things you could have in a database. You could have locations of ATM machines, locations of stores and the times they are open (searching for stores that are open would only show those currently open, so the result would be dynamic). You could Wardrive and get a list of WiFi access points. Perhaps there is a calendar of events at different locations so that a query about particular date or date range could show the events on the map. Maybe there are other databases with environmental data available through other departments on campus that are location-specific for our area. If you want to do something quite ambitious that would be a team effort, you'll need to discuss that with me first. Try to think of something that isn't available already on the web and that has enough content (at least 20-50 items) to be interesting.

Obtaining the Coordinates

If you have a good GPS unit, you might be able to directly get latitude and longitude data; however most of the applications use street addresses and then convert to latitude/longitude (you can read about Geocoding and there are web sites that do this online, such as this one, as well as others listed in the Wikipedia article).

I notice that a common geocoding technique queries one of the servers dynamically, as done for instance in this example. If you view the page source, you see that a "geocode.js" is likely used to convert an address to a lat/long, which might be a javascript program like this one. However if you have a database of items, it's probably better to look up the lat/long data once and store into the database --- this is faster, more efficient, and you can correct mistakes introduced by the geocode servers, which only interpolate to estimate the lat/long.

What's Due

Make a text file of your items, the lat/long locations, and other associated data that will eventually be used for your online application. Note that you can still add to this data after turning in this homework; the point of the current homework is to show that you have done adequate preparation for the next homework.

Submit your text file using the submit command (as you did for earlier assignments), to the geoData directory of c118.

Grades Posted, posted 16 Nov 2005 by dcurtis
Grades for the Sixth Homework have been posted. Please check your grades and let me know if there are any discrepancies.

Home PageHelp PageView ArticlesView Public DocumentsLogin, do stuff (record diaries)List Group MembersList of Projects