Skip to content

Creating a GRASS workspace

Collin edited this page Mar 6, 2016 · 4 revisions

Create a GRASS workspace

GRASS is a little unusual for GIS systems in that it requires you define a workspace before you can interact with datasets. The workspace requires a projection, a raster resolution, and a spatial extent. I recommend gathering this data before you start.

Prep.

Choose your bare-earth DEM. For this example, I will use the 2014 NCALM LiDAR flight of the Angelo Coast Range Reserve, Mendocino, CA. This dataset can be downloaded from Open Topography.org. You will have to sign up to request the LAS point cloud.

    Source Raster:  angelo1m2014dem.tif   
    Format:  geoTIFF  
    Resolution: 1x1 meter  
    Projection: UTM, zone 10, datum NAD83  ([EPSG:26910](http://spatialreference.org/ref/epsg/nad83-utm-zone-10n/)).    
    Bounding Box  
    North: 4403020.5  
    South: 4390979.5  
    West: 441979.5  
    East: 453020.5  
Create your GRASS Workspace and Location.

The workspace is simply a directory. So at the command line,

     mkdir /data/grass_workspace   
     cd /data/grass_workspace  
     grass64 -text  
    
***

You will be greeted with the lovely GRASS interface. Follow the instructions, make sure the DATABASE is your current location and then make a name for you new LOCATION. MAPSET must be PERMANENT.

     LOCATION:   angelo2014_______________  (enter list for a list of locations)  
     MAPSET:     PERMANENT________________  (or mapsets within a location)  
     DATABASE: /data/grass_workspace____________________________________________  
        
    >LOCATION <angelo2014> - doesn't exist  
    >Would you like to create location <angelo2014> ? (y/n) [y]  
        
***
Define the projection
    >Please specify the coordinate system for location <angelo2014>  
    A   x,y  
    B   Latitude-Longitude  
    C   UTM  
    D   Other Projection  
    RETURN to cancel  
    >C  
    >Please enter a one line description for location <angelo2014>  
    >Angelo2014 represents the Angelo Coast Range Reserve, Mendocino, CA.  It covers the reserve boundary, and the Fox & Elder Creek watersheds.   
    Do you wish to specify a geodetic datum for this location?(y/n) [y] y  
    Please specify datum name  
    Enter 'list' for the list of available datums or 'custom' if you wish to enter custom parameters  
    Hit RETURN to cancel request  
    >nad83  
        
    Now select Datum Transformation Parameters  
    Please think carefully about the area covered by your data  
    and the accuracy you require before making your selection.     
    Enter 'list' to see the list of available Parameter sets  
    Enter the corresponding number, or <RETURN> to cancel request  
    >1   
    Enter Zone: 10  
    Southern Hemisphere(y/n) [n] n  
    
***
Define the Bounding Box
                     DEFINE THE DEFAULT REGION
                   ====== DEFAULT REGION =======
                   | NORTH EDGE:4403020.5_     |
                   |                           |
        WEST EDGE  |                           |EAST EDGE
        441979.5__ |                           |453020.5__
                   | SOUTH EDGE:4390979.5_     |
                   =============================
       PROJECTION: 1 (UTM)                        ZONE: 10
                         GRID RESOLUTION
                             East-West:     1_________
                           North-South:     1_________
       AFTER COMPLETING ALL ANSWERS, HIT <ESC><ENTER> TO CONTINUE
                        (OR <Ctrl-C> TO CANCEL)
         
    projection: 1 (UTM)
    zone: 10
      north:       4403020.5
      south:       4390979.5
      west:        441979.5
      east:        453020.5
      e-w res:     1
      n-s res:     1
    total rows: 12041
    total cols: 11041
    total cells: 132,944,681
    Do you accept this region? (y/n) [y] >y