CPSC 333: How Does the System Know Whether a Map Shows Part of a Country?

Location: [CPSC 333] [Assignments] [More about Problem to Model for Assignment #1] Display of countries on maps


Question:

The problem statement stated that, ``One can also determine which maps display (at least a part of) any given country.'' How do you do that? Or is there some additional information that is needed?

Answer:

As far as I know, there is no particularly easy way to decide (using some straightforward algorithm) whether part of any given country appears on a given map, even when you know the northernmost and southernmost latitudes and the easternmost and westernmost longitudes that the map displays - countries' shapes (and boundaries) are simply too complicated (at least, in some cases) for this to be true.

You may assume, if it helps, that whenever a new map is entered into the system, that a list of all the countries that appear on it is provided as input at the same time.


Department of Computer Science
University of Calgary

Office: (403) 220-5073
Fax: (403) 284-4707

eberly@cpsc.ucalgary.ca