 Hello, this is Hans van der Krust from IHG Delft Institute for Water Education. In this video I'm going to explain raster data. After this lecture you are able to describe what raster data is and how it can be used in GIS. In GIS there are two common data models to represent reality. There's Vector and there's Raster. Vector has already been explained in another video. In this video we are going to talk about raster data. Basically raster data is a big table or a matrix consisting of cells. We call the cells pixels which comes from the English words picture and element. It's a concatenation of those two words. It's defined by a number of rows and a number of columns and the size of the pixels resolution. The pixels in raster data have a spatial resolution. Spatial resolution is the width and the height of a pixel. In this lecture we'll talk about square pixels. Of course many other shapes exist but the basic form that you will mostly encounter is square pixels. When we speak about spatial resolution of 30 meters it means that the pixel has a width of 30 and a height of 30 meters. In the pixel we store the data. So Vector data has attribute tables but raster data doesn't have it and we store the values in the pixel so every cell has a value and we need to distinguish different data types which i'll explain in more detail later. First of all we can store whole numbers which we call integers and we use that for discrete or Boolean data. Boolean means true false. It will come later in this lecture. We can also store decimal numbers which we call floating point and that's used for continuous data. Data that represents gradual changes in the landscape. A specific form of values that we store in the pixel is no data and that's a value that indicates to the GIS software that these pixels should not be used in the calculations because for example they are masked because of clouds or they are invalid data from sensors. Depending on the software this is called no data or MV missing value or none not a number. Let's illustrate the concept of spatial resolution by looking at satellite images and aerial photographs. This first example here we see a part of Western Europe as seen by the MODIS sensor which has a spatial resolution of 1000 meters that means that each pixel is 1000 by 1000 meters. These type of images are useful to visualize or detect gradients in vegetation for example or cloud patterns. Let's now zoom in a little bit on the Netherlands and we are going to zoom in on the reds. Now we look at an astra image and this image is not in true color but in so called false color where we made a reflection from vegetation in the near infrared. We made it red and what we can see is that the spatial resolution is 15 meter so each pixel is 15 by 15 meter and we see the contrast between the city of Utrecht in white and light blue and the countryside where we see the typical Dutch grazing lands in red. When we look at the iconos image which has a spatial resolution of four meters we can further zoom in on the campus of Utrecht University. Here we can distinguish different features such as a fortress in the south of this image and the different buildings of the campus. We can even see cars on the highway. This is a zoomed in part of the same image. Although we can distinguish the different pixels we also can see a lot of different features. Now if we want to also look at aerial photographs and this aerial photograph has a spatial resolution of 25 centimeters so every pixel is 25 by 25 centimeters and here we can distinguish even the windows in the cars, lines on the roads or almost the leaves on the trees or people sitting on a terrace. So all these different spatial resolutions have their own purpose for distinguishing features. It's not always necessary to acquire the highest spatial resolution. There are also other properties of images to take into account for the the choice of image you want to use or the choice of raster layer that you want to use. In a previous video we have discussed vector data so why do we need raster data? We have looked at the same picture and we have identified specific features that we can represent as points, lines and polygons in vectors. What we cannot represent are physical properties of the landscape that gradually change over the landscape. For example vegetation cover gradients or elevation gradients and raster data is much better in representing gradients in the landscape so representing continuous data. If you think about hydrological modeling for example or environmental modeling can you name a few more properties of this landscape that we can represent better in raster data because they are gradients? We could think of soil moisture that gradually changes over the landscape. It doesn't have sharp borders or meteorological variables such as precipitation or temperature. Also other properties we can derive from the elevation such as the slope or the aspect of the landscape. There are many physical properties that we can represent as gradients and have to represent as gradients for which raster data is much better than vector data. When we work with raster data we have to take care of different raster data types. They influence the visualization and the type of calculation that we can do. There are discrete rasters. The cells of discrete rasters contain integer values and they represent classes so we can think of layers representing land use or soil map for example. This type of data is very comparable with polygons and can be easily converted between one and the other. A second raster data type are continuous rasters. They are represented by real values in the cells. They can be decimal, negative, positive and they are used to represent features without sharp borders. The gradients that we've been talking about in the previous slide. We can think of elevation data or digital elevation model or map with temperatures, soil moisture or runoff. They don't have sharp boundaries and they cannot be represented in vector format. And a special data type are Boolean rasters. Boolean rasters only have a value of one or zero where one means true and zero means false. And this is very important if you want to represent for example flood maps. The area that is flooded get a value one and the area that is not flooded gets a value zero. The same can be done for research where we want urban versus non-urban or polluted versus non-polluted. In those cases we use Boolean rasters and they are very useful to do use logical operators and to do map algebra with which it will be presented in another video. If we want to visualize rasters we also need to take into account these data types. So when we talk about single-band rasters all the values of the rasters are stored in one layer and each value of the layer represents a certain property. If the layer is a discrete raster we use the so-called palleted or unique values and random colors. The colors need to be chosen in such a way that they are intuitive and we can then label each value with the name of the class. Boolean is very similar. We also use palleted or unique values but we only have the values zero and one and then we can label it with false or true or flooded or non-flutted. So there we also use random colors that are very discrete. For continuous rasters we use color rams. Color rams are a very good way to represent gradients in the landscape and depending on the data that we want to visualize we choose a different set of colors for ranges of values. Sometimes you will also see multi-band rasters that's not much the scope of this lecture but you will see that mostly in remote sensing where we have a stack of layers that form one image that we can use for further analysis. In remote sensing for example the reflection in a certain part of the electromagnetic spectrum is stored in different channels or bands. So here we see band 4, band 3 and band 2 of a certain sensor and our eyes are limited that we can only see red, green and blue. So we have to assign a certain color gradient in red, green and blue to the reflection of remote sensing and then we can combine this in a GIS or remote sensing software and look at different combinations of these bands and they give us the indication of different properties of reflection. But in this lecture we will limit ourselves to the single band rasters where each individual layer is a certain property of the landscape. Let's further illustrate these different raster data types by looking at examples. Let's first look at the continuous raster data examples. Remote sensing data with surface reflection is continuous data where each cell represents the reflection of the earth's surface in this case of the city of Kampala in Uganda. Digital elevation models also are continuous data these are gradients in the landscape and the values can be decimal it can be negative or positive which is not possible of course for discrete rasters. And negative data of course is very useful for countries like the Netherlands which are for a large part below sea level. We can use continuous raster data to represent interpolated point data in this case temperatures for example. For discrete raster data we can think of land use maps. Here we see the Korean land use map from the European Commission and each pixel has a discrete color which indicates to which land use class it belongs. There are no gradients there are sharp borders. The same is for the soil map here we see the soil map of the joint research center and here every soil has a value and a color that indicates to which soil class a pixel belongs. There are also there are no gradients but sharp borders. Then we have the Boolean maps here we see an example of flood data and in fact these are two Boolean maps on top of each other which indicates flooded and non flooded and then for two flooding episodes. So in the light green we see a flooded area and the non flooded is made transparent and in blue we see another flooding episode and transparent what was not flooded. So it looks like a discrete map but these are two Boolean maps on top of each other. So now we've learned about both vector and raster and what is now the main difference between the two. There are many and I'll focus on a few. So with rusters it's very difficult to make overlays which is very easy with vectors. With rusters we need to use transparency or blending or we need to mask certain data and make it transparent by considering it as no data. With rusters if we want to reproject register or scale it needs quite some calculations while with vectors we only need to do that for the nodes and to make the connections of the geometry again so that's much faster and easier. Rusters are generally stored in large files because every pixel needs to be stored. Well in vector we need to just store the geometry and the attributes. Rusters are difficult to update we need to regenerate a whole matrix. Well with a vector we can simply move points lines or polygons or nodes and update the map in that way in a very fast and easy way. The main advantage of raster data is that we can do map algebra and all kind of raster processing which will be explained in another video. Well with vector data it's very useful to do network analysis routing over networks navigation and those kind of things. The real power of raster data is that we can represent continuous features gradients in the landscape. With vector data that's not possible and it's very useful to use vector data for discrete features and even features that don't have a real area such as to indicate sample points on the map. Raster data origin mostly from data from sensors that can be remote sensing but also drone images for example all kind of sensor data and for vectors the data can be coming from GPS or digitized from a from a map.