QGIS 4 Arch - Working with Raster Data

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this lesson we learn about working with raster data raster data refers to continuous data and common types include images representing Maps or aerials as well as elevation data we begin with a brief discussion of the types of raster data downloading elevation data from the USGS national map website and viewer we then move on to changing the look or symbology of raster data next we work with merging multiple rosters into a single file and clipping a part of that raster to a smaller extent we then end the lesson with creating contour lines from a raster as always timestamps are available in the description so you can jump from section to section ok let's get started there are numerous file formats for raster data QGIS easily works with most formats treats them as native file formats and we'll be actually looking at a pretty common file format in this lesson now if you find a dataset somewhere else that doesn't seem to work with QGIS or you're having difficulty working with it leave me a comment and I'll get back to you maybe I'll even create another tutorial so let's go ahead and get some raster elevation data a great place to do this in the US is the National map from the USGS now if you need data for other parts of the world I've included a link to download tiles from the shuttle radar topography mission also known as SRTM data the file format for this may look strange it's a dot HGT file but QGIS easily opens this format now we'll be working with a different format in the files that we download from the National map here but I just wanted to make a note about that for this tutorial we're going to navigate to the area around Asheville North Carolina okay here we are so we're going to go ahead and use the Box point selection method and drag out a selection square here but before we do that we need to look at the type of data that we can download so as you can see on the left hand side there are numerous data to download here select the elevation products or 3dep tab clicking that check box will expand this and you'll be able to see other types of layers here still more choices so use the show availability selections to see what data is available in the area we're going to go ahead and select the 1/9 arcsecond de m data so go ahead and click on show availability and we'll see now that there's actually quite a bit here that we can use so let's make sure that we select that DES elect anything else and and this will work so go ahead and click and drag a rectangle here and once you've done that you can now click the find products button and this will show you data that you can download here click the footprint and thumbnail options to see which tiles overlap the selection area so you can see here I think we'll go with these two datasets the thumbnail doesn't bring anything up click the footprint and thumbnail options to go ahead and see what data lines up we're going to go ahead and use these first two for this tutorial so when you found one that works click the download link you can go ahead and just open this it's a zip archive here we have the zip archive now downloaded and open as you can see we have a whole host of different kinds of data in here we have JPEG files we have shape files the shape file in here is just going to be a rectangle representing the area of the Earth's surface that this raster data corresponds to go ahead and I just select all of these and copy them to my local hard drive let's look at the downloaded data in qg s go ahead and add one of these shape files I'm going to adjust the symbology here let's go ahead and add the raster data itself this is the IMG that is a common raster format it stands for image double click it to add and now we can see this raster data so the data is easily recognizable as elevation data you are now ready to work with symbolizing your raster data we symbolize raster data using the layer styling tab just like we did with vector data typically when you add raster data it will have a grayscale color scheme assigned to it change this by clicking the single band gray drop down menu in the layer styling tab select single band pseudo color we have numerous color ramps to choose from click the color ramp drop-down arrow and have a look at a couple different color ramps don't forget there's an extended selection with the all colour ramps sub menu here I'm gonna go ahead and check the spectral one I like this and it looks familiar to me one way to rapidly improve the look of elev data is by combining symbolization select the raster data right click and choose duplicate layer I'm gonna go ahead and remove this extra data set here so we're just working with these two let's go ahead and zoom in select the item you just duplicator to the duplicated layer let's turn that on let's go to the layer styling click the drop down menu and choose hillshade now of course we can't see that because it's obscured by the layer above it so click that layer and let's go to the transparency setting and change that to something like 80% let's go down to the duplicated layer so go ahead and set this at something like 20% we just want it barely showing through but if we zoom in and turn that layer on and off we can see that this has added a lot of definition to a raster data set so you've now created new symbology for your freely available raster elevation data this looks pretty good now what if our study area is larger than the single tile we just downloaded let's return to the national map and down a neighboring tile so go ahead and click the download button here and once that's completed copy all of the files out of that zip archive into a working folder on your hard drive so here we can see the contents of the newly downloaded folder we can see our new image file so if we double click we'll add that and we can zoom out a bit and we can see that this lines up perfectly however the symbology is different so let's go ahead and change that to match the accompanying or neighboring tile it'll automatically usually choose the last color ramp you've chosen these aren't the same color along that line because they have different ranges in other words they don't have the exact same highest and lowest values we could try to fine tune the color ramp for both of these tiles but we'll never get it perfect this will become even harder if we had additional tiles so the solution here is to merge or mosaic these raster tiles we're going to create a new file that copies the data from both of these individual tiles into that new file so we do this by searching for merge in the processing toolbox and you'll choose merge from underneath raster miscellaneous and then you go ahead and select both of these raster's and if you had more you would select more click OK we need to choose the correct output data type and the way we determine if that's been selected correctly is to look at the properties for one of these raster's and scroll down until we see the data type it is correct it does match so we can close that we also want to look at the profile and what this does is it sets a type or level of compression for the output joined or merged file we'll go ahead and leave this at default and then we'll choose to save this to a permanent file likely QGIS will suggest the TIFF format that's a good format even though there are dozens of other ones we'll stick with that and we'll go I'm just going to name it merged so go ahead and click run this may take a few moments depending on your computer but once it's complete click the close button and you'll see your new merged raster combining the tiles from the previous two individual files let's go ahead and change the symbology for this merged dataset click single band gray drop down to single band we'll choose the color ramp you were previously looking at and so if you turn this on and off you'll see now that since the highest and lowest value is the same because this is one file you don't get that break in the data that we were seeing in the separate files so you've now joined and symbolized to freely downloaded raster elevation data sets this is looking even better so if the opposite had been true what if you only need a portion of the original file but we can accomplish this in QGIS as well add the area clip shapefile I'm going to go ahead and symbolize this so we can sort of see through it and we're going to use this rectangle to go ahead and clip out that portion of the raster that falls within it so the tool we're going to want to use for this is called clip raster by mask so we'll search for that in the processing tool box double click to open it and our input layer we're going to go ahead and choose one of the single raster's and I know which one this is that falls underneath there and then of course our mask layer is that polygon we've just added we're not going to really worry too much about the source coordinate system but we do care about the target coordinate system so I'm going to go ahead and check one that I know measures distance and meters because one of the things I'm going to do with this clip raster data is create contours and I want to know what measurement those contour lines are displaying in other words are they measuring elevation in feet or meters in this case I'd like them to do that in meters I'll go ahead and save this file and I'm just going to name it cliff go ahead and click run when this is complete you can click close and you can already see that it has added that subset of the raster layer we can clip these other ones or turn these other ones off and here we have our clipped raster dataset now that we have a smaller area of interest let's create contour lines symbolize and label them using the clipped information from the larger raster or de M data set DM standing for digital elevation model qgis has an aptly named tool for this so we'll go to the processing toolbar and search for contour under raster extraction we'll double click the contour tool and we'll make sure that our input layer is selected because we had it selected in the layers panel it's automatically selected the band number is correct and let's go ahead and do five meter intervals between these contour lines and we know these are going to be meters because we set that coordinate system in the previous step go ahead and click run and when this is completed you can click the close button and you'll see that we have now added contour lines to this dataset we can use the layer styling tab to change how these contour lines appear so let's go ahead and make them black the thickness looks good we can also go ahead and label these lines click the label sub tab click the labels drop-down menu and choose single labels we'll use the value from the elevation field to label these and we can see here if we zoom in a bit we can start to see our contour lines being labeled we can go ahead and we can do things like change the font we can also give them a buffer so that maybe they become a little easier to read we can also change their placement and basically as you move around these you would want to go ahead and experiment with them and see what works best for you if my contours are too close together I could of course rerun the contour tool changing the interval value to better match my map so as always links to location of data are in the description make sure to hit that like button and subscribe to get future updates until next time keep mapping the past
Info
Channel: AnthroYeti
Views: 816
Rating: undefined out of 5
Keywords: QGIS, GIS, Tutorial, Tutorials, Raster, Raster Data
Id: AzNhxb25Kvw
Channel Id: undefined
Length: 12min 28sec (748 seconds)
Published: Thu Jun 18 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.