 Hello, I'm Hans van der Kwaast, lecturer at IHU Delft Institute for Water Education. In this lecture I'm going to explain vector data. After this lecture you will be able to describe vector data models as used in GIS. In GIS we have two common data models to represent reality. There's the vector data model and there's the raster data model. In this lecture we will discuss the vector data model. With vector data we can represent real-world features in a GIS environment. Features are in fact objects that we can see in the landscape. On this picture you see different features such as individual trees, a forest, houses, roads, a river and we can describe them and the description, the information that relates to these features are called attributes. They are text or numerical information about the features. There are three different types of vectors. We can represent point features. We can represent lines, polylines and we can represent polygons as vectors. Point features have one xy location, sometimes a z for the elevation. They have no area, the features have no length and they can be displayed using a marker symbol, a size or a color. Point features apply to features without an area, for example sample points where every point is a measurement location but the area of these samples is not relevant or it applies to features that are too small to be displayed at the current scale. The point geometry consists of only one vertex or node which has an x, y and or a z coordinate if you have elevation. Related to the geometry we also have information stored in an attribute table. In this case we have a blue and a red cross and the information stored for the blue cross is the ID number 1, the name 3 and the description that is outside our classroom. In the case of the red cross the ID is 2, the name is a light post and it is described as at the school entrance. Lines or polylines are series of xy points. They have no area but the difference with points is that they do have a length and they have a connectivity and they can have a direction. Very important if you want to visualize rivers or roads. They are visualized using a line style, a thickness of the line, color and we can add an offset. An offset is a distance to the real location that sometimes is needed for visualization. This applies to features without an area but with a length or features that are too thin to represent as an area at the current scale. For example if we want to visualize roads in the Netherlands then it doesn't make sense to represent the real surface area of these roads because at that scale of the whole country it does not make sense to do that. So we represent them with lines where different road types have different line symbols, different style thickness etc. Which is just a symbol and not the real width. Lines or polylines have a geometry that consists of two or more vertices that are connected. And related to the geometry we also have an attribute table where the information about the feature is stored. So in this case we see a blue line and we see a red line. The blue line with the blue vertices have information stored in the attribute table with ID number 1, name footpath 1 and a description from class to the playground. The red line with the red nodes have ID number 2, footpath 2 as a name and as a description from the school gate to the whole. If we apply this again to the dataset of East Africa we can use the lines for rivers for example. At the scale of this area it does not make sense to represent the rivers as polygons but we use different symbology for the size of the river instead of the real area. And for the segment that we selected we can here also see the attribute table with information about the river such as the name, in this case the Victoria Nile. Polygons, these features describe an enclosed region. It has an area and they can be displayed using a fill pattern, a fill color, an outline pattern and an outline color. This typically applies to features that are in enclosed regions such as countries or other administrative boundaries such as provinces but also for catchment boundaries for example. Polygon features have a geometry that consists of three or more vertices and the last vertex is the same as the first one. Here we see an example of two polygons, the blue one and the red one and the attribute table that has all the information about the geometry. So the blue polygon has ID number one, the name is the school boundary and it can be described as the fence line for the school and the red one has ID number two, the name sports field and a description we place soccer here. Here we see the example of West Africa where we can represent the lakes as polygons. They are an enclosed area and when we select the polygons so as we have done here we can see the information in the attribute table such as the name of the lake, this is Lake Victoria. The nice thing about vectors is that we can easily create overlays so we can superimpose the different layers so we can have here first the points with the cities of East Africa and we can add the lines with the rivers and we can add the polygons with the lakes and we can add other information and in this way we make our map in the GIS. Let's do a little exercise with this map. This is an open street map of Kampala where we see different point lines and polygons. Can you think in a minute what would be points and what would be lines and what would be polygons in this map? We can see that the different bus stops for example are represented by point features as well as the supermarkets and the hospitals or clinics. For lines we can see the different roads. They look like polygons because they are quite wide but this is a symbolization using different width and a different color of lines just to distinguish different road types. We can also see polygon features. There's the building footprints, the golf court and a park. So what can we do with vector data? Vector data in GIS is very useful to do so-called spatial queries. We can ask questions to the GIS for example which houses are within the 100 year flood level of a river or where is the best place to build a hospital so as many people as possible can access the hospital or where do certain learners live in a city. There are some problems that we can encounter with vector data. First of all the accuracy of vectors depends a lot on the scale of digitization. So if we digitize a vector, a polygon in this case from a map which is 1 to 1 million, it has a very different result than if we digitize it from a map on 1 to 50,000. Of course the 1 to 50,000 map is much more precise than the 1 to 1 million. To illustrate this these figures show the polygons on a background of a high resolution satellite image. Another problem is what we call slivers. So these two polygons, they look correct from a distance but if we zoom in, we see that there's a gap in between and that is a problem if we want to do analysis because often polygons need to be connected to each other only if they are not really connected we can allow a gap but in this case that's an artificial gap which we call a sliver. For line features the common problems are overshoots and undershoots. So there's a road network on this map in the example and road number 1 does not connect to the main road which means if we use navigation equipment we can never get off road 1 and to the main road. Road number 2 has an overshoot which also causes problems in navigation. The same can happen if you digitize rivers for example so it's very important to avoid these problems therefore in GIS software when we do digitization or factorization we can set the so-called snapping options and snapping makes nodes of a layer like magnets so when we digitize we will always snap to a node or vertex in another layer. This map shows all the points, lines and polygons however they are not styled. If we use the attribute table information to style the points, lines and polygons we get a more intuitive map where we color the hydrography in blue and the roads in light brown and we add some point symbols such as circles and squares and in this way we can better understand the map so the attribute data can be used to describe the features and to be used in the symbology styling. Let's further illustrate this with the example of these houses so there are in this example two types of houses there is a house on the left which has a roof color red which has a balcony and which was built in 2000 that's the attribute of the left house the attributes of the right house that the roof color is black it doesn't have a balcony and it was built in 2002 so factor attributes are connected to the geometry and in this case we have polygon geometry and we see on the on the right we see the map of the houses layer and below we see the attribute table which indicates the ID the roof color if it has a balcony one means yes and zero means no and the date it was built and we can use we can use the attribute information of the factors to visualize the data in a better way using symbology so in this case we see the visualization of the houses polygons using the color of the roof so the red polygons have a red roof and the black polygons have a black roof the same data can also be visualized based on the presence of a balcony where we give a green color to the houses that have a balcony and the red color to the house that don't have a balcony so the geometry stays the same but the symbolization the visualization is depending on the attributes that we choose to convey the message to a user we can also search by attributes so we can select for example the black roofs and then in a GIS this will be highlighted by default with a yellow color let's look at the attribute table in more detail in a GIS we can open the attribute table and then we see the information related to the features and what we can see is that every row represents the features and every column presents information properties of the feature and the columns are also called fields so in this case field one is the year that it's built field two is the roof color and field three is the balcony and we have three features in this table if you think about houses can you think about other attributes that we can connect to the houses for example if you want to buy a house or want to know features of houses properties of houses for water management for example what could be important information is related to water management if the houses have a connection to the sewage system or to the water pipes if it's on grid or off grid if you want to buy a house we would like to know if the garden is on the south or if it has a garden or not so this is important information that we can add to the attribute table so what we learned is that we have features to represent the reality in a GIS using the vector data model and that a feature contains attributes which have the information and it has the geometry which are points lines and polygons besides visualization we can also do analysis with vectors we can do analysis on the attributes an option is to select by attribute as we have seen we could select all the houses that have a balcony for example we can do arithmetic calculation so if we have values in a certain unit we can convert the units we can do these calculations in the attribute table we can also calculate geometry for example the area of polygons or the length of a line we can also combine different attribute tables that are related to the same features that's what we call join we can also do a spatial join where we have data in different GIS layers and we say that if they overlap or intersect we can combine the data of those features and have a new layer with the combined information of the features with vectors we can also do overlay analysis for example we can calculate the difference between two polygon layers one layer has the square the other one has the circle if we apply the difference we can remove the part of the circle from the square we can also use intersect where we do the opposite we only use the area that overlaps between the layer that contains the square and the layer that contains the circle there's also union union combines the two layers into a one layer where we see both features added to one single layer we can also dissolve features so here we see the square in a circle and now after applying dissolve it will be seen as one big feature and not a separate features and this is useful if for example we have a layer with lots of little lentus polygons and we want to have the same lentus considered as one feature so we can calculate the area of the lentus another thing that we can do is the buffer where we can calculate a specified distance around a feature it's often used for line features where we want to calculate a certain distance around the road or around the river for example many of the examples used in this lecture have been derived from a gentle introduction to GIS which can be found in the QGIS documentation using this link