 Hello, my name is Nico Tripsovich. I'm with the Archeological Research Facility at UC Berkeley. Welcome to our practical workshop series. Today I'll be describing how to create a site grid in QGIS3. Site grids are widely used by archaeologists for a variety of things. One thing we do with them is create a regular sampling interval for something like shovel test pits or for artifact surface analysis. Another use is laying out site grid excavation units, and finally they're also used for laying out the squares and rectangles that are used in geophysical survey. So today's workshop I'll be describing how to lay out a site grid and shift it and rotate it according to the needs in the field, and also how to export the resulting coordinates into comma separated values tables so that you can import that into a field instrument like a RTK GNSS unit or a total station, something precise enough to then be used in stakeout mode to locate those grid markers in the field so that you can then drop pin flags and use them in your field work. So let's go ahead and get started in QGIS3. I'm just pointing out that I'm in metric coordinates in this projection and coordinate system, now at 83 epoch 2011 UTM 10 North, and these are meters and UTM zones and north not decimal degrees. And that's important because we're going to be doing metric measurements and we need to be using metric units. So here we have a site datum and then sort of simulating in a situation where we've already got a site datum that we're going to try to work with. And we have some structure at the site like these roads and we're going to create a site grid using the vector creation tools here. So there's two tool sets that can create grids. There's a series of points which will create a series of points either regularly or at random offset. And this is useful if you need to create say exactly 100 points for sampling purposes, but in most cases the create grid tool is more useful for archaeologists. In both cases, you'll want to have a area delimited for the grid creation, that is, you need to specify what area gets graded out. And so we'll begin by creating a polygon here in our demo polys layer, making it editable. And I'm going to create a new polygon. And I'm going to demonstrate the use of this tools of advanced digitizing P. This is only available if you're using projected coordinates, metric coordinates like the UTM. I'm going to enable advanced digitizing, and I'll show you how this works so you will create the study area by clicking in one of the corners, and then with advanced digitizing tools you can use these keyboard shortcuts on the side. So you don't interrupt your digitizing task so I'm going to hit the D key and specify that I want the northern edge of my study area to be 80 meters, like type 80 press return, and that now limits my movement to 80 meters anywhere in these directions. 80 meters in any direction. And then I'll click to drop the first vertex. And now I want to go 100 meters south so once again I'm going to click D and type 100, and I can go 100 meters south. You may notice that it sort of snaps to that, that 180 degree southern direction. That's because I have these common angle selected so that helps you to make right angle shapes. So I've clicked once there now I want to go 80 meters to the left, so I'm going to type 80. And guides me over to here. And then the last one's easy because it's already there, click again and right click and type study area. So we have an area that we can get out. Let's go ahead and create the grid with grid types you can choose points lines rectangles diamonds or hexagons. On this web page here I've got the demo, the documentation is pulled up showing what the diamonds and hexagons look like. Let's go ahead and create a point grid and we'll put it inside this grid extent now there's three ways to determine the grid extent one is to just draw a rectangle on the screen. The second is to use the map canvas extent which is essentially the active window here so you zoom in and fill your map window with the grid and the third way if you need a more specific polygon is to choose it from an existing layer so we're going to go ahead and use the one we just created. We're going to start with spacing 10 meters, 10 meters, and it's using the same projected coordinate system. Close. There it is. Now the first thing I'd like to show you here is that it's not that any. This grid is a virtual layer temporary scratch layer, so it doesn't really exist in on your drive so if you want to save it, you should right click and say, make permanent. What I'd like to mention is that here on the attribute table, the coordinates are provided based on our original grid. We currently see but if we change this grid at all these are no longer accurate so I'll show you at the end here how to update this attribute table after we move this grid around a little bit. One thing that frequently comes up is that you'd like your grid to conform with some existing stuff going on at the site such as a site data and you've already created a site data and you want your grid to originate from the site great data and have regular intervals from that point so let's shift this grid in order to match our existing site data so I've got snapping turned on. I'm going to choose the grid, make it editable, select the whole thing. So, and then I'll use this move features tool. And I'll choose one of them. And you can't see all of them so it's warning you can't see all the features are currently moving. And then I'll just click here and snapping turned on so it's really easy to shift it. The second thing that sometimes comes up is that you want your grid to pivot to match features at the site such as this road or architecture like a wall or building foundations. So in order to pivot the grid, you could use the rotate features tool and we've still got all our points selected when you choose the rotate features tool this little red plus years right in the center of your object. And in this case we don't want to pivot around there we want to pivot around the data. You almost always want to pivot around the data. So this is a useful skill for adjusting these kind of rotations. This sometimes comes up with total station points as well. This is a useful skill for adjusting points around the data. You hold down the control key and click it moves that red plus right to wherever you click. Now it's because of snapping it's exactly on the data. So I'm going to go ahead and click and click. I clicked once and I'm moving and now you can see that it's going to line up with the road if I put it right like so. There. So, now we have a grid that aligns with the road that begins with this. And the one final issue that I mentioned earlier is that the grid coordinates that are provided in this attribute table are based on that original grid that was created initially by the create grid function. So these are no longer accurate because we've moved and rotated the grid points. So why don't we go ahead and delete those. We're just going to delete all these. They're not accurate anymore. And we'll create current ones using the field calculator. So we're going to, we've got them all selected. And we're going to make a northern field. It should be decimal or full precision. You can even add additional points, but this is already some centimeter. And under geometry, there's a X and a Y function. Here. So, northeens moving north south. That's change in Y, right? We'll just do dollar sign Y. Now we get all our northern. And likewise, we're going to want it. Easteens. So we'll go ahead and make an Easteens field. Decimal degrees and this will be dollar sign X. And the final thing I'd like to mention about this is one thing that can be very useful is to export these to a high precision GPS unit, such as RTK P and SS we have an M lid and our M lid accepts points from the software using comma separated values. So what I would do is save this out as a CSV. And I could upload it to our M lid right click like this exports. And I would export it as a CSV. And then the reach view software in the case of M lid provides a stakeout function. So then what I can do is go out there and navigate to these points and drop a flag. Other way. So stakeout guides you, you know, it tells you, you need to move certain number of centimeters in any direction to match this point in our RTK system is roughly two centimeters in our region here in northern California. So that's pretty accurate, better than tape and compass. The, the other thing you might do at this point is to create a name field and name your grid. So let's say you're, you know, you're going to lay out now excavation grids or geophysical grids you could, you can name the corners of your, of your grid by selecting them. And then in the attribute table, you'll call this one say northeast grid a northeast. You could go ahead and label the important points in your grid that you'd like to then stake out in the RTK GPS software and it will guide you to your grid that you created virtually in QGS. I'll follow up on this workshop tutorial with another one on using these with geophysical data.