Spatio-temporal analysis with GRASS GIS
IHE Delft Institute for Water Education
The Netherlands
Dr. Sajid Pareeth
Outline
Create a GRASS database
GRASS database is a folder where you exclusively store all your data in native grass format. Normally we make a folder called "grassdata" inside C: or D: or any other drive where there is space.
In my computer it is in D:/grassdata. So create a new folder called "grassdata" in your favourite drive, where there is enough space to store and process data.
Remember you can have multiple "grassdata" folders inside different drives. Further logical explanation on the GRASSDB and its architecture is explained in the previous section on grass gis introduction.
Launch GRASS GIS
In the MobaXterm Ubuntu session type in grass78 and press enter. Either you can open GRASS in command line only or both in command line and GUI.
Create locations and mapsets
Assuming you have already created your GRASS GIS database here:
D:/grassdata, let us create a location in UTM38N (epsg:32638). The easiest way to assign Coordinate Reference System (CRS) to a study area is to find the corresponding EPSG code of that CRS. To get the right EPSG code refer to this
link.
Now, open MobaXterm Ubuntu session and follow the commands in below snippet to create location and mapset using command line.
Using Command line
# To get the help of command
grass78 --h
# Create (-c) just the location called "utm38n" in epsg:32638 and exit (-e)
# Remember name of the location can be anything, give a logical name
grass78 epsg:32638 /mnt/d/grassdata/utm38n -c -e
# Create (-c) mapset called "ulb_wapor" inside the location "utm38n" and open GRASS GIS in "utm38n/ulb_wapor" mapset
grass78 /mnt/d/grassdata/utm38n/ulb_wapor -c
# "-c" flag in above command is required only one time to create the mapset ulb_wapor
# Afterwards use below command (without -c flag) to just start the existing mapset.
# grass78 /mnt/d/grassdata/utm38n/ulb_wapor
Tips: use 'Tab' key to autocomplete the path names and command names.
Tips: Use 'Ctrl-L' to clear the text in MobaXterm command line window
Create location and mapset in command line
Using GUI
To open Grass GIS in both GUI and command line, type
grass 78 --gui in MobaXterm Ubuntu session and press enter. See below short video to create a new location and mapset in GUI.
Create location and mapset in GUI
Exiting GRASS GIS
There are multiple ways to exit from GRASS GIS. Either you close the GUI or use Ctrl-D.
Using Command line
In the MobaXtern Ubuntu session, inside the grass session use
Ctrl-D to exit from the session.
Using GUI
Close GRASS GIS from GUI
While closing the Grass GIS from GUI, 'Close GUI' only close the GUI while retain the active Grass session in the command line. The option 'Quit GRASS GIS' will close both GUI and command line sessions.
Tip: If you close the GUI keeping the active command line session, you can always reopen the gui using the command g.gui in command line
Last changed: 2021-07-07
GRASS GIS manual main index |
Topics index |
Keywords Index |
Full index |
Raster index |
Vector index |
Temporal index |
Licensed under a Creative Commons Attribution-ShareAlike 4.0 International License - Thanks to Vaclav Petras for the style.