We covered material from Chapter 2 of the textbook and from the second chapter of Shekhar, Chawla's Spatial Databases, a Tour. Along the way, I mentioned the Jordan Curve theorem in topology, and we looked at a nice Google Earth Demo.
Submission: you can submit the homework by hardcopy in class or by sending it to me as an email.
1. [Representation Modes, 30pt] Pick a country of your choice and represent it in the field and object models:
a) In the field model choose a 10 x 10 square grid, overlay it with a picture of the country you've chosen (stretched to the boundaries) and mark the cells that would be listed as belonging to the country.
b) For the object model choose a polygonal representation of the country using a polygon with at most 10 points.
c) For both representations calculate the following parameters:
Compare both parameters to the real values. How accurate are your approximate values? Hint: to compute the area of the polygon, first triangulate it, and then sum up the areas of the triangles. To calculate the area of a triangle you can use Heron's formula.
d) In the 10 x 10 square grid field model, suppose you have a country that has an area of 1 unit square. How badly off could the area approximation in the field model be (assuming the, fictitious, country could be horribly shaped)? Can you suggest a modification of the model that would fix this?
2) [KML and Google Earth, 25pt] Take the polygonal representation of your country from problem 1 and write it as a KML file that can be loaded into Google Earth. Add to it some additional shape (e.g. a lake in the country or a river). Google maintains a detailed list of KML examples too that'll help you do this. You'll need to install Google Earth and the browser plug-in.