Skip to Content
Mapping Hacks
book

Mapping Hacks

by Schuyler Erle, Rich Gibson, Jo Walsh
June 2005
Intermediate to advanced
568 pages
24h 7m
English
O'Reilly Media, Inc.
Content preview from Mapping Hacks
332
|
Chapter 6, Mapping on Your Desktop
#69 Find Your Way Around GRASS
HACK
Okay, that’s more like it. Now let’s zoom back in on Western Europe and
redraw our ecology map with the national borders on top:
GRASS:~/gis > d.erase
GRASS:~/gis > g.region Western_Europe
GRASS:~/gis > d.rast eco
GRASS:~/gis > d.vect borders type=boundary color=black
By now, you’ve probably noticed that there’s a scheme
behind the naming of GRASS commands. Commands that
start with
g. are general-purpose, d. commands are display
related,
r. commands work on rasters, v. commands work
on vectors, and so on.
Figure 6-28 shows our revised borders layer drawn in black on top of the eco
layer. You’ll note that the political boundaries and the ecology map don’t
quite match up around the coastlines. Unfortunately, this is simply a side
effect of using very low-resolution sample data—not much we can do about
it here. (Also, you’ll probably notice that these boundaries date to before
1990, but that’s beside the point).
Now that we’ve made this informative and attractive map, what if we want
to get back to it later? Fortunately, GRASS provides the d.save command,
which generates a shell script of the commands used to generate the current
view in our monitor. Run
d.save -c > europe.sh and examine the contents
of europe.sh:
# Shell Script created by d.save Sun Jun 27 18:16:20 2004
d.erase
g.region n=60:04:48N s=36:43:12N e=18:48E w=13:07:12W nsres=0:04:48 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

The Three Traps That Stymie Reinvention

The Three Traps That Stymie Reinvention

Ryan Raffaelli
Computing for Numerical Methods Using Visual C++

Computing for Numerical Methods Using Visual C++

Shaharuddin Salleh, Albert Y. Zomaya, Sakhinah A. Bakar

Publisher Resources

ISBN: 0596007035Purchase LinkErrata PageOther