This preview shows page 1. Sign up to view the full content.
Unformatted text preview: draw a "snake" that
runs through all points in the space (the 2D array of tile IDs), and never overlaps with
itself.
Linear regions of the Hilbert curve are used as the set of tile IDs comprising a given tile
set. There is a mathematical theorem that shows that the Hilbert curve is the optimal
partitioning of tile IDs into tile sets, to use minimum bandwidth for grouping tiles
together that are likely to share features. Which is to say, given that we cannot predict
whether there are more northsouth or eastwest roads that are shared between
adjacent tiles, we should do "something reasonable" to make sure that tiles that are
likely to share features wind up in the same tile set. The Hilbert curve is an algorithm for
determining the best such partitioning
The Wikipedia article http://en.wikipedia.org/wiki/Hilbert_curve does a good job of
explaining the Hilbert curve. See also http://en.wikipedia.org/wiki/Spacefilling_curve
Your implementation should number the tiles in the range along the curve, then split the
range into tile sets by dividing the curve into a number of segments equal to the number
of the rendering tasks. The starter code includes a JUnit test case for the Hilbert divider
you will write so that you can test it to see if your implementation is working correctly Geocode Index Generation
As mentioned in the introduction, the next assignment will be a crude version of the
online Google Maps interface. The goal of assignment four is to display to a user a
pannable map on a web page. This web page will contain a text input where a user can
type an address; the map should then jump to this address. To do this, we will need to
generate a geocode index. The geocode index is a data structure that can quickly
return the latitude and longitude for any address. From this latitude and longitude, your
TileSetDivider can then look up the particular tile IDs (and thus the filenames of tiles)
which correspond to the tiles the user should be shown.
We want to support primarily queries in the format of "Stre...
View Full
Document
 Fall '08
 Staff

Click to edit the document details