Geography Reference
In-Depth Information
If you click the Add GRASS vector layer tool you will see that our GRASS
mapset now contains both the world_borders layer and the cities layer.
We can use the same method to import rasters into GRASS, using the
Import GDAL Raster Layer tool in the toolbox. If we encounter difficul-
ties with the raster as we did the NASA world mosaic, some prep work
using gdalinfo and gdal_translate may be required.
Importing External Data
The last means of getting vector data into GRASS involves importing
external data. Actually, it's not really an import but more of a link.
When working with external data, you have to be aware that a number
of GRASS tools and operations won't work. But it is a handy way to
display data without converting to a GRASS layer. For information on
which OGR formats can be linked, see the manual for v.external .
The syntax for v.external is almost exactly like the simplest form of
v.in.ogr :
v.external dsn=string [output=name] [layer=string] [--overwrite]
To link the world_borders shapefile, we would use the following:
v.external dsn=./desktop_gis_data output=world_borders_external \
layer=world_borders.shp
We can now use the layer in GRASS—just remember it is read-only
and may yield incorrect results when used in some GRASS operations.
This is because an external layer is fundamentally different from a true
GRASS layer. For example, an external layer doesn't have true topology
but a pseudo-topology is created to allow it to act like a complete GRASS
layer. Again, if you want to use a layer for operations other than display,
it's best to import it into GRASS using one of the methods we have
discussed in this chapter.
C.3
Working with Data
Now that we know how to get data into GRASS, let's work with it a
bit and learn how to use the display manager. You may have gathered
by now that GRASS has a couple of start-up modes—GUI and text.
GRASS remembers which mode you used last and will attempt to start
up using the same the next time around. Not only are there two modes,
there are also two GUIs to choose from. By default if you start GRASS
using grass62 -gui , you get the “official” display manager gis.m . The other,
older display manage is d.m . If you prefer it, start GRASS in text mode
 
 
Search WWH ::




Custom Search