 Hello, my name is Nico Tripsovich. I'm at the Archaeological Research Facility at UC Berkeley. This is part of the practical workshop series, and I'll be discussing bringing in data into QGIS from the GPS slash GNSS unit or a total station in the form of tabular data. I'll be discussing the coordinate systems that you might run into and how to save out these data into a shapefile or geo package. And then I'll also discuss site specific grid coordinate systems that archaeologists often use. In a subsequent episode that follows on this one, I'll be making a very simple map and showing you how to symbolize the map and label it and then lay it out in the with a scale bar and legend and export to PDF. So let's go ahead and get started. The two common coordinate systems that archaeologists work in. One is for sort of regional scale data, and these would be decimal degrees or DMS coordinate system data. Here's an example of how these look for Berkeley, California. You want to determine if the data that you are bringing in is in decimal degrees or DMS that is degrees, minutes and seconds. So decimal degrees will have a decimal point in it. DMS sometimes has a space or gaps between the three groups of numbers. And there's 60 minutes and a degree and 60 seconds and a minute. So it's base 60 and makes it a little harder to do math with these computers tend to be better with decimal degrees. The pros of this system are that it works globally and it's good for regional scale data. However, one of the drawbacks is that it's not linked WGS84 is not linked to a particular continental plate. So it's not as accurate as a local data. So it's recommended that you not use this for high precision applications, such as a detailed site map. The other issue is that these are not meters. These are angular units or degrees. So you can't take measurements in degrees. For example, the width and length of an archaeological feature you would want to be in meters. So a commonly used coordinate system for especially for local scale maps like a site map would be UTM or Universal Transverse Mercator. This projection and coordinate system is metric. And the one that's commonly used here in Northern California is North American Datum 1983 based with the Epoch 2011 update. And the EPSG code for this one is 1639. So an example of UTM coordinates are Easting. Noted six digits before the decimal point and seven digits before the decimal point in Northern. So you can tell the Eastings from Northings. Eastings are numbered meters to the east of the west edge of the zone that you're currently in. So you would always specify the zone like UTM 10 in this case. And then Northings are seven digits because that's the distance from the equator to your point. So that's a long distance often since the seven digits. Pros of this system are that it's high precision. And so you can take measurements in meters and you can easily calculate areas, hectares, meters squared directly. One of the cons of this system is that you have to know what zone you're in and that there's edge effects. That is what happens when you're working right on the zone here at Santa Barbara, California. It's right on the zone on the line between zone 10 and zone 11. Well, one thing I've heard about dealing with working right on the zone boundary is that while it's optimal to use the zone that falls in, if you're right on the line, consider working in the zone to the left or the west because if you were to work in the one to the east and you went too far west, you could get into negative eastings, which is not good. Better to have big numbers in the east end than to have negative by going to the west of the appropriate zone. The other issue with these local coordinate systems is that they have many different datums. So you'll want to use a datum that's plate fixed. That is, in North America where we can use NAD 83 and that's fixed to the North American plate and that allows higher precision accuracy measurements. Be aware that these are also regularly updated because the plate tectonics these plates aren't fixed and on the surface of the earth. So there's a new series of coordinate systems coming out in 2022. So we'll be updating soon and ETM is forever being updated. One place you can look for information about these different coordinate systems is EPSG.io is a website with a long list of the different coordinate systems and projections all referenced by their lookup table number EPSG by EPSG code. Another issue I wanted to mention here is that there's a common approach used by archaeologists and it's actually pretty common in the CAD world as well is to use a arbitrary coordinate system that is a local coordinate system where instead of zero zero like in the decimal degree system, zero zero is the equator and latitude and the longitude of zero goes to Greenwich. So it's connected to our time zone system. In a local grid coordinate system, zero zero zero could just be your site data and so there's pros and cons to this approach. An advantage to this approach is that you have smaller numbers to record. So if you're writing down your numbers, if you have to write them on tags or in the notes for some reason, you're smaller than the full UTM or a high precision decimal degrees. And another advantage is that you can describe the site in great detail without revealing where it is because you can describe intersite measurements and the features of the site referencing this local data without revealing location. One of the disadvantages is that in order to compare with other people with other research, you've got to convert these data to a GIS, I mean to a global real-world coordinates. And the other issue is that if you want to bring in layers into your GIS and you're working in some arbitrary coordinate system, those other layers like satellite injury or data from others, digital turning, model data, those won't be referenced to your local data unless you re-project them into your local data. So that's a disadvantage of a site-specific grid. So let's go ahead and go right into... Oh, I wanted to mention the one more thing here. We have an example of site-specific grids. So you could... You could have your datum be zero, zero, zero, right, in your site-specific grid, but you don't want to work in negative numbers. So if you start at zero, zero, zero, everything to the left or the west and everything to the south of your datum will be negative coordinates. And another issue is you could mix up your Easteans and Northeans quite easily because they're close in number. So people will often use different ranges. And I'll go into detail here on these concepts. So here's an example of the datum right here. And we're using zero East and zero North in our coordinate system. These are 10 meter grid intervals. So as I mentioned, the problem with zero zero is that anything to the south or the west is going to have zero negative coordinates. Like this point will have negative coordinates, right? So a common solution to that is just don't start at zero. Start at 100. So here you are, zero, 100 East and 100 North. And these coordinates are now 90, in the 80s or 90s, instead of negative numbers. Another issue, however, is that you can still mix up your Easteans and Northeans. So instead of having to keep track and write an E and an N after each number, why don't you just start in different ranges? So 200 in the Eastean and 400 in the Northean. And then here you are to the west and the south. And you're in a completely different range of numbers. Now you could use 100, 200, for example, as your Eastean and Northean. But then when you go under 100, you've only got two digits. And if you're keeping track and making sure all your digits are present, it might be better for clarity to have to have your coordinates always be three digits. So people will start at 200, 400. So with that, let's go ahead and pop into QGIS. Well, first I want to look at data from a GPS. So this is a typical export from GPS software. Some GPS will export directly to shapefile or to something that a GIS can read in. But if your instrument is providing comma-separated values, then you might open the CSV file in a program like Excel and see the contents. I want to quickly mention that this is from an MLID reach. And it's providing both UTMs here and that long. So that's convenient because whatever system I'm using in the GIS, I can import the appropriate columns. If we keep looking to the right, it also tells us, those were UTM, the coordinate system name column tells us that it's UTM 10 North with the vertical data of 1988. So another thing to quickly mention is that some software like ArcMap will struggle to bring these data in because of the spaces in the first row. This becomes the field names for your spatial data in the GIS and you can't have spaces in field names. So if I was bringing this into something like ArcMap, I would remove spaces and symbols just to make sure it comes in without issue. All right. So let's go ahead and bring these data into QGIS 3.22. If you go to, first of all, a new project here, you'll note that the coordinate system provided is 4326. That's the global decimal degrees, 1984. Coordinate system, and if we click this, we can see that it applies globally. But look, QGIS is warning us that it has a limited accuracy of about best two meters because it's not a plate fixed. It's not plate fixed. So we should use a UTM plate fixed coordinate system like UTM 10 North. That's appropriate here in California. I've simply memorized 6339 and 6340 is the one just to ease here because those are commonly encountered these and just memorize the EPSG code and I try to get all my layers into that coordinate system to make sure they all line up properly. So let's go ahead and add this layer, add layer, add limited text, click the dot dot dot, browse to your comma separated values table, and maybe just please because I had it open in the other site in Excel. So don't try to open it into programs at once. Okay, so here it is. It recognizes it's a CSV because it has spatial coordinates. I can bring them in as point coordinates. If it didn't have spatial attributes, you could still bring it in as a database as far as a spreadsheet but with no geometry. It automatically recognizes latitude and longitude and northern and eastern. So I'm going to say change over the X field, that is east to west is going to be east. Change in the Y direction is going to be north. Z will be elevation. M is our linear referencing numbers that we're not using here and it picked up that the coordinate system in the right column there. It knows that we're in the Tm plan north. Also I already know the project is still 4326 but when I bring in data the first layer you bring in to GIS, we update the coordinate system to the first layer you bring in. It's changed it to 16P9 because there's only one layer and that's the coordinate system of that layer. The first thing that people often do is want to make sure that their points are curing in the right position on the surface of the earth. A very popular plugin for QGIS is called quick map services. I recommend everybody install this. It has a number of plugins. I would search for this term and install it, check it and click install. Let's look at what is under the web menu here. There's many layers. If you've just installed it you probably only have a handful of layers. Two or three. To have more layers available, go to settings and choose more services and click get contributed path and it will load up many more layers including this handy Google hybrid layer which has basically imagery labeled bund in. It looks like my points are in the right place. I'm going to turn on I have the styling pane on the right over here. Turned on by clicking this icon. I'm going to change the color to be more visible and I'm going to turn on labels here. You can see site data and the number five is hard to read against the tree. So I'm going to turn on the buffer. So now you can see the site data. Everything is coming properly. However, if I hover on here I can see that the path is still, if you look at the second and third line there, it's pointing to that CSV file on my hard drive. So that's not a great way to manage your data in the long run because if something happens to that CSV, if it gets moved, this will break the link. So first, after making sure it's in the right place, the second thing people typically do is see export, see features. When I right clicked it or option click on a map, save features as and you can do a shape file or a geo package or any number of formats. Let's do a shape file here, file name, I'm going to call this target, see the term targets on a nearby property and it knows the coordinate reference system is 1629. If you click this you can see that it's relevant here in California. So there it came in and it inherited, well it doesn't have the label, that was this, so go ahead and turn on labels on this one as well and remove the CSV. So the other thing I wanted to demonstrate in this workshop is that the issue of site-specific coordinates. So in this Excel spreadsheet, arbitrary coordinate training that CSV, I've got an example of a site that's in Easting 2000, Northern 4000. Now the example I showed in my slides was Easting 200, Northern 200, 400. So 2004,000, you might do that in a bigger site, right, but where you want to have the space to map things that are a kilometer or two away from the data. So that's why I use these larger numbers. So how could you bring this into the GIS because these are referencing my arbitrary or my site-specific data, right? So there's two ways you could do that. One is to bring it into any metric coordinate system in the GIS. So if I brought this into UTM 10 North, I think it would work, but the strange thing is that it would be down by the equator, right, because 4000, Northern is only four kilometers from the equator. So it's basically going to be at the bottom of my zone 10. And I could move that to, I could bring in all my data and it would be down by the equator and I could just use the move features tool in QGIS to slide it up to my present space. But in terms of geodesy, that's a little strange because UTM zones are not equal width. They converge to the north. And so there'll be subtle error in my northing if I go ahead and do that. That's the simplest way, probably, but to move it graphically from the equator up. But for greater accuracy, I will use another method, which is to simply do a little math and excel before bringing it in. So let's go ahead and open the table that has the drone targets. And here's my, remember my site datum, UTM's is right here. So let's go ahead and bring that into my arbitrary table. And what I'm trying to do is make this site datum fall on this point in UTM space and then use the same conversion with all my archaeological features that I mapped relative to this site date. So the simple way to do that is to just do the math here. So let's call this one easting two. And what does it take to convert this easting of 2000 to this easting? Well, it's basically equals 2000 plus, I'm going to type these values minus 2000. So five, six, six, one, six. Oh, and I need to subtract 2000. So I'll do five, six, four. Visually compare this is the same as this. So that's good. Same with northing. I'll do equals 4000 plus four, one, and then I have to subtract 4000. So we'll do eight, seven, three, one, oh, I think there might be something beyond the decimal. Let's do that. And then check, oh yeah, there's a point one there. One. And that works now that the elevation might be a little two. Elevation is only 137 above above sea level. So let's use Excel to do the math for this. So I want this to be, what is it going to take to make a thousand line up with 137.5 while just do 1000 minus 137.5 is eight, six, three, two, five. So equals minus, no, I guess, yeah, that should be negative eight, six, three, two, five. So now that same transformation, we'll just do fill down. And all these points are now adjusted relative to data. Now this is working because I used, I used true north in this coordinate system. And true north here. So everything, so the math is quite easy. I wouldn't, I wouldn't try to do this if I hadn't used true north. If I hadn't used true north, what I would probably do is bring in the datum and then bring everything in relative to the datum, but then be prepared to pivot around the datum in QGIS. Okay, so let's remove these columns, we don't want to remove them. I'm going to save it. Excel doesn't like saving to CSV because it loses a lot, loses the formatting and loses additional tabs. There's a number of things that are lost, but in this case, I think we're good. Close this. And then let's go ahead and bring this into QGIS, demonstrate. Once again, it's comma separated, but we're going to bring in the arbitrary coordinates training. Remember, it was called Easteen, so you can see right here, Easteen two north and two elevation two, what we're going to use because these are real world coordinates. Add and it looks like they came in. We can, we can test it by looking at the site datum. There's the site datum. Turn this on and off and it looks like they're in the same spot. So that's about it for this workshop. In my follow up workshop, I'm going to show you how to draw lines and polygons, a little more symbology on these, and then lay out a map for demonstrating scale and legend and expert. Thanks for watching.