
386
|
Chapter 6, Mapping on Your Desktop
#77 Become a GRASS Ninja
HACK
So far, so good. However, a single glance at Figure 6-52 immediately reveals
that it depicts rather a few more boundaries than one is accustomed to see-
ing on a map of Europe. The international boundaries are there, to be sure,
but so is every other first-level administrative boundary in the world, mak-
ing individual countries a bit hard to pick out. This is well and good, but it
also means we’re not done yet.
As it turns out, ESRI distributes a cntry98.shp data set that
avoids some of these data-creation issues. However, we’ve
never been able to find a copy of this data set available for
download on the Web.
Objective #2: Reunite the World’s Nations
The would-be GRASS ninja is not daunted at this juncture. Surely, the ninja
trainee must concur, GRASS must have some facility for merging polygons.
We simply tell GRASS to merge all of the adjacent shapes belonging to the
same country in a new vector layer, and we are done.
If a ninja-in-training may be permitted one flaw, perhaps that flaw is over-
confidence. After a bit of poking in the GRASS documentation, we were
forced to conclude that GRASS had no such tool, per se. GRASS has a tool,
v.extract—which extracts vector features into a new layer, possibly based on
an SQL
WHERE query against the attribute table—and even has an option to
“dissolve” the borders of adjacent polygons in ...