TITLE: Lagash Archaeological Survey and Recording System (LASRS) - Rectangular Survey Grid Creation with QGIS
AUTHORS: Paul C. Zimmerman

[DESCRIPTION]
Tools available in the open-source GIS program QGIS can be used to create a rectangular grid for archaeological surveys within irregularly-shaped boundaries. This protocol describes the steps necessary for generating the grid, trimming it to the desired survey area, and uniquely labeling the nodes generated.

[STEPS]
SECTION: Create Your QGIS Project
1. Launch QGIS and select the New Empty Project template.
SECTION: Create Your QGIS Project
2. Click the project CRS button in the lower right of the window and select the appropriate EPSG with UTM coordinates for your survey.

 For most of Iraq, this will be WGS 84 / UTM zone 38N (EPSG:32638).
SECTION: Create Your QGIS Project
3. Download background imagery.
SECTION: Create Your QGIS Project
3.2. Click the QuickMapServices button in the QGIS toolbar and choose the appropriate background map for your survey.
 

SECTION: Create Your QGIS Project
3.1.   
 

SECTION: Define the Survey Area
5. Zoom to your survey area.
SECTION: Create Your QGIS Project
4. Save your QGIS project before proceeding.
SECTION: Define the Survey Area
6. Create a new shapefile layer.
SECTION: Define the Survey Area
6.1. Choose Layer > Create Layer > New Shapefile Layer… to open the New Shapefile Layer window.
SECTION: Define the Survey Area
6.2. Next to the File name field click the three dots button to choose the location where the new file will be saved. Name the new shapefile something sensible like Site Boundary or Survey Area.
SECTION: Define the Survey Area
6.3. From the Geometry type menu choose Polygon.
SECTION: Define the Survey Area
6.4. Verify that the CRS shown is the same as the project CRS, correcting this if it’s different.
SECTION: Define the Survey Area
6.5.   

SECTION: Define the Survey Area
7. Draw the outline of your study area.
SECTION: Define the Survey Area
7.1. In the Layers panel, double-click the newly-created polygon layer to open its Properties window.
SECTION: Define the Survey Area
7.2. Select the Symbology panel and click on the Simple Fill symbol layer.
SECTION: Define the Survey Area
7.3. From the Symbol layer type menu choose Outline: Simple Line.
SECTION: Define the Survey Area
7.4. Change the line color and stroke width to values that will show clearly on your background imagery.
SECTION: Define the Survey Area
7.5.   

SECTION: Define the Survey Area
7.6. Left-click to place vertices that define the polygon bounding the survey area. Use the scroll wheel on your mouse to zoom in and out as necessary and the spacebar to pan. When finished, right-click to finish the polygon.
SECTION: Define the Survey Area
8. Click the Toggle Editing button, and save your changes.

 

SECTION: Define the Survey Area
7.8. If necessary, use the Vertex Tool edit the newly-created survey boundary polygon by moving, adding, or removing its vertices.
SECTION: Define the Survey Area
7.7. When it pops up, dismiss the Feature Attributes window by clicking OK, leaving the id null.
SECTION: Define the Survey Area
9. Save your QGIS project before proceeding.

  

SECTION: Generate the Unlabeled Survey Grid
10. Create the base grid
SECTION: Generate the Unlabeled Survey Grid
10.10. Choose Vector > Research Tools > Create Grid… to open the Create Grid algorithm settings.
SECTION: Generate the Unlabeled Survey Grid
10.11. Leave Grid type at Point.
SECTION: Generate the Unlabeled Survey Grid
10.12.    

SECTION: Generate the Unlabeled Survey Grid
10.13. Set Horizontal spacing and Vertical spacing to the intended spacing of your survey grid.

SECTION: Generate the Unlabeled Survey Grid
10.14. Set the Grid CRS to the same value as the project CRS.
SECTION: Generate the Unlabeled Survey Grid
10.15. Leave the other values at their defaults and click the Run button.
SECTION: Generate the Unlabeled Survey Grid
12. Remove points that lie outside the survey area.
SECTION: Generate the Unlabeled Survey Grid
12.1. Choose Vector > Geoprocessing Tools > Clip… to open the Clip algorithm settings.
SECTION: Generate the Unlabeled Survey Grid
12.2. Set the Input layer to the rotated grid created in step 11.
SECTION: Generate the Unlabeled Survey Grid
12.3. Set the Overlay layer to the polygon created in step 6.
SECTION: Generate the Unlabeled Survey Grid
12.4. Click the Run button.
SECTION: Generate the Unlabeled Survey Grid
12.5. In the Layers pane, select the grid layers created in steps 10 and 11 and remove them.
 

SECTION: Generate the Unlabeled Survey Grid
12.6. In the Layers pane, right-click on the newly-created Clipped layer and select Show Feature Count to reveal the number of grid nodes within the survey area, from which you can calculate the overall coverage and make estimations of project duration, cost, or any other pertinent constraints directly influenced by the number of survey units.

   

SECTION: Generate the Unlabeled Survey Grid
13. Repeat steps 10–12 with different grid spacings and/or rotations to achieve the objectives of the survey. When done you can remove the Centroids and Buffered layers. 
SECTION: Create the Labeled Survey Grid
14. In order to easily identify the grid nodes, they should be given unique labels, which will be assigned in the QGIS Attribute Table for the layer.
 

SECTION: Create the Labeled Survey Grid
14.1. In the Layers pane, right-click on the newly-created Clipped layer and select Open Attribute Table.
SECTION: Create the Labeled Survey Grid
14.2. Click the Toggle editing mode (pencil) button in the upper left of the Attribute Table window to enable editing.
SECTION: Create the Labeled Survey Grid
14.3. Click the Open field calculator (abacus) button to open the Field Calculator window.
SECTION: Create the Labeled Survey Grid
14.5. Enter node for the Output field name.
SECTION: Create the Labeled Survey Grid
14.7. In the Expression field enter the following formula, replacing <survey identifier> with an appropriate prefix to identify the survey being planned, and ensure that the Output field length value is sufficient to accommodate the longest expected result. Then click the OK button.
 

SECTION: Create the Labeled Survey Grid
14.9. Click the Toggle editing mode (pencil) button in the upper left of the Attribute Table window and then click Save to save the edits.
SECTION: Create the Labeled Survey Grid
14.10. In the Layers pane, right-click on the Clipped layer and select Make Permanent…
SECTION: Create the Labeled Survey Grid
14.12. Next to the File name field click the three dots button to choose the location where the new file will be saved. Name the new shapefile something sensible like Survey Grid, then click OK to save the shapefile.
SECTION: Create the Labeled Survey Grid
14.11. From the Format menu, choose ESRI Shapefile.
SECTION: Create the Labeled Survey Grid
14.13. In the Layers pane, right-click on the Clipped layer and select Rename Layer then type the name that you used in the previous step.

  
SECTION: Create the Labeled Survey Grid
14.14. Save your QGIS project.

SECTION: Next Steps
15. Depending on the intended use of survey grid created, one may wish to alter the point symbology, or add labels (using the node field generated in step 14).
SECTION: Generate the Unlabeled Survey Grid
10.1. Choose Vector > Geometry Tools > Centroids… to open the Centroids algorithm settings.
SECTION: Generate the Unlabeled Survey Grid
10.2. Set the Input Layer to the layer created in steps 5–9.
SECTION: Generate the Unlabeled Survey Grid
10.3. Leave the other values at their defaults and click the Run button.
SECTION: Generate the Unlabeled Survey Grid
10.4. Use the Identify Features tool to get the coordinates of the centroid that you just created. Write these values down separately, as you will need to refer to them again later.

      

SECTION: Generate the Unlabeled Survey Grid
10.5. Use the Measure Line tool to find the distance from the centroid to the furthest edge of the survey area boundary created in steps 5–9. This measurement doesn’t have to be exact, so round up to be sure that the entire boundary falls within the distance measured.

  
 


SECTION: Generate the Unlabeled Survey Grid
10.6. Choose Vector > Geoprocessing Tools > Buffer to open the Buffer algorithm settings.
SECTION: Generate the Unlabeled Survey Grid
10.7. Set the Input Layer to the Centroids layer.
SECTION: Generate the Unlabeled Survey Grid
10.8. Set the Distance to the value determined in step 10.5.
SECTION: Generate the Unlabeled Survey Grid
10.9. Leave the other values at their defaults and click the Run button.
SECTION: Generate the Unlabeled Survey Grid
11. Rotate the grid to the alignment required by the survey.
 


SECTION: Generate the Unlabeled Survey Grid
11.1. In the Processing Toolbox find Vector geometry > Rotate and double-click it to open the Rotate algorithm settings.
 

SECTION: Generate the Unlabeled Survey Grid
11.2. Set the Input layer to the grid created in step 10.
SECTION: Generate the Unlabeled Survey Grid
10.16. In the Layers pane, right-click on the newly-created Grid layer and select Open Attribute Table.
SECTION: Generate the Unlabeled Survey Grid
10.17. Click the Toggle editing mode (pencil) button in the upper left of the Attribute Table window to enable editing.
SECTION: Generate the Unlabeled Survey Grid
10.18. Click the Open field calculator (abacus) button to open the Field Calculator window.
SECTION: Generate the Unlabeled Survey Grid
10.19. Make sure that the Only update n selected feature(s) option is unchecked and that Create a new field is checked.
SECTION: Generate the Unlabeled Survey Grid
10.20. Enter transect for the Output field name.
SECTION: Generate the Unlabeled Survey Grid
10.21. In the Expression field enter the following formula, then click the OK button.
 

SECTION: Generate the Unlabeled Survey Grid
10.22. Click the Toggle editing mode (pencil) button in the upper left of the Attribute Table window and then click Save to save the edits.
SECTION: Generate the Unlabeled Survey Grid
11.3. Set the Rotation (degrees clockwise) field to the appropriate value plus 270.
 

SECTION: Generate the Unlabeled Survey Grid
11.4. Set the Rotation anchor point field to the X and Y coordinates of the centroid, as recorded in step 10.4, separated with a comma.

  

SECTION: Create the Labeled Survey Grid
14.4. Make sure that the Only update n selected feature(s) option is unchecked and that Create a new field is checked.
SECTION: Create the Labeled Survey Grid
14.6. Set the Output field type to Text (string).
SECTION: Create the Labeled Survey Grid
14.8. Click the Delete field button and remove all the fields except for the newly-created node field because they are no longer useful or accurate.

     
SECTION: Next Steps
16. Finally, when you are satisfied that the grid meets the project’s needs, find the Survey Grid shapefile and zip all its components together to upload to ArcGIS Online (see the Creating Collection Forms with ArcGIS Field Maps protocol).