An Introduction to GRASS GIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to grass gis grass gis is a free open source geographic information system a gis this cross-platform gis runs on windows mac and linux and it's free you can download the source code on github to learn more about grass to download it and find help pages go to grass.osgo.org here's the grass website you can download it linux windows mac there are also lots of tutorials and manuals and even data sets to get you started grass has more than 500 modules for working with spatial data in this course we're going to cover topics including terrain analysis geomorphometry map algebra hydrology landscape ecology lidar data analytics urban modeling and much more so to install grass just go to the grass website at grass.osgo.org choose download and pick an installer for your operating system choose the latest stable version currently that is grass 7.8.3 to get started today you need to download also a sample data set we're going to use the natural earth data set for grass gis this is in the world geodetic system of 1984 called wgs 84 for short it has global map global background maps from the natural earth collection that you can see here this is a great free source for global raster and vector data so go ahead and download the natural earth data set and you want to put it unzip it extract it and copy it to a new directory on your computer call it grass data inside of here you're going to put all of your grass data sets these are called locations location contains map sets each map set has the spatial data inside of it there's by convention a data set called permanent for your reference data then other map sets that you create to store data that you've created in the project so go ahead and move the natural earth data set to a new folder called grass data now we're ready to start grass i'm going to search grass 78 and start the grass startup window has asked you to do a few things first of all select a grass gis database directory here in step one so browse and find your grass data folder that you just created so i'm going to find my grass data directory that contains these locations and map sets once i've selected this i'll see a list of the locations i have you should see your natural earth data set which is a location show up on this list it contains a map set called permanent with your reference data we're going to start in the permanent map set and hit start grass session i already have another day map set here called demo and you're going to create one in a later step called tutorial for the data that you create today so let's select permanent and start the session every time you start graphs you need to set the database directory pick a location and a map set once you start you're going to have two windows come up a layer manager on the left and a map display here on the right you can resize your layer manager if you want layer manager has a tab for layers a tab for the command console tab for modules a data browser and a python console we're going to start in the layer manager in the layer tab and we want to add a raster map layer to visualize in the map display on the right so i'm going to hit add map layer the buttons we're interested in right now are add multiple maps add raster and add vector there's three ways i can add this raster map i can click the button here i can use the command shortcut ctrl shift r or i can use the command console i'll cover that in a second add raster map this pop-up for the command d dot rast display raster shows up i'm going to pick from the drop down here the map natural earth you see here that the name is appended with the name of the map set i'm going to hit ok and it's going to add it to the layer manager on the left and the map display on the right we can zoom in with the zoom tools here in the map display so i'll pick the magnifying glass for zoom in and drag a window for my zoom let's go ahead and add a vector data set i've got a raster data set here a regular grid of cells with color values in this case and add a vector data set vector data sets can be points lines areas in this case i'm going to add an area countries i'm gonna this is the command d dot fact i'm gonna hit apply now that i've picked countries and we'll see areas for each country show up they're filled solid right now so it's a little harder to visualize the land underneath them so we can change the display here in the d.vect panel i'm going to go to this third tab colors check transparent for the area fill color and hit apply now i can only see the outlines of the countries and i can see the natural earth layer beneath them at the bottom of the d.vect dialog you see the text dot vect map equals countries fill color equals none this is a command i can paste this into the command console and run the command i can hit the copy to copy that command if i want to hide the current countries layer i can uncheck it right here i'm going to go to the command console at the bottom left second tab and paste that command into my command console it's going to add it again to the layer manager you can see another country's layer here so that is another way to add and symbolize a map and use the gui the graphic user interface or i can use the command console let's add another vector layer we're going to add rivers so i'm going to go to add vector map ddot backed i'm going to pick the map rivers and i'm going to go to and hit apply first of all and we'll see the rivers up here there are rivers now it's hard to visualize them with the country borders being the same color so i'm going to make the rivers blue i'm going to go to the third tab of ddo effect colors and i'm going to change the feature color from black to blue i'm going to hit apply you can see the command at the bottom here is a little better now we can do better than this many vector data sets have a table of attributes that come with them so i'm going to right click on rivers show attribute data this is going to open a table of data for the rivers here i have grasses attribute table manager and i can see i have multiple columns of data for each river including the names of the rivers here what i'm interested in right now is scale rank this is the size of the river the hierarchy of the river essentially its stream order so i can color the streams by their scale rank they're in order of size i'm going to right click on rivers and go to set color table i could also run in the command console the command v dot colors i'm going to pick the vector map as rivers source values will be attributes from that attribute table i need to go to the second tab define to define this color table i'm going to use the column name of column containing numeric data i'm going to set this to scale rank as we saw in the attribute table so you need a name of the color table that's the color here and i'm going to set this i can type in a name if i know it i could type in water or i could pick it from the list here water now i run the command and i can see my rivers colored by size in the next steps we're going to create our own data we're going to extract a country from countries and then clip the rivers to that country so since we're creating new data let's create a new map set to store the new data in you can do this when you start grass or now that you've started grass you can go to settings grass working environment create new map set i'm going to create a new map set called tutorial i'm in the new map set now and i'm ready to create some data so i'm going to select the country of brazil and extract it there's a couple ways i can do this one way is by the attribute table another way is simply by selecting the feature i'm going to show you that first and then we will select it by an attribute so make sure you have countries highlighted here in the display i can pick here in the map display select vector feature this yellow highlight box now it's going to pull up a dialog box here select feature i'm going to click on brazil you see it highlighted on the map and i can hit create new map with this you see i have extracted brazil right now it is saved as countries selection and a random number i could now rename this map but i'm going to hide it and show you another way to extract this i can right click here on countries and go to show attribute data load the attribute table again for this data set we can see that there's a column called admin and has the name of the country so i can use the admin column to select the name of the country brazil i'm going to use the command v dot extract to do this so i can find this either under vector develop vector map oh um or i can go to the command console and type in v dot extract the name of the input vector map will be countries you can see i only have in the tutorials maps i only have this country selection and i can you see i have access you always have access to the reference data in permanent i'm going to select countries and for the output map i'm going to name this brazil for the selection in the second tab i'm interested in this where query and for this i'm going to put the phrase admin equals in single quote marks brazil end it with a double quote and i'll run this and there we go we've extracted it so now we have a map for brazil if we want to make this hollow we can double click it go to open up d.vac go to colors fill area transparent if we want to make the line weight heavier we can go to the fourth tab lines and increase the line weight we can zoom to this layer by right-clicking going zoom to selected maps now we zoom to brazil if we want to mask operations to brazil we can use the command r.mask to create a raster mask i'm going to go to the command console and type in r dot mask i'm going to set the mask to the vector map brazil this mask is going to mask all raster operations including the display of the background map to remove a mask you can use the remove tab and check that to remove the mask all right so let's add some rivers for brazil we're going to use the command clip v.clip to clip the rivers to the boundary of brazil so we have rivers here we want to clip them to brazil so under overlay vector overlay vector maps we have clip vector map here i'm going to use that command the name of the clipping map the name of the map to be clipped is going to be brazil the name of the clipping map will be brazil itself and the name of the output map will be sorry the name of the map to be clipped is rivers and pick that here under permanent and the name of the output map is brazilian rivers [Music] so input is rivers clipping mask is brazil and the output is brazilian rivers run the command we hide our rivers now you can see that we've nicely clipped the rivers to brazil let's go ahead and color these according to stream order again so we can right click on brazilian rivers set color table we're going to set the source value to attributes we're going to go to define we're going to set the second tab to find we're going to set the column to scale rank we can go ahead and hit run set the name of the color table to water and hit run if it doesn't show up immediately just toggle the map layer or you can use the refresh map display button right here to further symbolize these rivers let's increase the size of the river based on its size the line weight of the river based on its size so i'm going to double click on brazilian rivers to open up d.vect in the fourth tab lines i'm going to set instead of setting a line weight i'm going to set a line weight from a numeric column in the attribute table rather than picking scale rank because that's in the reverse order i'm going to pick stroke weight this is a column the attribute table set up for exactly this purpose and i may optionally set a scale factor first of all i'll hit apply you can see the bigger rivers got bigger if i want to see more difference i'm going to make this scale factor of 2 or 3. you can see the size of this river growing relative to the others all right that concludes this introduction to grass gis thank you
Info
Channel: Brendan Harmon
Views: 5,496
Rating: 4.8769231 out of 5
Keywords:
Id: QldQuhxS4X8
Channel Id: undefined
Length: 22min 13sec (1333 seconds)
Published: Thu Jul 16 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.