[MUSIC] In the last lecture, you studied on spatial data acquisition systems, how and where to acquire spatial data, or how to produce spatial data for your own purpose. Now, you are ready to extract useful information or a valuable insight from spatial data. So that we'll discuss spatial data analysis which is the fourth layer of GIS. That's the topic of this lecture. [SOUND] Spatial data analysis covers a list of analysis, from basic spatial data processing to highly advanced spatial data analytics. The list was presented and the concept of each analysis was discussed in the first lecture this week. In this lecture we'll discuss measurement and basic geoprocessing, which is generally covered by GIS softwares. Now let us overview method in this category. Measurement includes location measurement of any spatial object. In other words, coordinate, distance measurement of given two spatial objects, and area measurement of a given polygon. Simple but useful for spatial information. Point in polygon is to check if the point is inside or outside of polygon. Does it sound too easy? Actually it's not. We'll discuss it later. Basic geoprocessing includes buffering, merging, dissolve, clip, intersection, union, and some others of spatial objects. Spatial join is also interesting and powerful operation, which combine attributes of two spatial objects based on spatial association of the two. For raster data classification, logical and arithmetic operation, aggregation, and some other processing can be done in GIS. Vector-raster conversion is often required when we analyze the two data types together. In GIS software, while you move around your mouse, you can see change of coordinates. And you can measure distance between two points and area of a given polygon. Now you are looking at an example where you can see a coordinate of latitude and longitude, area measurement of given polygons. By the way, can we compute distance and area with geographic coordinate? I mean, latitude and longitude? Theoretically, yes, but in reality, for that, latitude and longitude should be converted to 2D plane coordinate, such as UTM, which was discussed in lectures on map production. Point and polygon is a basic operation which is not for spatial analysis but for mass operation such as polygon selection. For example, in GIS, when you double click inside a polygon, the polygon is highlighted. Let's take a look at the given example. Can you answer whether a point p is inside or outside of a polygon? For that, we can draw either a plumb line in red color or horizontal line in blue color. And count the number of intersection between the line and boundary polygon. It is inside if the number is odd or outside if it is an even number. In the example, the number is a seven, so that the point p is inside of the polygon. [SOUND] Buffering is the spatial operation which produce a buffer. It is an area defined by the bonding region within a given buffer distance from a spatial feature, point, line, or polygon. You're looking at the three buffers of point, line, and polygon. Buffering is a simple but very powerful operation in spatial analysis, particularly proximity analysis. Buffering is very important operation. For example, point buffer can be used for market analysis to define an accessible area of a retail store. Clipping is also known as cookie cutting, which is to extract partial feature from given spatial feature which is located within clipping feature. The figure is just showing the process. Dissolve is to aggregate adjacent polygons which has the same attributes. In the figure, the same color represent for example the same land cover. We can use dissolve operation to remove unnecessary boundaries. Intersect is to integrate input spatial features and their attributes, only for the common areas. The figure is showing the example. Intersect is also very powerful operations to spatially associate two spatial features. For example, how can you have the list of counties which contain national park and the park area within each county? Intersection is the solution. In the example, the first input layer is county boundary, and the second layer is a national park. Then the result layer can be the answer of the question. Union is similar to intersect, the difference is to preserve the features of spatial extent of both input layers. The figure shows union operation and it also shows the difference between union and intersection. [SOUND] Spatial join is similar to join operation in DBMS query. The difference is to use spatial relationships for matching two records in two DBMS tables. In fact, intersect discussed just before, is an example of spatial join. This is an important issue and will be discussed again in Spatial DBMS. Now, Raster data processing. Classification is categorized pixel values into a certain number of groups. The figure shows classification example with four classes. Raster overlay is to associate two or more raster layers and conduct some mathematical operation. We can apply logical operation, as you can see now, or some arithmetic operation can be conducted as well. The example shows multiplication, but it can be addition, subtraction or combination of arithmetic operations. Instead of a two input layers, with respect to single layer, we could apply a certain function to the pixel value such as trigonometric function. Which is often used in analysis of digital elevation model for hydrological modelling and viewshed analysis and so on. Spatial Aggregation occurs particularly when the resolution of raster data is reduced to coarse value. In the example, we can assume that the original raster has 10 meters resolution, then the original raster has 30 meter resolution. For the spatial aggregation, we could use simply central value of aggregated pixel of original raster. Or we could use majority value of aggregate pixels. Or we can use median value of aggregated pixel, as the example shows. We can also use average value of aggregated pixel, as the example shows now. However, it should be noted that the average value aggregation is only applicable to continuous data type, such as elevation, precipitation rate, temperature, and so on. [SOUND] I brought in a real example of spatial aggregation of raster data. The figure is land cover map of before and after spatial aggregation. The original raster data of 4m by 4m resolution from hyperspectral images. It is converted to 30m by 30m resolution using center value aggregation. The next issue is vector to raster and raster to vector conversion, which is often occurs in spatial analysis with two data types. And most GIS software's supports the process. The figure shows how vector data is converted to raster data. A fishnet is produced and then ordinary vector data is superimposed on the fishnet, and the final raster data is produced. The opposite way around, raster to vector conversion, takes the reverse step. Raster boundary is vectorized, and the result vector data can be produced. The result inevitably has zigzag boundaries, so that in many cases line generalization. Is kind of smoothing algorithm is applied to the result vector boundary and make it smooth. The figure you are looking at is a summary of vector to raster, and raster to vector conversion in a row. The input vector line in red color at the upper left is converted two times and back to vector line in blue color at the lower left. Is the same as the previous one? Of course not. While the conversions are applied, the original shape could not be maintained. The conversion process is basically sort of approximation process, so that conversion error is unavoidable. [SOUND]. There are numerous spatial analysis method to extract valuable information and insight from spatial data. Among them you have studied on measurement and basic geoprocessing of vector data and raster data in GIS. They are generally simple but present very powerful analysis, which are often used in even highly advanced analysis. Alright, this is the end of this lecture on basic spatial analysis in GIS. See you in the next lecture.