QGIS 3.0b - Data Sources | Mike Miller | Skillshare

QGIS 3.0b - Data Sources

Mike Miller

QGIS 3.0b - Data Sources

Mike Miller

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
10 Lessons (1h 19m)
    • 1. Loading shapefiles into QGIS

      5:06
    • 2. Loading GeoJSON, GPX, KML, and more

      3:09
    • 3. Loading ESRI File Geodatabases

      5:48
    • 4. Loading data from SpatiaLite

      14:18
    • 5. Loading data from a GeoPackage

      12:50
    • 6. Loading data from PostGIS

      13:03
    • 7. Background maps from the OpenLayers Plugin

      4:43
    • 8. Background maps as XYZ tiles

      7:27
    • 9. Loading raster data

      1:48
    • 10. Georeferencing a raster

      10:49
  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

109

Students

--

Projects

About This Class

Learn how to load vector and raster based geospatial data from a variety of sources

Meet Your Teacher

Teacher Profile Image

Mike Miller

Teacher

Hello, I'm Mike.

See full profile

Related Skills

Technology Data Science Gis

Class Ratings

Expectations Met?
  • Exceeded!
    0%
  • Yes
    0%
  • Somewhat
    0%
  • Not really
    0%
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Your creative journey starts here.

  • Unlimited access to every class
  • Supportive online creative community
  • Learn offline with Skillshare’s app

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

phone

Transcripts

1. Loading shapefiles into QGIS: Welcome back, students. This is a new section on loading data into Q G. I s and one of the really powerful things about you, G i s And one of the features, but I really appreciate about it is that it has the ability to view data from a wide variety of data sources. Js doesn't try to reinvent the wheel and come up with any proprietary data sources rather uses standard open source libraries like G D A. L and O G are too low data. So pretty much anything that you can read into G d A L O G r. You can view in Q g i s And that's just about everything. And that's important because there are a couple things we'll see either a couple data sources that are very useful really don't work that well in our G i s. So the first thing I want to look at in this lesson is are you open a shape file? She fell about a standard as it comes for dear special data sources. I'm not going to bother going to our G i s and showing you how it's done there. Anybody who's taking this course is probably loaded a shape file into our key I as a couple 1000 times there are a couple ways to do it in Q g. I s what is through the browser panel. And besides, that drives that on a local computer we have access to a couple other folders. One is the project home, and that's just the directory. The same directory that the project is stored in where home is can depend a little bit on the operating system that their using in Windows it's the user's home directory. So you can see is a few directories in here. The documents will be the standard Windows document directory does stop anything that you say when you dust type will appear there and you can see your music and your pictures folder. Oh, that kind of stuff. Now there's some directories that you access a lot that you want to get to. You can save them in the Favorites folder that'll make it really quick to get anywhere you want and did a similar thing in our G I s. You can make a new folder connection and qg I asked you, just save your directory as a favorite. And of course, you can always go to start the beginning of your C drive and stop burning down through the directory structure and to make one of these directories of favorite all yet the do is right. Click it and say at us Favourite and the ones that are in the favorite folder. If you right click it, you could say the movers a favorite if you don't want it to be there anymore. So we're very simple looking. My Favorites folder. Download this shape file G i n admin three. So this is the third level of administration districts in Guinea, and I was in Guinea this summer teaching a course on J s, a GPS for soils mapping. So I down under some data for their, But to put it into a project, I could just double click it. If I want to get out of our project, I can write, cook it on here and remove Well, I could also just drag it down to where I wanted. Inside the folder that I sing about dragging is that you can drag multiple files and one operation instead of having to go in and double click on each and everyone now, since I have data from Guinea, if I go to my extent now see, I have data over here in Colorado and way over here in Africa, data on guinea and just like anarchy, I asked. You can move these up and down so you can control with the order that they displayed in. If you right click, you can see you have some options exhumed layer and some other options as well. We'll look at some of these later on through the course. No way to add data. You can go to the layer menu and just go down to add layer. Man had vector layer, and that's going to open up a data source manager panel. And this is new to Cugini s three. This didn't exist in Q GI's to, but it's very similar to the way you work with dating que DS two as well. So the first thing you have to do is select your source type. If it's a file like a shape file, were used file. There's some data that's stored in a directory. For instance, a file Jew database is an entire directory in that case you were choose directory and some of the data that will require connecting to a database, and you could do that as well. But for shape files, we're gonna use file, and then you confer house to find the file that you want. I'm just gonna browse to my C directory Farinella jazz data vector data, and then a good two g. I s ad mean to notice. And in this dialogue, it shows all the files that make up a shape. Our remember shape file is not just one single file, it's at least three. And it could be seven very different files to make up one shape file, but the one that we want is the one that as the S h p extension. So I'm gonna add this Jan ATM into shape but cooking on it and then cooking open. Or it could just double click on it and then I'll select. Okay, Mary, every that's a second level administration district in Guinea. Now, by default. When you open, Q g i s You also have this toolbar over here on the left hand panel. It's called the data source Manager toolbar. That includes some short cuts to some different data sources as well. So the one on the very top just opens this data source manager panel just like we got do through the menu system. It's just a different way of getting there. And if you're familiar with shape files, you know that there's always gonna be an attribute table associated with him. And if you right click on the layer, cook on open had to be a table again very similar to our G I s. And you have access to all the attributes in the file that we talk about attributes in general and the attribute table in a lot of detail later on in the course. But if you want to play around with it, feel free to go ahead. So thanks for listening. In the next lecture, we'll talk about a couple of other file based data sources that are not necessarily easy to work with in our G I s and we'll see that 2. Loading GeoJSON, GPX, KML, and more: Welcome back, students. In this lecture, we're gonna talk about some file based data sources that Cugini s can read, but not particularly easy to work with in our G I s. I just saw that archaea as version 10.6 has come out. So maybe some of that is changing. I'm actually still working with the FBI has 10.4. So if I'm wrong, let me know. But at least up to this point, there's no ability to work with dear Jason Files in our G. I s not natively. At least there were some plug ins that people had put together. What do you? Jason is a really handy file format. It's a single file, its text based to let you store any kind of point line a polygon as well as attribute data . Because the standard that's based on Jason it works really well. In Web maps, Jason stands for JavaScript, object notation and most Web mapping AP eyes like Google maps or leaflet open layers and even the every JavaScript, a p i r. All of javascript, AP eyes. And so Jason worked really well with them, and all of those have the ability to load a file and DOJ son. So if you plan on doing any web mapping, it's really handy. If you're G. I s software can save some data as a DOJ zon file. Cugini s works really well for that. I have a couple of lectures. A I prepared for my other courses on Web G I s. Then they include as bonus lectures at the end of this section. And one of them is just more information on Geo Jason. If you want to learn more about what it is and how it works and the second explains, have any way that you can view in Q. GREs, you can save it as Jason file. So the open gear, Jason. Well, we have to do this. Navigate your directory where that file is stored. Find the file that you want and again double click on it or drag it down. And it for that. It works like any other layer. It has attributes you consume to it. Now, in this case, it's a duplicate of this burning al habitat everywhere that we have Burnell habitat in the yellow outline. We also have this data storage. Dear Jason in fact in version 3.0 of Q G I s you can edit dated George a side. What you didn't used to be able to do. I think you couldn't 2.18 but you couldn't in 2.14 That's a new feature, and that's really anti. Another file format that RGs doesn't play nice with natively is G, P, X and G. P. X is really handy if you're using for it. Since the garment handheld GPS, most of the lower end handheld GPS units, we'll store data and TPX format. And to get that data into archaea, as you always had to have some third party software such as D. N R garment or GPS babble or something. But in Q g i s you can simply any dp X file. You can drag it down, put it where you want and with DP exits always gonna ask you which types of data you want whether you want routes, tracks or waypoints. In this case, I won't wait point. So I'm just gonna highlight waypoints and it's select and then advise him to the waypoints layer. It takes me back over to Africa. This was GPS data collected when I was in Africa. So again, super handy. You can load the types of data K M l and G M L. If you have data stored that way, you can know that data directly into Q jeeyeon student in the same manner. And again, this is one of the beautiful things back, Q g. I s a stability to load, just about any kind of data that you want. So thanks for listening. The next lecture will talk about using GPS data stored in a file Jew database, and we'll see you then. 3. Loading ESRI File Geodatabases: Welcome back, students. In this lecture, I'm gonna show you how you can open data stored in a file geo database in few G. I s. And if you're at all familiar with our G I s working with filed, your databases should be somewhat second nature to you. So I'm not gonna show you how you can work a file, do you? Data basis in our G i s. There's a couple ways that we can access stating Q g i s We can go through the layer menu and then click add layer and add vector layer That's going to open our data source manager panel just like you did with shape files. In another file based data that we've looked at previously, remember, filed you database is actually a directory. So instead of having the source type as file, we're gonna have a source type as directory and under type. You want to click open file GTB, and then we'll browser the directory where data stored and right there it is D j Basin Dodgy db. So I'll select the folder, click OK, and then it's going to show me all the layers that in that file dear database, and it also show us the number of features in each layer and the geometry type of a layer. Now, when I created this file, dear database in our G I s had these layers separated into two feature data sets. There's something in here that reflects the names of those feature data sets, so that information is just figure. It's ignored, obviously, is the layer names, and that shouldn't be a problem unless you had there with the same name in different feature data sets. But now you can just pick one where you can pick a couple where you can pick all purveyors and just click. OK, and there we are. And if I zoom into this data, you'll see it's the same day that we've been looking at that symbolized in the same way. It just gets random colors when it comes in. But it's the same data, and if we open an attribute table for one of these data layers, we see it has the same attributes as well. So what is in Q G? I asked. We can work with it just like any other data layer we could do to your precious ing operations, we can filter it. The one thing that we can't do is make any changes to this data and the way that we opened it. Using that open file GDP type, it's access as read only data. Now, I know in previous versions of Hugh G. I. S there was a way where you could when you install a Q G I s There was some options. Had some other drivers for follow to your databases that did allow editing. And I've never used those. You seem they're still be available in qd areas. 3.0, and maybe later on in the course, a look into seeing how that's done. But for now, we could just view it as read only data. Now I'm gonna be move all these layers and I show you some other ways that we can access this data. We can open the data source manager paddle with this icon in this toolbar, and that just takes us back to the same place. Now we can also use the pros of panel to navigate to the directory where those files located and right here shows deejay basin dot gtb. And if I expand that, then we have data and we can bring it down into a layers panel and we can view it just like any other data layer, so that might be a little bit easier, but it's still doing the same thing. Now we'll find that this issue of being able to read data that's created in one program but not being able to edit it and the other is pretty common. For instance, in Q G I s you can create an edit data in special light or post G. I s maybe some other types as well. And then that data you can read and view it into anarchy. OSCE. But you can't edit it in RGs. So if you're setting up a system for a company or something of organization, where there's gonna be mixed that maybe you have a few RGs licenses for your power, G. I s users who were really used to RTs Then you want to ask you guys being used by other people who may be honest, familiar with G, I s. And you have to put some thought in through exactly how you want to do that. It's going to depend on which users need to be able to do editing, etcetera, etcetera. So for me personally, I would always want people who are doing the editing to be doing in huge I s because I think the editing is much more straightforward and easier to teach and easier to understand . In Q g i s. And it also has the ability to handle multi user editing if you data stored in a post G. I s database and so you could have 5 10 20,000 people editing data in post U. S. But then your power users, if they're using our G i s will be able to review that data, but they won't be able to edit it directly for those people. Could also have a Q G. I s running on the same machine if they need to edit it, but they give you in our G i s and they can perform to your processing tasks and do a bunch of data analysis in that kind of thing. But anyhow, it's just some things to think about if you're designing a system that's going to involve accessing the same data from different computers, the other thing that you have to be concerned about is I'm not sure if q g i s will honor the locking system that RTs uses. So when you open a shape file or a filed you database and RGs that data is locked up so nobody else can edit it. I'm not sure if you joyous honors that locking system, so it would be a little bit concerned if you're using shape files and followed your databases that can be edited in Q g. I s that you might run into some issues and I'm not 100% certain how that works gets to take home. Message is, if you really want multi user editing, she just bite the bullet and set up a post G. I s instance that everybody can access and then you shouldn't have any problems at all. You know, that's it for this lecture. Next lecture. We're gonna talk about accessing data that's stored in a special light database, and we'll talk a little bit about specifically what, exactly? A special light databases and we'll see you then 4. Loading data from SpatiaLite: Welcome back, students. In this lecture, we're gonna talk about loading data from special Light into Q G. I s. But before we see how to do that, I want to attempt it into the question. What exactly is special light? Because I think it's pretty amazing technology with a lot of potential. But even though it's been supported in our G I s since version 10.2, I think he's largely been off the radar for every users, especially, is an extension to the sequel Light database restoring, analyzing spatial data. Basically, it provides the same functionality to sequel light that Post ES provides to the post grace equal database Anarchist EE provides to sequel server Oracle and others. It's also a standards based extension that supports the open Geospatial Consortium's simple features for sequel specifications. And that's a good thing, because that means that it will be easy to use this data in a lot of other software as well . OK, so that might raise the question. What exactly is secretly in? The short answer is that Secret Light is a file based relational database management system . Unlike a true client server, R. D B. M s that's excess through a corridor specific port in the Servers operating system sequel Light is a single file that includes both the database engine in the data, which makes it very easy to install and use anywhere. In fact, it's thought that Secret Life is the most widely deployed database engine in the world because it can be easily embedded in virtually any device and in any type of application, and it can be accessed by almost every programming, language and operating system in existence. Sequel Light easily handles many simultaneous readers, but rights to the database or sequential. Unlike a true client server database, the database is locked while writing occurs, but only for a very short period of time, usually usually just a fraction of a second. So while I can't handle multi user access, it's not gonna handle it as well as a true client server database. You can't have nearly as many users using it. So what would you use special light for, well, one common uses for transferring data between applications. For instance, if you have data stored in some other format that you're using in Q G, I s just post your answer. DOJ sahn, you want to be able to send it to someone to open in our G I s. You have a couple problems. First of all, it's a client server database. You can't just copy your post your eyes database into a file. It's and send it to someone. Of course, in Q G I s You can save any layers of shape file, but Shea Files have a restriction on the length of field names, and we'll truncate any field name that's longer than 10 characters, and this can cause problems. Shape files are so large and clunky and contain lots of files, and so you probably need to put them in a ZIP file before you send them to someone, and it just gets complicated is a single file. It's just easier with the spatial Light database sequel Light can also serve as a back end for Web applications. It's a single file, so you can just copy it to your Web server, and it can be accessed in PHP or just about any other service side programming language without needing to install a client server database on the server. And you could easily implement a workflow with special light database being edited locally gets uploaded to the server on a regular basis to keep the data fresh. Also, because it's a single file, you could include the entire database in an application, cash for offline use and mobile applications. And I've heard several different reports on using sequel light as the database for multi user editing applications in a network environment. More general take is that it will work if you're reasonably certain that no two people will be attempting to edit the same data at the same time, but because of the way network file systems, cash data. If you really need a true multi user editing capability, you'd be better off with the rial client server database system. You can read the document at the Web address in red for more information about whether this might be right for your specific situation. And if you're familiar with sequel queries, especially with spatial sequel, you'll appreciate the ease with which Special Light handles sequel and we talk about sequel and much more depth later on this course. But this means that you have the ability to create sequel views, which are virtual layers defined in a sequel query. It also means that you can use triggers with your sequel programs that are executed in response to other database events. Maybe you want to create a buffer feature automatically when a point is added, were updated total in another layer when the value has changed. All of that more can be automated in the database using triggers. Special eight also supports transactions that you can group database operations together in such a way that if any operation fails, the entire set of operations air rolled back so that operations that should occurs a group or never halfway finished and sequel works great for joining data from multiple tables into a single data set. The special light. You can make those joins based on spatial relationships. For instance, joining all the rapture nest in a county polygon or within a specified distance from a pipeline, even if you ultimately will be using a client server database. Special Light makes it very easy to learn sequel for special operations without expensive software or a complicated installation specially conserve the same purpose in Q G. I s as a file. Geo database serves in the every ecosystem, except that while special. It is an open source specifications filed your databases or proprietary technology, and they're not easy to work with outside of the azure ecosystem. And they can't be access to be a sequel or support multi user editing or any of the other uses mentioned above. All right, let's go see how to load data from special light into Q G. I s in Algeria. So with specially, we're starting to get into the idea of connecting to a database and not just loading data from a file. So one way to access the data is by right clicking on the spatial light object in the browser panel and then clicking new connection. And that's going to open up a file dialog box. We can just navigate where you're storing your special light file. In this case, it opened up automatically in this great place because that's the first place I've used it . So I'm just gonna click Deejay Basin that's equal, light and open. And now that we have a connection, we can expand that and we'll see a lot of layers, same layers that we've been looking at, and you can select a bunch dragging down in And just like with the file of your database, we have all of the years. You can see it's the same data, even though it's not been symbolized. So that's one way going to remove all of these the other way, which might actually be easier it in the browser panel, you can just navigate to the directory where your special light data is being stored and you can go down to this file D J basin dot sequel light and expand it. And you can just add your layers and as you need so that we kind of hides a little bit about the fact that you actually working with the database in making the connection to your database but those of concepts that we should get used to you. Once you start working with client server databases, I'm going to remove this data, and I'm also going to go down and remove this connection, and I show you another way that we can access spatial light data in the open data source manager which can be access to this icon. Open up our data source manager panel, and you can choose what every day to source your wanna work with anything special light. Or you can access it to the lay a menu, screwed, add layer and then come down at a speech, a light layer. And then that'll open the data source Manager already set to the spatial light tab so we can just click a new connection and it will open the same file dialog box quick, open and then quickly connect button and then our shores or tables down here, then layers in here. You can just select and click the add button. And there were Adam Dura layers. Answer. There you see all the data for those for those layers. Now, I wanted to show you a real quick insight into how you can use sequel queries to create virtual layers in the game. We'll talk more about this later on in the course, but just to stimulate your thinking. Right now, we do a quick example, but I'm gonna do it in Cugini s version 2.18 because again, I'm using a pre production version and in my pre production version have been able to get to work. But it looks like the process is the same as in version 2.18 So let's go there on the look in the data base tab in the menu and go to DB Manager and that'll give us this dialog box. And if I right click on Special Light and click New Connection, we'll get this file selection dialog box so I can navigate to the folder. Rumor. Special eight Data is right there it is. So I click open and I'm not sure why. It says not connected. But let's take a look at the Rapture Nest data. There it is. You can see some information about the data shows some triggers that have already been written that are created by default. We could add some other ones if you wanted to, but it shows us the fields in our data, said the type of geometry it is with special reference it set her. You can also look at the features in this layer in table form under the table dialog. So this is an attribute table, and we have a preview Tabas well, and that will let us see preview the spatial extent of the data. Now to write a sequel, Query against this data have to open a sequel Window and Name. It can just write Standard Sequel. And if you used a sequel at all, have you seen it? Some of this will be familiar to you, since we can say select Re Seen Species, Last survey and actually let's put Nest I D. First and we'll say from in the name of the table, which is wrapped her nest. Put a where clause in there. See where the recent status field equals Active nest Little. Execute this query and we'll see. We get the data that we requested only where the recent statuses active nest. Let's add the recent status in here just to prove that we're only getting the subset where the recent statuses active NIST. There you can see if I browse through the data. We're only getting that particular subset, and we can also add in order by calls in here will say order by the survey date descending and well executed again. And now he's assorted by the their survey date in descending order, the most recent survey at the top. So there's a lot that we can do with these, and we can also use, um, spatial functions in here so for instance, I'm gonna use this special function called Buffer and that's going to take two parameters of geometry and then a buffer value. Oh, go 0.1 For now, that's a distance. But this data is in latitude, longitude, the coordinate reference system. And so this distance is going to be in degrees. Was gonna be really small number if it was in you, tm or something else. In metric, we put in how many meters we wanted that buffer to be so I can execute is now. We don't see anything in here because this binary data. But if I click this load as New layer and then I'm going to set some options here. The column with unique values say his nest i d. That's gonna be unique. The geometry column is this buffer that recreated and then I'll give it a name will say active nests buffered in there. Click load. Now have a closes dialogue, bucks. We'll see. We have just the active nests with a buffer 0.1 degrees, and we can prove that by going to favorites by navigating to where the original data is stored. Delivered a shape file of course, is going to be courses Cugini s for our data and reload the wildlife rapture nest. It will load it from Geo Jace. On this time you can see all these other nests that don't have a buffer around them or from inactive or fledged nous. Then I can show this and I do this quick. We'll talk more about symbolizing later on the course as well. But just for demonstration purposes, we're going to symbolize on the recent status column. Never sees active Nestor late blue and everything is late. Blue has a buffer around it. And all these otherness that have a different status don't have buffers. No, this is kind of cool, because in archeo yes, we have to create our own buffer layer and it would have to have the geometry that would all be stored on disk that takes up a lot of space. But in Q g. I s with spatial. Later or any other data that's stored in a database that can be accessed through sequel can create these virtual layers. Data is just a point. The buffer is created virtually using that S t buffer spatial sequel function. And so it doesn't take up any more space on disk than just the point. And really, that's just the tip of the iceberg of what you could do with a sequel. Query. You can do all kinds of joins based on spatial relationships and lots of other things, which we talk about in more detail later on in the course. So thanks for listening. The next lecture. You will talk about connecting to a post docs database in loading data from there, and we'll see then. 5. Loading data from a GeoPackage: Welcome back, students. This lecture is going to be about using data from geo packages in Q G s. You may have heard the term zero package before. It's been getting a lot of attention lately. But what exactly is it your packages? A standard developed by the open Geospatial Consortium for storing geospatial data in sequelae databases and so right away? You should probably understand that this is something that I'm gonna like. Remember. I like standards because their explicit and easy to understand and available to everyone. And I really like the idea of using a sequel Light database as a container for geospatial really any kind of data because it's fast, robust. It's accessible by virtually every programming language available and because it's a single file with some multi user capabilities, it also works Wells, a data store for Web applications in mobile devices. In fact, you have packages were designed to be very lightweight, with mobile devices in mind. Now I think it's likely the Geo packages will replace shape files and probably even filed your databases in the future, although that kind of depends on how much support every gives to the technology. But I think that's a good thing because both of those data sources have some pretty serious limitations, mostly due to the fact that they're older. They used multiple files per layer and that they back any sequel access or multi user capability. Now you might be wondering why we need another type of secret light data store for dear spatial data when, as you saw in the previous lecture, we already have a special light, and I think there are three primary reasons. First of all, as good as it is special, it really started as a project involving one person in Italian by the name of Alessandro 40 . Eri, in other words, supported a lot of standards, such as the open geospatial consortiums. Simple feature for sequel standard. It really wasn't developed as a standard. It was developed by one person. Second, other special light does a great job of storing vector data. It doesn't support rest of storage. And when the OGC started thinking about developing a standard type of file based geospatial data storage, they really wanted the ability to include raster data as well. And specifically they wanted to be able to store tiled raster layers if you don't know what a tiled rest of layer is. Think about what happens when you access Google maps over a slow Internet connection. The maps come in is individual small squares one at a time. You may not notice that over a fast Internet connection, but each one of those squares is a tile and Google maps determines the area that you're looking at, then decides exactly which tiles it needs to cover that area. That's advantageous because it means that only a few small pieces of the world need to be loaded at a time in the past, you would have to load an entire image at once, and that would take a long time because imagery tends to be very large, especially if you're covering the entire world. So a tiled raster layer is one that is broken up into numerous small pieces that are organized in such a way. They can be found easily based on spatial location and zoom level in the very popular, especially in Web applications and for background maps, because performance is much better. On the other hand, if you're going to be doing a lot of raster analysis, you probably want to store your raster in a traditional file such as Geo teff, we could lower the entire raster, also into video package as a raster layer. Third geo packages were designed to be lightweight and usable on mobile devices. As a result, they didn't include a lot of the spatial functions that were included in special light. This means that you can't create virtual layers like we did in the last lecture, using spatial light with the but, for example, to help understand some of the advantages and disadvantages of all these file based storage options we've been discussing, they put together this handy chart showing the size of the data stored in different data sources. Let's look at the DOJ sahn First Joji sign is just simply tax and in theory should take more space than the same data stored in binary format. But you're Jason doesn't have any overhead adults. It's just the data, and there no spatial indexes or anything else. So for the Eagles nest data, it only takes up 16 kilobytes to store. And for all five layers combined, the occupy is about a megabyte of disk space. No shape files take up about twice as much space for the Eagles nest data and 1.7 megabytes for all five. Most of the size of the shape piles is in the DVF file. That's where the attribute data is stored, and DVF files are not very efficient. And that shouldn't be too surprising because it's 40 year old technology. The coordinate information, however, stored in binary form in the S H P files and then more efficient so that notice bad for line in polygon data that have a lot more coordinates filed year databases have quite a bit of overhead so far. Joe database only has one small there in it is relatively large. But once the overhead is accounted for, the data stored very efficiently in binary format, so it becomes more efficient as more data is included. And in fact, for this data said, it's the most efficient. When all this data is included, special light as the most overhead in a single spatial late file with only a tiny bit of data is over five megabytes in size. That's because every special light file includes all the code for the spatial functions that are included with it, such as the SD buffer function that we used to create our virtual buffer layer in the previous lecture. The actual data itself is more efficient than jeer J signer shape files, as the additional four layers only added 100 kilobytes to the total size. Finally, with Geo package, the initial overhead is only 124 kilobytes, which is much smaller than special light because it doesn't have all the special functions included with each file but adding the other four layers as about 800 kilobytes, just like it did in specially, so do you. A package is more efficient in terms of simply storing data and special eight. However, it doesn't function as a full blown spatial database the way that special light is intended to. It is important to remember that if you have a lot of data that could be created with virtual layers like buffer layers specially can end up being more efficient because you don't have to store all that data toys. It gets created on the fly, for instance, adding one mile. But first of all, the features made the DOJ Son data come out to a total of 11 megabytes and added 4.5 megabytes to radio package, but it wouldn't have added anything to the special light file because of his ability to create them on the fly with the spatial function. So if you do have a lot of large data files and some of those could be created with the virtual layer, it's possible that spatial light might be the most efficient way to store your data. There are a couple of limitations that your packages, as well instead it form cannot include non special tables. And this, in my opinion, is a pretty big shortcoming because it's not unusual at all to have non special data that you want to include that can be joined to spatial stated on the basis of a common field. For instance, all those wrapped the nests and bald eagle nest might have survey results from weekly surveys, and so there might be 52 a year. Of these, several results that are connected to the actual nest data via the Nest I D Field have a geo package specification does allow extensions to the core geo package functionality. There's an extension for non spatial data. I'm not sure if it's supported by Q G I s or not. You also limited to one geometry column for table many spatial databases. You can have several. For instance, you can store both the features, geometry and a buffer in the same table, so it's guaranteed to always have the same attributes. Maybe you want to store the same geometry into different coordinate systems. You could do that without duplicating the entire table in most spatial databases, but not NGO package. Okay, now let's take a look at how to load data from Geo package in Q G. I s three. So probably the easiest way to add data from it to your package is to navigate to the Geo package folder in the browser panel. Certainly looking favorites in the directory where the data for this class is stored and right there have deejay basin, uh, G p K G. That's extension for your package. And if I expand that, I can see all the different layers that are in it. And just like with secret light data, you can click them one by one where you can select a budge, and you can just drag him down or you could right click and say I had selected layers to canvass. There's a number of different ways I'm gonna remove this and show you another way. And that is if we open our data source Manager panel Goodbye. Clicking this button right here. We can also get to it through the layer menu. I'm going to add layer and then come down here to Geo package. Then here we can create a new connection that's gonna give us a dialogue box and letters navigate to the directory where data stored right there is what I want D. J Basin Die Jeep package and click open and then connect. And now again, I have access to all the layers that's in the two year package, and you can select one or two or several layers and then just click OK, and the data shows up. Well, I'm going to eat this again, show you 1/3 way, and that's through the database manager plug in. So here I can highlight to your package right click on it. Oh, have his menu option for a new connection that's gonna ask me which file I want to connect you so I'll just click again. D J. Basin, Dottie Package and Open. And then I have access to all these data files. And again, I could just double click on them and they'll show up in my layers panel. So there's three different ways I currently work and one that doesn't seem to work right now. In the pre production version, I see what we're work. When the actual version three point I was released never be here in a browser panel can right click on Geo Package Cook on New Connection. You have the same dialog box. Select a file that I want to connect to. And now it shows that there's a connection to Deejay Basin Don t package, which is what we want when I try to expand it. I don't actually get to see the individual layers so it can actually add the data to my project. Can I assume that's going to be fixed by the time version 3.0 comes out, but right now it's not working, so we shall see what happens. But there's three other ways that you can access the same data, so it shouldn't be a proper even now. Okay, I wouldn't show you real quick that even if you create this data in Q G, I s in sequel in special light or in a geo package, you can still view the data, at least in our map. Maybe in future versions of art map, you'll be able to edit the data as well. It wouldn't be surprised, especially if you're curious, supports editing data stored in geo packages because it's going to be a standard data source. But in our G i s. If I just click my ad data about and navigate to the folder and have data stored, I can click on this deejay basin dot sequel Light. That's my special light database in RTs recognises it as a database. You can see that, but it's little icon here, so if I double click on that, I can go in and I'll see I have my data layers. So I had a the bald eagle and the burning ally Burdette. And there you can see now you have to be careful a little bit, because in secret light there's a few other tables that are going to be included in all sequel light files, and that's a couple tables that have to do with different spatial reference systems. That sequel they can use in one called Elementary Geometries as well. And so table icon. Let's just know that those are just regular database table. Don't have any geometry associated with him. Now we move these two, and we do the same thing with the Geo package. We grow up, find a deejay base in the Geo package file quick and and there's my five layers. So it's pretty straightforward, at least to view them in RTs. All right, thanks for listening. And the next lecture will talk about how to access data that's stored in a post docs database, and we'll see that. 6. Loading data from PostGIS: Welcome back, students. In this lecture, we're going to talk about loading data from Post es. But first, I'm gonna tell you a little bit about what exactly post G I s is, if you're not familiar with it. The short answer is that post UPS is a spatial extension for the Post Grey sequel database . If you do not know what that is, it's an open source enterprise level database. That means that it's functionally the equivalent of sequel server Oracle or IBM DB two database, which are commercial enterprise data bases. In fact, if you're familiar with our ste probably knows that it's specially enable sequel server or cool or DV two to work in the R curious ecosystem. And our guest EE can also especially enable Post Grady sequel is relative work in the Free World and post Tiesto something similar. But as an open source project that's free to use, I should mention that both sequel Server and Oracle and many other databases have their own special extensions as well. Many of those can be accessed in Q G. I s, but I'm not gonna talk about all of them. Much of what you learned about post Yes, will apply to the others as well. But post yeah, I asked, is the only one that's available for free. To my knowledge, Que gs was originally written to be a viewer and editor for data stored in post G I s and this purse T I s has always been tightly integrated into Q G. I s post Grey sequel is a true client server or enterprise level database. That means it is access via a database connection. By the end of this lecture, you understand what a database connection is and how to create one in Q g. I s. So don't worry if you don't understand the term quite yet. Enterprise data can be located locally on your own computer, and I'll include some bonus lectures at the end of this course that will show you how to install Post T. I s locally on your computer. But more often the actual database will be installed elsewhere, and often that will be on the network server because the real power of an enterprise database is that multiple users can be accessing and editing the date of simultaneously, so there's not much point in keeping it all on your own computer. Oh, that can be useful to help you learn how to use an enterprise database before he implemented on the server. If you want to install Post T I s on your server, your company server, you'll probably want to talk to your IT department. Whoever's in charge of the server about the after questions for you to help them know how to set it up. In the end, they'll give you the information that you need to make the connection. It might also be on a remote server that's access by the Internet. Many Web hosting companies can install post us to your right boasting you count. If you already have a weapon hosting account, you can ask them about installing it on yours. And if you don't already have a Web hosting account and you want one when I recommend one called A to hosting and you can get an account there for about 10 or $12 a month, that will give you access to post T. I s. If you do know that, really appreciate it. If you use the Web address shown here with the referring number because I don't help me a lot, and it won't cost you any more money. A To hosting is one of the few that I found that includes access to post grace equal in post ei ass right out of the box. And that's why I recommend it. With the Web hosting servers, you'll be able to access your data from anywhere other through Q G. I s were through our Web GREs application that you develop now because an enterprise level databases probably not located on your own computer. One of the things that you have to provide when you make the connection is the name of the computer where the data base is located. Now, another thing that enterprise level databases do is a handle user authentication right in the database. And we've talked about sequel late a couple times already, and sequel Late does not do this. It's just a file on your computer. It relies on the operating system of the computer that the secret like databases on to control authentication. You could do that by setting read, write permissions to the file where the secret like databases stored so we will connect to a secret light based database what we had to do was tell Q g. I s what file? We wanted to connect you with an enterprise level database. You need to supply a user name and a password as well. And you can also grant permissions to eat user that allow or deny each user the ability to create new layers, update existing data and delete data. In fact, you can even apply permissions to individual fields. We have very fine, too, in control over what each user is allowed to do. At enterprise level, Database mainly focuses on data storage and access. That data can be accessed by many clients and clients in this case is not referring to a customer or an individual person is referring to a specific software program that understands how to access the data and what to do with the results. In our case, Q G. I s will be the client to geospatial data stored in post docs. Now someone might also be accessing the same data from our G. I s or former Web application or from any other software packages that know how to speak post docs. And usually that access comes in the form of a sequel or a structured query language query if you know sequel and in particular for us. If you know Spatial Sequel, you can query the database and get data back from it and an almost infinite number of variations that makes it very powerful. In addition to data stories, post ups includes over 1000 functions for data conversion and analysis. You've seen one example already in spatial Light lecture where we use the S T buffer function to create buffers on the fly. And you could do the same kind of thing in post shi'ias. You can also change the coordinate reference system on the fly. Perform joins at a modifying new features and many other things. What you can't do is view it on a map where edited visually, and that's why we need Q G. I s so that should give you an idea of the power of post G. I s. And some reasons you might want to use it. Now let's take a look at how you can create a database connection to Post E. I s from within Q G, i s and use it. The view geospatial data that's stored there now because Post ES is a client server database and not a file based database. Like everything else we've seen so far, we can't navigate through it in the browser panel through the computers file system. We actually have to create a database connection, and one way to do that. It's come down to where it says post ups in the browser paddle. If we right click on it will have his option to create a new connection, it's going to give us a dialog box. Could give the connection of name. In this case, I'll call it D J Basin. We also have to give it a host tells QG s where the data base is located in my case is located on my local computer, and so in that case, the name of the host is local host. It might also be a network connection. Or, if it's a database just located out in a Web server someplace, we have to access it through the u R L of your Web hosting service. Now you might also have to give it a port most database software as a standard port for post Grey sequel. That standard port number is 5432 But when you install the database software, you you have the option of changing the port number. That's done just in the rare case where you might have two different pieces of software using the same port number. It's going to create a conflict. The survey will be getting requests through different software to the same port, and the software won't know what to do most of the time and we're working with with Q G i s that puts gonna be 5432 We can have several different databases within Post Grace equal. So you have to tell her which database you want to connect to. And I have one that's called D J Basin. So I'll take that in, and then we have to give it a user name and password. Now, previous versions of Q G. I s We had a screen like this where we just had to re enter the user name in the password and yet the options to store that used name and password in the Queue jazz project file, let me give you a warning and said that those credentials of stories plain text in that project file and that in some cases may not be very secure. If you were to give that project file somebody else that could maybe take a look at it and see what your user name and password work. Then they have access to your database. Thank you. JIA is three. There's another way of doing it. And then what? We're gonna show you now to create an authentication configuration by heading this plus sign And this way, Q G. I s actually stores your user name and password in its own database. You have to provide a name for the set of credentials. So I was gonna say Deejay basin. And then then we'll add a user name, this case mill Imo and the password. You know, I had saved and Cugini s stores that information internally. So the next time, if I want o connect, I can just select this DJ basin. Then you can click this test connection, but to see if kgs is able to make that connection successfully. So cook that says connection to Deejay Basin was successful. So we're good. A couple of options here. You take a look at the one that I think is most important for our purposes. Is this one that I always check also this tables with no geometry Because again, there may be some tables of attributes that you connect the rejoined like, for instance, because they have their survey results that don't have any special data associated with them. But they're connected through a specific nest or boring l appetite. And you won't have access to that in Cugini s. Then you want to make sure that that's check. So when you have all the information that you need for connection, you can just hit, okay? And now we have a connections Name D J Basin. If I expanded, I see we have public. You'll see that most cases, that's the name of the schema. And I'm not gonna get into exactly what that means right now. You look into that on your own if you want. It's more obscure database terminology. When they expand public, I can see all my data layers in here. So it's these five data layers. I can drag them down, or just right click and say that the selected layers. But there it is the same data that we've been looking at this old course, I'm gonna remove all this data and I'll show you another way. And that's through the layer menu se had layer and then we can come down to at post us layer. In this case, we already have a connection. You want to make a new connection? Just give it a different name. Will say D j basing too nan or connect local host again Database. D J Basin. We use a deejay basin, user name and password just like before. See, the connection was successful. Cook OK, and then click the connect button And there we have our data. So again, just like the Geo package of special light, we can just highlight which layers we want and then click OK and also like spatial light or a geo package. We can access it through the database tab db Manager plug in. And in this case, we already have two connections for expand say the second connection DJ Basin to see we have the public schema within that we have our database layers and we can double cook these and we can take a look at the field that air in there. Some other information in the database. I can see what privileges air available to me With the log in information that I provided to the database, we can see all the attribute data in the table. We can preview the data if I double click on one of C gets added to the map canvas. We can also right click on here and click. Add to canvass. And just like with special light can write sequel queries to that. Create virtual layers. Did you spend a lot more time with this? Later on? We've already seen how do that in specially and it would be done the same way in post your Yes. So there you have it. Multiple ways of accessing a spatial data in post G. I s. So thanks for listening. In the next lecture, we'll talk about some of the different options for background maps that are available in Q G s and we'll see you then. 7. Background maps from the OpenLayers Plugin: Welcome back, students in this structure. We're going talk about some of the background maps that are available, and I'm gonna open up this overview map that you guys should all have available. And it's the same day that we've been looking at. But it's kind of playing we really see is inspector data and colors and doesn't really give us an idea of the spatial context of what we're looking at and where we are. So so the background mappers for interview used every in the past 10 years. You should be familiar with ease. So in q G, I s were going to use a plug in to look at some of the background mapped, and this is the first plug in that we've actually installed. So show you how to do that. We'll go to the plug ins menu managing install plug ins, and I'm going to scroll down to get to the one called open Layers. All right, there it is, open layers. Plug in. Highlight that. Well, see, it's got over a 1,000,000 downloads. Then he's got 4.5 stars out of 1000 reading, so you feel pretty good about installing it even says right up here. This plug in distrusted so I got to do is quickly its in store plug in button. You need an Internet connection to do this, by the way, because that's going out to the Internet now and downloading the plug in. And there we have it so close. And now if I go to the Web menu, see you having open there is plugging option, and this gives me options for a number of maps. A bunch, actually. Let's start with open street map. See down here. This little bar sure is that something's happening. This causes going out to open street maps and downloading these map tiles, and it placed it on top by the false. They were dragged down here to the bottom so we can see our data on top of it. But now I have to Spatial context, we can see is a highway here. Those rivers and lakes park free. Zoom in a little bit. It's gonna take a little bit because it's downloading more tiles. But resume in a little bit. We could see the roads and everything else, so that's pretty cool. Another cool thing that we can actually load the aerial photography from Google Maps. Now we get a warning Year says that printing is not permitted with Google Maps, and that has to do with the Google maps. The licensing Now, we didn't get anything we might have to with Google Maps. Yeah, I think we probably have to set the A P I key. So I'm just gonna page mine in there like that, and I should be able to get this aerial imagery from Google so you can get Google imagery in the background, too. You can also get big imagery being roadmaps. A statement has won this kind of interesting called the watercolor map, and that just creates a map with kind of, ah, artsy feel to it. Water cover tones. You probably don't want to send a client a map with this is the background, but maybe for the cover of a report or something like that might be a good option. So there's a bunch of you can play with in the open layers plug in, and it occurred to you to take a look at him on your own, do some exploring. Maybe you'll find something you like. Keep in mind that some of mitt World ask you for an A P I key, and you can get those a p I keys for free if you go to the Google Maps website are being website. But what you put in a P I key in there they knew who you are in the track. Where to use. If you use too much, you might get a bill. Get to a point where you don't get any service. Well, you might have to give credit card and they'll bill you. And usually it's not very much at all, but a few creating are meant that a lot of people are gonna be using may be better off going with open street maps or some other source of data. It doesn't have fees associated with it. Now there's another map service Plug in is well called quick map services that will also have some additional data, so you don't want to play with that one as well. You may have noticed that I've been doing this lecture in Q Jazz 2.18 That's because this plug in was not available in 3.0 in the previous version that I've been using to do this course, but I believe it will be available, and it would probably look almost identical. And if you're hearing me, say this, that's the case, because otherwise that would have come back and re recorded this lecture. Then you have the next lecture. We'll talk a little bit more about tiled map services in general and show you how you can access pretty much any tiled map service. It's out there. If you know that, right you are l A. To point at it and have the purple log in credentials. Okonjo background map from pretty much anywhere, including are curious online, So we're seeing the next lecture. 8. Background maps as XYZ tiles: Welcome back, students. In this lecture, we're gonna look a little bit closer at tiled map surfaces. If you've used every product, you're probably used to calling these background maps in the previous lecture, I should you have access them through a plug in. It's a common theme in Q G. I s that the details are not hidden from you as they sometimes are. Innocuous s most things you can access through a menu. But if you really understand how things work, you can usually do things directly in Q g. I s That may be a little intimidating at first, but trust me, there's really nothing to be afraid of. In fact, you may find that you end up really appreciating the flexibility that this provides So tiled map services air generally access via the Internet, but not necessarily. They could also be local on your computer as well or on a network server. In that case, you have to create the tiles yourself a little bit later. In this course, we talk about how that's done, but for right now we're going to focus on using them. So with the tiled map service, the entire world is broken down into small images, usually but not always 256 by 256 pixels, and each one of those images is called a tile, and there's a different set of tiles for each zoom level. For example, the area of the world occupied by this image might be a single tile, as in Level seven, but four tiles, as in level eight 16 tiles is in level nine and 64 tiles at Zoom Level 10 so you can see more and more detail as you zoom in. But it doesn't take more time to download from the Internet because it every zoom level, you're only downloading the tiles that are needed to see the part of the role that's visible in your map canvas. Instead of downloading your very large raster image, that might be several gigabytes in size and take hours to download, and this works very well. This is the way that Google maps another Web based mapping software. It works. That's why they can have worldwide coverage and still be very quick to load now. I said that they were usually accessed over the Internet, and usually if you look into the documentation for any of these maps services, you'll find a your l've it looks something like this. The first part is a normal U R L pointing to a Web server somewhere. Then we see these slashes with Z and X and a Y in college brackets. That's because the tiles are organized into directory by zoom level that Z then the X coordinate of the tile grid. And finally, in each of these directories is an individual image file whose name is the Y. Coordinate with a PNG extension, and so with a tiled map service. If skewed ES needs to load the tile outlined in red, it would replace the X Y and Z values with the zoom level X coordinate and like ordinate of a tile and the actual you are ill would be something like this. We'll be looking for a file called three dot PNG, The directory named three That's inside a directory named 10 Right, so 10 is a zoom. Level three is the X co ordinate, and then three is also Why could win in this case. But don't get too hung up on our service. Just a little bit of back grounds on you understand how these things work and whether called X Y and Z tiles and Q g I s so inside Cugini s 3.0, you see in your browser panel at the very bottom haven't entry called X Y and Z tiles. And if you right click on that and click new Connection, we'll get this dialog box. But all you really need in here is a name for the tiled map service. We'll call this one open street maps and then the u R L. This points us to a Web server and the open street map site and just like we explained as Z X and Y parameters and curly brackets and those will get replaced. But we don't have to worry about anything about that. We just have to know that you are l for the open street map service. And then if I click OK, see now we have his option for open street map. It's a name that we gave it under the X Y Z tiles entry in the browser panel. Now I'm gonna load this overview map it recreated, and then just by clicking on open street map it loads it into the directory and again, I know drag it down so that it's underneath all the other record data. And now you might be saying to yourself, We just did that using the open layers, plugging. So what's the big deal? Well, you can get open street map through the open layers plug in, but there's a lot of map services out there, and not all of all of them are available for that plug in. So, for instance, I'm gonna add another one here, and this one's gonna be called open topo map. And then I'm gonna pasty you, Ellen, Here, you can Paul's and write that down if you want. When I cook. Okay, see, we have open topo map. If I click on that, it gets added to the map. You know, have the open topo map. If you zoom in a little bit closer, we'll see more of the top Our lines. Now these maps, like I said, I'd be loaded over the Internet. Thank you, JIA, as a smart interview, some cash ings There is not going out and getting new titles every single time. But you do you have to be careful about using up a lot of bandwidth, so you probably don't want to end up having more than one background later. May be, too, but at least turn off if you're not using it, turn this background. They're off, and now I'll show you another one so that open topo map is not available through the open layers. Plug in. But it's a really handy layer tohave. I know it doesn't look like much in this example because this area is relatively flat. But if you and mountainous terrain the topo maps really useful information tohave. Now let's take a look at another one. I'll go back right click on X y Z tiles, tape, New connection and this one granduncle isra imagery and just screw over so he can take that in if you want to. But this is really handy to have, and it's unlike Google, Maps doesn't have any restrictions on its use. As far as I know, it doesn't require an A P I key or anything else. So there's a lot of these maps services out there that we could put in here just gonna do one more. It's called Spinal Map and its messages for fun turn off the every imagery. And then I had the spinal map, and this one comes from thunder map. And Clinton map does require that you have a navy ikey. If you don't have an A P I key, you can still see the map to see if you like it. So this is kind of a heavy metal rock and roll theme map, but it's going to give you tiles that say a P I key required. So you wouldn't want to use this on a production map, of course, but you can only see if you like that theme. All right, that's it for tiled map services. The next lecture, you will look at just loading arrested G I s layer and we'll see you then. 9. Loading raster data: Welcome back. Students in this lecture gonna load some raster data. This is gonna be a really short lecture because loading Rafter data is really simple. There's basically two ways one is to go through the browser panel. I'm gonna go to my favorites menu, then find the directory where the data for this course it is and anything that qg as recognizes as a valid raster layer is going to share with this kind of checkerboard icon here. And so I could just double click this altitude to and that's gonna add in Ah, arrester image. Yeah, I happen to know where this is. But if you weren't sure because you have background maps now, we could just go down here and add in the open street map layer. They never zoom out. I can see that we're looking at Syria in Western Africa. Can it happen? Have this data because I told of course, on soils mapping with Cugini s this past summer. So yeah, the other way that you can load raster layer is to open the data source manager other by clicking this button or you can go to layer, add there and then had Rastra mayor again. That just opens the the data Swiss manager panel. Then you just gotta open. Look for a file. In this case, let me get one card Hille sheet, and then I'll cook. Okay, And there's my whole sheet map, so it's literally that simple. You just pointed to any kind of file the Cugini s recognizes as a raster, which is pretty much everything and loaded onto you met. So thanks for listening. The next lecture, I'm gonna show you how to do your reference a raster image, and we'll see you then. 10. Georeferencing a raster: Hello and welcome back, students This election, I'm gonna show you how to do your reference. An image in Q GREs, three point. Oh, if you're not familiar with the term to your referencing, it refers to the process of adding spatial reference information to an image file. So the G s software knows where to place it in space. Now, this used to be called rubber sheeting because the process was analogous to taking a map that was printed on a stretchable rubber sheet and stretching it so that points on this sheet can be pin to comment identifiable points on the underlying map. I don't know if people actually did this with actual rubber sheets, but it wouldn't surprise me because I know people who actually did over the analysis with different layers on sheets of transparent miler just placing them on top of one another. And this was back in the sixties, nearly seventies, before they were inexpensive computers and any kind of commercial G. I s software. So it's just a reminder of how good we have it with modern G. I s software, because today we just need to find some points that can be identified on both the image and on some G. I s data that we can use to find the coordinate of the point. And usually you want to have at least four points. The spacing of those points is important. Generally you want to get him is close to the four corners as possible. Maybe if it's a large area, you might want to add a couple in the center of the map as well. But what you definitely don't want is to have your points lined up in a line because in that case, a little bit of distortion can cause a whole lot of error. So you want to get your points out in the corner as much as you can. This process can actually get fairly complicated. We're not going to get very deep into the weeds of what kind of transformation you want to use. Possibly. If you've done a lot of this before, you probably know more about it than I do. I'm just going to show you the simplest way possible. No, but I've done this with our G i s before, but it would do is load an image file so that I have to go to a place in the map that was already to your referenced. Find a spot that I could identify on the image that I was trying to add. You're referencing information to click on that point in the map and then zoom to the image , find a place on the image, click on it and do that until I had enough points to do the gear referencing. And it looks a little bit different in future Area says you'll see, and it's possible that you could do it the same way in our G I s. I'm not sure. And you might be other ways to do it in Q. Two years. I'm not sure about that. I ever. Like I said, I'm just trying to show you the easiest way possible. And there might be another plugging that somebody's written Teoh do something similar to the way we did it in our G I s. I actually don't mind the way we study in Q g. I s in some ways easier, even though it's a little bit more typing. But to help us think about why we want to do this, I'm going to set up an example. Use case. Suppose you get an email from a client with an image attached, some scribbling on it, asking you to serve a piece of land for potential environmental constraints. And you wouldn't put that image that they've attached with the scribbling on it and make a map for it that you can give to your field personnel to take with them out in the field when they do the survey. But you need to put that image in the larger spatial context so they know how to get there , what roads to take to find the land, etcetera. So let's go to qg as 3.0, I've already got some data loaded and I've got this open street map as a background we're gonna do is we'll go to the raster menu. In the rest of sub menu is a geo reference er selection. It will just go And could your reference. I've already got a file in there from previous work. This isn't the file that we wanted, though, so I'm gonna go to file, say, open raster and then it already opens up in our data file. But you can navigate wherever you want, and I'm gonna find this image. It's called new compressor station dot PNG And then I have to pick the coordinate reference system that we're gonna put it into its deputy s 84. And there's the image. Now, this little red box is the piece of property that the client wants to build a new compressor station on. And this is their that they want us to survey just to make it easy for me. When I created this image, I went ahead and created four points and each one of those points zoom into this one each one of those points as a label with the latitude and longitude. And it's highly unusual that you'd get this information right from the client. Chances are they would just give you the image, and you'd have to ask them Or is it? And they tell you and you get into your G i s and go find that area and find some places in your G I s that you can identify on the image that they gave you and then right down the coordinates for those locations. Like I said, I'm trying to keep it simple. So the first thing I want to do is add these control points and so, you know, tool Boy at the top have this one buttons, his add points. That's a control point. So it's going to give me a cursor, and I'm going to go right to the middle of that point there, and it's gonna ask me to enter the map coordinates Well, in the X coordinate, that's longitude one off. Negative. One of four point eight for 582 And that dude, 40.18 through 97 and then click. OK, you can see down here, George is a table, each one of the points. Then I'm going to zoom out, paying the map over to this other point. Zoom in on it, click my head point tool again. Great to the middle of it. And same thing. Enter the longitude in the latitude and click. Ok, then I'm gonna zoom out again. Do me into this other point. Come back to my point tool into the longitude and latitude and okay, that looks like a problem. This residual value. Show me the air and pixels and that should be only one or two pixels. See what I did. Somehow I got negative. I got 1 94 and it should be negative. 104 Let me change and see what happens. There we go. That's better. So now the error is less than one pixel. That's pretty good. All right. And zoom in on this last point. Cook my at 0.2 again. Interval longitude in the latitude. Quick. Okay, I'm still mostly under one pixel. I have one just a little bit more. It's not a big deal for our purposes, so I got four points. Now I'm going to click this start. You're referencing. You're gonna ask me what? The quote it reference system is going to be on a stick with W. G S 84 and there we did it. We see it, Put it someplace in space. Were checking a minute to see if it's right. But first, I wouldn't show you under this set up, you can change a couple of these transformation settings. Go from a linear too. Uh, probably normal transformations. You can change the re sampling method again. This is all complicated stuff, and you can give it an output restaurant if you want to create an output file for the geo referenced image you see down here? Yeah, loading Cugini s when done. And since that rejected. Put it right in Q. G s. So when it closes to your reference er panel and because they discard the DCP points, we have our image, right there it is. If I zoom into it, zoomed to layer, I assume out just a little bit. Let's see how we did Or were you pretty good? The's railroad lines up really close. This railroad lines up really close from the river lines up here, river lines up here and here. So really good job the images in the right place. I mean, you could do a little bit better if we do been a little bit more careful. But for demonstration purposes, this is pretty good. So, you know, I can create a map showing my fuel stare of how to get there. If I wanted, I could go ahead and digitize this into its own separate shape files. It would actually be a poly on, and not just the red line on the deer referenced image. And that's how it's done. Now. I wanted to show you one thing. Go quick beforehand this lecture and I won't explain exactly what happened when we did the deer referencing. I want to go to the directory. Were our data was stored. You see, this was a new compressor station that PNG And what happened when we did the GM referencing was it created this file called New compressor station dot w L d. That's called a world file. And if I open that, you'll see that all that world file is is six numbers the vast to members of the latitude and longitude, I believe, of the upper left corner of one of the corners and then these two values of the dimensions of the pixels and units of the special reference system, which in this case is degrees of latitude and longitude. Then these other two numbers have to do with scaling and rotation of some degree. The original image was rotated a little bit. That number might get a value, but our image was lined up exactly with the rows of large student attitude. So those numbers get us here. But that's all the world finally is. That's all that Cugini s needs to know to place that image on the map. And as long as there's a world file with same name as the image, Js will open that when it opens the image and put it in the right place. But one thing you'll notice is that nowhere in this information is there anything that refers to any kind of coordinate reference system. So when you open this huge as they're still gonna ask you what the coordinate reference system of this images and you'll tell it's wds 84 then q t s will know what it needs to put in the right place on the map. Thanks for listening. This was the last lecture in the section on loading data into Q G. I s licks. Lecture is gonna be the beginning of a new section on attributes and we'll see you then.