User Tools

Site Tools


lab_point_to_polygon_and_point_to_raster

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
lab_point_to_polygon_and_point_to_raster [2019/11/05 15:11] – extern redigering 127.0.0.1lab_point_to_polygon_and_point_to_raster [2020/03/29 14:23] (current) Stefan Ene
Line 1: Line 1:
 ====== KG2204 Exercise 2: Point to Polygon (and more) ====== ====== KG2204 Exercise 2: Point to Polygon (and more) ======
-{{tag>analys english laboration arcgis uppbyggnad}} 
  
-==Point to Polygon==+{{tag>SU analys english laboration arcgis uppbyggnad}} 
 + 
 +== Point to Polygon ==
  
 Copy the folder ''T\:KG2204\Exercise 2'' to your computer. Copy the folder ''T\:KG2204\Exercise 2'' to your computer.
  
 Open ArcMap and add the following files: Open ArcMap and add the following files:
-  *  Point data with ancient monuments (fastighetskartanVektor_FS_1302_epsg3006_point.shp) 
-  *  Election districts in Sweden (alla_valdistrikt.shp) 
-  *  Excel file with the population 18 years old or older for each election district (population.xls) 
-  *  Water (fastighetskartanVektor_MV_1302_epsg3006_polygon.shp) 
-  *  Rectangle marking the study area (Study_Area.shp) 
  
-{{*:data_exercise2.png}}+  * Point data with ancient monuments (fastighetskartanVektor_FS_1302_epsg3006_point.shp) 
 +  * Election districts in Sweden (alla_valdistrikt.shp) 
 +  * Excel file with the population 18 years old or older for each election district (population.xls) 
 +  * Water (fastighetskartanVektor_MV_1302_epsg3006_polygon.shp) 
 +  * Rectangle marking the study area (Study_Area.shp) 
 + 
 +{{:data_exercise2.png}} 
 + 
 +== 1. The intensity of monuments and spatial autocorrelation ==
  
-==1. The intensity of monuments and spatial autocorrelation== 
 Create (20 rows x 20 columns) rectangular polygons covering the study area with the tool: Create (20 rows x 20 columns) rectangular polygons covering the study area with the tool:
  
 ArcToolbox » Data Management Tools » Feature Class » Create Fishnet ArcToolbox » Data Management Tools » Feature Class » Create Fishnet
  
-If not open; click ''Show Help >>'' and read through the information about the functions in the tool. The fishnet should have the same extent as the study area, and consist of 20 rows and columns. You want the results to be polygons. +If not open; click ''Show Help >>''  and read through the information about the functions in the tool. The fishnet should have the same extent as the study area, and consist of 20 rows and columns. You want the results to be polygons.
  
 Give the rectangular polygons values for the number of ancient monuments inside them by right clicking on the layer name of the rectangular polygons in the ''Table of Contents''. Choose: Give the rectangular polygons values for the number of ancient monuments inside them by right clicking on the layer name of the rectangular polygons in the ''Table of Contents''. Choose:
Line 34: Line 37:
 Visualize the intensity of ancient monuments: Right click on the name of the joined layer and choose ''Properties…'' Visualize the intensity of ancient monuments: Right click on the name of the joined layer and choose ''Properties…''
  
-Go to the tab ''Symbology'' and choose:+Go to the tab ''Symbology''  and choose:
  
 Quantities » Graduated colors Quantities » Graduated colors
  
-The value we want to visualize is ''Count_'' +The value we want to visualize is ''Count_''  Are there any patterns? Do neighboring polygons tend to be more similar than a random polygon? Check if that is the case by calculating the Moran’s I.
-Are there any patterns? Do neighboring polygons tend to be more similar than a random polygon? Check if that is the case by calculating the Moran’s I.+
  
 ArcToolbox » Spatial Statistics Tools » Analyzing Patterns » Spatial Autocorrelation (Morans I) ArcToolbox » Spatial Statistics Tools » Analyzing Patterns » Spatial Autocorrelation (Morans I)
  
-You could use ''CONTIGUITY_EDGES_ONLY'' as conceptualization of spatial relationships. The result of the analysis is found here:+You could use ''CONTIGUITY_EDGES_ONLY''  as conceptualization of spatial relationships. The result of the analysis is found here:
  
 :Geoprocessing » Results :Geoprocessing » Results
  
-Index is the value of Moran’s I (positive if there is spatial autocorrelation and not more than 1). The p value indicate if the result is significant. +Index is the value of Moran’s I (positive if there is spatial autocorrelation and not more than 1). The p value indicate if the result is significant.
  
-==2. Test the stability of where people live==+== 2. Test the stability of where people live ==
  
 Now we ask the data if people tend to live in the same areas today as they did during ancient times. Now we ask the data if people tend to live in the same areas today as they did during ancient times.
Line 61: Line 63:
 Joins and Relates » Join… Joins and Relates » Join…
  
-Do: Join attributes from a table using the fields: ''election_d'' and ''election_district_id''+Do: Join attributes from a table using the fields: ''election_d''  and ''election_district_id''
  
 Now we have the population for each district. We want to calculate the density and therefore also need the area. Now we have the population for each district. We want to calculate the density and therefore also need the area.
Line 67: Line 69:
 Open the attribute table for the election districts layer you have joined with the population. Add a new field for area of the type Float in Table Options (the icon in the upper left corner at the attribute tables). Open the attribute table for the election districts layer you have joined with the population. Add a new field for area of the type Float in Table Options (the icon in the upper left corner at the attribute tables).
  
-Right click on the name of the area column and click on ''Calculate Geometry'' to calculate the area in km<sup>2</sup>+Right click on the name of the area column and click on ''Calculate Geometry''  to calculate the area in km<sup>2</sup> .
  
-Add a new column for the population density (type: Float). Right click on the name of this new column and open the ''Field Calculator''. Calculate the population divided with the area. +Add a new column for the population density (type: Float). Right click on the name of this new column and open the ''Field Calculator''. Calculate the population divided with the area.
  
 Count the number of points inside of each polygon in the same way as previous with the rectangular polygons (This can take a while). Count the number of points inside of each polygon in the same way as previous with the rectangular polygons (This can take a while).
  
-Create a new column and calculate the density of the monuments. +Create a new column and calculate the density of the monuments. Export the table as a .dbf file using ''Table Options''.
-Export the table as a .dbf file using ''Table Options''.+
  
 Open Microsoft Excel and open the dbf file (instead of ''All Excel Files'', choose ''dBase Files''). Copy or erase columns in a way that the population density column is to the right of the monument density column. Mark the both columns (include the headers) and choose: Open Microsoft Excel and open the dbf file (instead of ''All Excel Files'', choose ''dBase Files''). Copy or erase columns in a way that the population density column is to the right of the monument density column. Mark the both columns (include the headers) and choose:
Line 80: Line 81:
 Insert » (Charts) » Scatter » Scatter with only Markers Insert » (Charts) » Scatter » Scatter with only Markers
  
-==3. Test of monuments are close to water==+== 3. Test of monuments are close to water ==
  
-If we instead ask the data if ancient monuments tend to be close to water or not, we can start with reusing the previous rectangular polygons with the count of monuments. +If we instead ask the data if ancient monuments tend to be close to water or not, we can start with reusing the previous rectangular polygons with the count of monuments. We also want to create a raster file with the distance to water using the tool ''Euclidean Distance'':
-We also want to create a raster file with the distance to water using the tool ''Euclidean Distance'':+
  
 ArcToolbox » Spatial Analyst Tools » Distance » Euclidean Distance ArcToolbox » Spatial Analyst Tools » Distance » Euclidean Distance
Line 92: Line 92:
  
 Join this new table to the rectangular polygons and export the joined attribute table and open it in Microsoft Excel. Make a scatter plot for how the count of monuments relates to the mean distance for each rectangle. Join this new table to the rectangular polygons and export the joined attribute table and open it in Microsoft Excel. Make a scatter plot for how the count of monuments relates to the mean distance for each rectangle.
- +
 Observe that we this time ignored the proportion of the rectangle that consist of water. Observe that we this time ignored the proportion of the rectangle that consist of water.
  
-==The End==+== The End ==
  
 Put your intensity map and the two scatter plots in a Microsoft Word document and export the document as a PDF. Send in the PDF file on Mondo. Put your intensity map and the two scatter plots in a Microsoft Word document and export the document as a PDF. Send in the PDF file on Mondo.
  
 If you have time you can also practice map design using [[http://gisela.humangeo.su.se/quiz/mapdesign.html|this application]]. If you have time you can also practice map design using [[http://gisela.humangeo.su.se/quiz/mapdesign.html|this application]].
 +
 +
lab_point_to_polygon_and_point_to_raster.txt · Last modified: 2020/03/29 14:23 by Stefan Ene