Lecture 6 GRASS GIS

advertisement
GRASS GIS
Geographic Resources Analysis Support System
Kurt Menke, GISP
GRASS GIS
What is it?
A robust Open Source GIS that runs on a wide variety
of computer platforms including Windows, Linux, and
Macintosh OS X.
GRASS Factoids:
• Originally developed by the U.S. Army Construction
Engineering Research Laboratories (USA-CERL)
between 1982 and 1995
• Open Sourced in 1997
• Over 1 million lines of code, developed by an
international team of contributing programmers and
organizations.
• Over 350 geoprocessing functions
• Currently at version 6.4.1
GRASS Evolution
GRASS has evolved greatly over the last several years
 Historically only available for LINUX
 It's only with version 6 that it's been available to Windows
users
 Like ArcInfo it was originally purely commandline
software
 Part of the move to Windows has been the development
of a GUI – graphical user interface
 The full power of the package is still reserved for
commandline users

GRASS Evolution
Has a different vocabulary and workflow which takes
getting used to
 Is very modular
 Consisits of many commands
 This allows for automation of geoprocessing through
standard scripting languages (shell scripts, python,
perl, etc.)

Examples - Cartography
Examples
3D Visualization
Examples - Image Processing
Vector Analysis…GRASS isn’t just for rasters
anymore
Charts
Networks
Buffers
GRASS Databases, LOCATIONs and MAPSETs?
These are the foundation of data organization in GRASS
 These cause the most confusion to beginners
 Must be set up before you begin working
 Essentially a hierarchy of folders

GRASS Database
Simply a folder where GRASS LOCATIONS and MAPSETS
are stored
LOCATIONs
LOCATIONs:
Simply folders
Represent a geographic extent of interest
Contains data sets that should all be in the same
coordinate system!
Every LOCATION has a PERMANENT directory which stores
some basic information about the whole LOCATION
PERMANENT can be a good place to store base files
You can think of a LOCATION as a data library for a region
of interest
Almost like a geodatabase

MAPSETs
MAPSETS
Technically they are subfolders under any LOCATION.
 For example, PERMANENT is a MAPSET
 Conceptually similar to Feature Datasets
 They are workspaces in which you can organize GIS data
thematically, geographically, by project or by user.
 Every GRASS session runs under the name of a MAPSET.
 A MAPSET may be a geographical subset or as large as the
parent LOCATION.

MAPSETs cont….
MAPSETS cont…
In a networked environment with several users working within
the same LOCATION, MAPSETS can play a special role.
Can be set up so that users may only select (and thus modify) a
MAPSET that they own (i.e., have created). However, data in all
MAPSETS for a given LOCATION can be read by anyone (unless
prevented by file permissions).
The "PERMANENT" MAPSET typically contains the read-only
base maps like the elevation model, while the other LOCATIONs
are readable and writable by their owners.
The "PERMANENT" MAPSET also contains some information
about the LOCATION itself that is not found in other MAPSETS
(projection info etc.), thus it must exist in every LOCATION.
GRASS Database
LOCATION
MAPSETS
RUNNING GRASS
When first running GRASS, you have to identify a GRASS GIS
Database folder
The you have to define or load a LOCATION
It contains the data as well as projection definitions
If starting from scratch on a new project
You need to identify a folder as your GRASS Database
Then you must create a folder for your LOCATION, i.e.
My_Project
Define the spatial reference for data in that LOCATION as
well as the spatial extent.
RUNNING GRASS
GRASS DATA
GRASS requires that all data be imported into a GRASS
database. It can read and import a wide variety of
datasets via GDAL/OGR.
Data is stored as GRASS vectors and GRASS rasters which
are themselves file formats.
If starting a new project - once you've established your
Database, LOCATIONS and MAPSETS - you need to
import your data. You'll do that in Lab 5.
GRASS REGIONS
Like an environmental setting in ArcGIS
The region defines the geographic area in which
GRASS should work. It is characterized by several
parameters:
- Spatial reference (e.g. UTM, latitude-longitude, etc)
- Spatial extent, i.e. the North/South/East/West limits of
the area covered
- The number of columns and number of rows for the
data
- Resolution, i.e. the spatial extent divided by the number
of rows (N-S resolution), & columns (E-W
GRASS REGIONS
The default values of these parameters for a given
LOCATION are stored in the DEFAULT_WIND file in the
PERMANENT MAPSET of that LOCATION.
GRASS REGIONs
Why do we care about the REGIONs?
Display: if the REGION is set to a smaller extent than the
data you're working with, the display command will only show
the portion of the map that is within the REGION.
Export: the data export commands will work within the
REGION
Analysis and Resolution: will be effected by REGION settings.
REGIONS are how you control raster resolution.
Ideally, the default REGION of a LOCATION should encompass
the entire area covered by all the maps in that LOCATION.
Resources
Resources
Documentation - Manuals
http://grass.osgeo.org/wiki/GRASS_Documents
Listserv
http://lists.osgeo.org/mailman/listinfo/grass-user
Wiki
http://grass.osgeo.org/wiki/Main_Page
Lab 4 – Intro to GRASS GIS
Using wxPython GUI
there is one other GUI...tck/tk
Plus a commandline – text interface
wxPython is a GUI toolkit for the Python programming
language. This is what the GUI is written in...thus the
name
You'll learn how to start GRASS and do some basic
things
Download