
380
|
Chapter 6, Mapping on Your Desktop
#76 Explore the Effects of Global Warming
HACK
and see, if you like. d.what.rast can be used to query individual raster cells
with your mouse.)
To address this, we’ll employ r.null to set unpopulated areas in our popula-
tion data set to “No Value.” For good measure, we will replace the original
population layer with the new one and assign it a custom color map, since
none of the built-in color maps look very good with it:
GRASS 5.7.0:~/gis/europe > r.null population setnull=0
Writing new data for [population]... 100%
GRASS 5.7.0:~/climate > r.colors population color=rules
Enter rules, "end" when done, "help" if you need it.
Data range is 0 to 626281
> 0 green
> 1000 yellow
> 10000 red
> 700000 purple
> end
Color table for [population] set to rules
GRASS 5.7.0:~/climate > d.erase
GRASS 5.7.0:~/climate > d.rast population bg=blue
100%
Once the custom color map is applied, we get a very nice looking popula-
tion map of Europe, as shown in Figure 6-51.
Estimating Population Displacement
Now, back to our second question, which was, “How many people in West-
ern Europe will be displaced from their homes by a 10-meter rise in sea
level?” We are finally at the point where we can estimate this number, by
tallying up the values of all the cells in our
population layer that match the
non-null cells in our
submerged layer. Fortunately, GRASS provides a func-
tion for summing all