
A location is a subdirectory of GISDBASE which defines the projection and default geographic region for a project. GISDBASE will typically contains multiple locations, including spearfish (sample data for two quarter quads in western South Dakota), delmarva, etc. Your work session in a location isn't necessarily confined to the location's default region, although UTM projections aren't valid outside of a specific UTM zone. You should have some understanding of geoids, datums and projections before creating new locations.
Each location directory may contain multiple mapset directories. When you open a GRASS session, you open an exisiting mapset (or create a new mapset). Any new maps you create will be written to that mapset. Your current mapset is referenced by the global environment variable $LOCATION (yes, this variable actually refers to your mapset within the location). Each user in a location uses his or her own mapset. By default, mapsets are readable to all other users of the location. You can get read access to other users' mapsets with the g.mapsets command. You can eliminate other users' read access to your own mapset with the g.access command.
A special mapset named PERMANENT contains the projection info and default region settings for the location.
GRASS file structures are summarized below, and will be described in more detail in the next session.
Raster maps consist of equivalently-named files in parallel subdirectories within your mapset. If your raster map is called mymap, there will be files named mymap in:
Vector maps consist of equivalently-named files in other parallel directories within your mapset. If your vector map is called myvecmap, there will be files named myvecmap in:
Point (site) maps are single files located in the site_lists subdirectory within your mapset.
Your mapset also contains a WIND file which and stores the bounding coordinates and cell resolution of your current region ("window"). Each time you run g.region and modify a region parameter, this file is updated.
Since GRASS raster and vector maps actually consist of multiple files on your disk, located in different subdirectories of your mapset, you should use the GRASS modules g.copy, g.remove, etc. to handle files, not UNIX cp or mv.
You can convert raster or vector files to ASCII format with r/v.in/out.ascii, which generate single files.
Alternately, to copy GRASS files to another machine in native format, you can use the UNIX tar (tape archive) utility (see man page for tar).
A GRASS session basically sets up a bunch of global environment variables, including: $GISBASE (the path to the module executables) and $GISDBASE (the path to the GRASS data directory). You can display all these global environment variables with the export command. By Unix convention, they are generally in uppercase letters, and referenced with a $ prefix, e.g.
GRASS> echo $GISDBASE
/home/grass.data
Mapset <john> in Location <spearfish>
GRASS>
The GRASS prompt simply signals that you have the necessary global environment variables set. It is basically transparent to your UNIX shell. When you open a GRASS session, your current directory is unchanged; it is not changed to GISDBASE/location/mapset where your GIS data are stored unless you cd there.
g.region defines the operating area and resolution parameters. For example, region settings for the Spearfish (SD) location at a 50-meter cell resolution are:
proj: 1 zone: 13 north: 4928000 south: 4914000 east: 609000 west: 590000 cols: 380 rows: 280 e-w resol: 50 n-s resol: 50Spearfish is in UTM zone 13. Note that you can have non-square cells by specifying different e-w and n-s resolutions.