= GRASS: An Open Source GIS * Maps tell stories ** Location: It's everywhere! ** Maps tell stories with a geospatial component ** How can we explore narratives of space? * Geographic Resources Analysis Support System ** GIS = Geographic Information System ** A big project! ** More than a map viewer * GRASS is hard to use. ** Command line ** Quirky syntax ** Tools come and go with versions ** Difficult installation, lots of dependencies * Don't use GRASS! ** Use Quantum GIS instead ** A Qt-based GIS browser ** Excellent active project ** http://qgis.org/ * Now Witness the Power of this Fully-Operational GIS ** Command line means scriptability, Unix Tools philosophy ** GIS means Map Algebra ** Lower barrier to entry than proprietary options ** Quirky syntax and difficult installation are getting better * Your First Puff of GRASS ** http://grass.ibiblio.org/download.html ** GRASS 5.7 is the latest and greatest. ** Use 5.7 unless you need the older tools * Mac OSX - Short version ** http://grass.baylor.edu/grass57/binary/macosx/download.html ** Download and readInstallation Instructions http://www.public.asu.edu/~cmbarton/files/grass_osx/INSTALL.rtfd.tar.gz *** Read the instructions, then install: **** Grass_Libraries_install.pkg.tar.gz **** grass570install.pkg.tar.gz * Other Platforms ** Coming to Fedora Core! ** Already in Debian Apt ** Prepackaged versions should be used with caution... ** Compiling from source isn't that bad. * Sample Data - The Global Data Set ** Global data set from http://grass.ibiblio.org/data.html ** http://grass.ibiblio.org/sampledata/global_grass5data.tar.gz ** Untar in your GRASS 'Database' directory: /usr/local/grass5 ** Sadly partially broken under 5.7. * Starting GRASS ** Run grass57 ** On Mac /Applications/Grass/grass57
** Select 'Graphic' (unless you don't want to...don't let us harsh on your mellow) * Select your Database, Location, Mapset... * Database? ** The directory where you place your data ** /usr/local/grass5 * Location? ** Sub directory within the database directory ** Stores maps with common extents, projection, geodetic datum * Mapset? ** Subdirectory within the Database/Location directory ** Mapset is just a folder of thematically related layers ** Surprise? ** Always have read only access to the 'PERMANENT' mapset ** Let's create a new Mapset... * Create a new Mapset ** oscon_is_cool, click CREATE * Create a new Mapset * GRASS is Unix Shell ** GRASS extends the UNIX tools philosophy -- small programs that each do one thing well -- into the world of Geographic Information Systems ** Example... What layers are available? : g.list rast
raster files available in mapset PERMANENT:
eco             nations         soil.f          soil.tex        veg.prod
edges           nations2        soil.slp        veg.1deg
** Output scrolls by too fast? Pipe to your favorite pager...
g.version -c | less

GRASS 5.7.0 (2004)
** Don't know what a command does? man r.colors * Let's make some maps! ** Start a monitor
d.mon start=x0
** Display a raster layer
d.rast nations
** or...
d.rast eco 
** What is what?
d.what.rast
* d.rast nations, d.what.rast * zooming in and out ** d.zoom
Buttons:
Left:   1. corner
Middle: Unzoom
Right:  Quit
** You do get used to it. * Regions? ** Many GRASS commands only apply to the current region ** g.region rast=nations ** etc... * Changing raster color maps
GRASS 5.7.0:~ > g.region rast=nations
GRASS 5.7.0:~ > r.colors nations color=rainbow
Color table for [nations] set to rainbow
GRASS 5.7.0:~ > d.redraw
* Displaying vector data ** GRASS 5.7 has a new vector model (v.convert) ** You can make your own vector layers (r.to.vect) * Creating a new location for San Francisco ** Click 'Create New Location' * What do I do now? The scary screen... ** UTM projection ** UTM zone ** ellipsoid ** geodetic datum * Importing a DRG
GRASS:~/shade > r.in.tiff in=sanfrancisco_ca.tiff out=sf_topo
* Importing a DRG * Patching together DEMs ** E Pluribus Unum
GRASS:~/shade > r.patch in=pt_bonita_dem,sf_north_dem,sf_south_dem,
	sf_south_oe_dem,hunters_pt_dem,oakland_west_dem out=sf_elevation
r.patch: percent complete:  100%
CREATING SUPPORT FILES FOR sf_elevation
GRASS:~/shade > r.colors sf_elevation color=grey
Color table for [sf_elevation] set to grey
** Or Not *** USGS Seamless Data Distribution System *** http://seamless.usgs.gov * Patching together DEMs * d.profile * Making a Contour Map
GRASS:~/contour > r.contour in=sf_elevation out=sf_contour min=0 step=50 cut=200
GRASS:~/contour > d.vect sf_contour color=blue
* Making a Contour Map * Make a Shaded Relief ** Generate the shade map
GRASS:~/shade > r.shaded.relief map=sf_elevation altitude=44 azimuth=216
** Combine hue and intensity and display
GRASS:~/shade > d.his h_map=sf_topo i_map=sf_elevation.shade
** Save to a raster layer with r.his and r.composite * Make a Shaded Relief * Output to PNG ** Dump the contents of your display
GRASS:~/shade > d.save -c > my_map.sh
GRASS:~/shade > export GRASS_WIDTH=1024
GRASS:~/shade > export GRASS_HEIGHT=768
GRASS:~/shade > d.mon start=PNG
GRASS:~/shade > sh my_map.sh
GRASS:~/shade > d.mon stop=PNG
** Map is saved to map.png (or $GRASS_PNGFILE) ** Or use r.out.png to dump a single layer * Exploring your maps ** d.measure * The Pygmy Mammoth of Santa Rosae Island? ** coastlines in the global data model ** convert to new format, display
 v.convert in=states out=coastlines2 
d.vect coastlines2
* ick! We can do better! ** So add a different layer * Wait! It is not 50 miles! ** d.measure * Transect Profiles ** d.profile! * Mapping Great Circle routes/vs Straight ** d.geodesic and d.rhumbline * Wireless Network Analysis ** Uses r.los, r.mapcalc, r.null, and more... * Global Warming ** If the polar ice caps melt and sea levels rise *** Where should I buy real estate now? *** How many people will be affected? ** GIS is more than just cartography * Conclusions ** Maps can tell your stories ** Mapping and GIS aren't hard, they just look that way ** You don't have to be an expert ** You don't have to spend a fortune on software ** You (maybe) don't have to spend a fortune on data ** Go tell all your friends * Thank You * What is UTM? * what is a datum "this is here so you can refer back to it later, but we are not going to talk about it now." link to geographer's craft site." * what is an ellipsoid "this is here so you can refer back to it later" * Options for plotting your tracklogs on a base map ** A full-scale GIS, like GRASS = Geographic Information Systems and GIS Data Sources * Geographic Information Systems ** Layers ** Scale and extents ** Data elements *** Points *** Lines *** Areas ** Data Models *** Raster data model *** Vector data model **** points **** lines **** polygons ** "Raster is faster, vector is corrector." -- Joe Berry * Common GIS data formats ** USGS Spatial Data Transfer Standard (SDTS) ** GeoTIFF ** Arc/Info formats ** ESRI shapefiles ** US Census TIGER/Line ** Geographic Markup Language * Manipulating GIS data formats ** Geospatial Data Abstraction Library (GDAL) ** OGR Simple Feature Library ** GDAL converts raster data, OGR handles vector ** Both can be found at http://www.remotesensing.org/gdal/ * Geographic Resources Analysis Support System ** Download and install GRASS ** Download sample data (use the demo data as a learning aid) ** GRASS commands are just command line programs ** GRASS has a GUI that wraps these programs * Installing GRASS ** Download appropriate binary package from http://www.geog.uni-hannover.de/grass/download.html ** On Mac, use the install script (also in Fink under unstable) ** Debian users can apt-get install grass ** Or you can build from source... * Download Sample GRASS Data ** Lots of samples at http://www.geog.uni-hannover.de/grass/data.html ** Download global_grass4data.tar.gz and spearfish_grass50data.tar.gz ** mv global/ spearfish/ /usr/local/grass5 (or your database path) * A Simple GRASS Session ** Starting GRASS Database/Location/Map Sets ** The simple viewer: d.dm & * More useful commands ** Manage monitors with d.mon start=x0 ** Show available layers with g.list ** Show info with [vrs].info ** Display layers with d.rast, d.vect and d.sites ** d.zoom click to mark first corner, middle click to zoom in/out * Creating a New GRASS Location ** Coordinate System ** Zone for UTM, other parameters for your projection ** Coordinates of the region ('extents') and grid resolution ** A text description * Working with Raster Data ** Importing and exporting raster data ** Viewing and managing raster map layers ** r.poly -c input=nations output=nations ** Plotting line of sight from a DEM ** Plotting a wireless viewshed from a DEM ** Plotting the effects of rising sea levels * Shuttle Radar Topgraphy Mission (SRTM) ** SRTM and Landsat 7 data http://srtm.usgs.gov/srtmimagegallery/ * Shuttle Radar Topgraphy Mission (SRTM) ** Digital Elevation Model (DEM) Coverage ** 1 arc second (30 m) coverage of the US ** 3 arc second (90 m) coverage of most of the world ** Lot's of nulls and other data issues ...but nearly ubiquitous! * Fetching SRTM Data ** ftp://edcsgs9.cr.usgs.gov ** Documentation ** /pub/data/srtm/What_are_these.txt ** /pub/data/srtm/Documentation ** US Data ** /pub/data/srtm/United_States_1arcsec/1arcsec ** N38W122.hgt.zip * Loading SRTM Data ** 1 arc second data has 3601 rows x 3601 columns ** Lat/Long of file is the center of the lower left arc-second ** Create a new location ** Rename *.hgt *.bil ** r.in.bin -b input=N38W123.bil output=N38W123 bytes=2 title="N38W123 1 arc second SRTM" north=39 south=38 east=-122 west=-123 r=3601 c=3601 ** r.colors map=N38W123 color=grey.eq (or any color map!) * Loading SRTM Data - A script * Working with SRTM Data - A demonstration ** Display ** Zoom in ** r.profile * Working with Vector Data ** Importing and exporting vector data ** Viewing and analyzing vector data ** Shading vector regions from other data sources ** Making contour maps from topographical data * Working with Site/Point Data ** Importing and exporting site/point data ** Viewing and managing site data ** Coordinate conversions with m.ll2u ** Convert tracklogs and waypoints to vector and raster layers * GNIS as an example of Site Data ** Getting GNIS ** Loading GNIS data into GRASS with s.in.ascii ** Displaying GNIs ** d.sites.labels * Automating tasks with GRASS ** Make HTML Image Map ** Load SRTM ** You have a command line, and so can use any scripting tool you wish!
sudo mysql nocat < get_interested.sql | /home/rich/wa/gps/dd2ll.pl > temp.ll
m.ll2u -z spheroid=wgs84  input=temp.ll | adjust.pl > file.utm
s.in.ascii input=file.utm sites=nocat_interested
** Make an HTML image map from a vector layer ** The power of Voronoi diagrams to capture your closest click = Conclusion: Maps Can Tell Your Stories