When you load up a new map, everything is blank...lets get something to start with
Initially, QGIS only has a single basemap to work with, let's add it!
In your browser pane, find XYZ Tiles and click the down arrow to find the Open Street Map basemap. Click and drag it into your layers box, and it will appear on the map.
There are lots of different options for loading basemaps, but first you have to connect them to your project from their hosted locations online (or self host). Here's a fast way to get a bunch of standard basemaps though, thanks to Klas Karlsson (one of the main qgis devs)!
1) Download the python script below and open it in a text editor (e.g. notepad).
2) Open up the Python console in QGIS by going to Plugins-->Python Console
3) Copy the python script into the editor and press enter.
4) Enjoy all your basemaps! Thanks Karl!
What if you want to load your own georeferenced map, like one from MapWarper? Easy enough!
1) Right-click on XYZ and select "New Connection"
2) Look back at your mapwarper project page and choose the Tiles URL (the same one you use with ArcGIS online or Knightlab Storymaps
3) Name your connection and you should be good to go!
Finally, what about importing a local raster file, whether its a georeferenced historical map, a Digital Elevation Model, or some other raster. Even easier!
1) Make sure you know where the file is hosted on your computer, or download the file from the internet (Like with the rectified GeoTiff from Mapwarper)
2) In the main toolbar, go to Layer --->Add Layer-->Add Raster Layer
3) In the Source section, click the "..." and navigate to your saved georeferenced raster as your raster dataset, open it up, and click "Add" to add it to your map.
It may look the same, but this map is locally hosted!
That's it for the basics of adding rasters and basemaps to QGIS!
QGIS is a powerful open-source Geographic Information System platform with a bit of a learning curve...
QGIS (and its assoicate ArcGIS Pro/Desktop) are powerful tools used for a wide variety of purposes across many fields. And GIS in general is a huge subject, with entire degrees/certificate programs devoted to it. As such, we will barely scratch the surface in this workshop, but by the end you will be able to:
Search for and add pre-created basemaps;
Add your own georeferenced raster data;
Import basic vector datasets from csvs, shapefiles, and geojsons;
Create a new vector dataset from scratch;
Perform some basic styling of data;
Prepare your data for export.
That's a lot....lets get started!
For those interested in diving deeper, I highly reccomend reading the thorough QGIS Handbook; much of the below is taken from there and the step-by-step Training Manual. Links to specific parts of the handbook are referenced above.
Lines, Points, and Polygons
Ok, we've got a background map, now what about vector data?
Adding vector data depends on what kind of format your data is in. Let's run through the standard three types.
To add CSV data to the map, go to Layer-->Add Layer --> Add Delimited Text Layer
Here I've selected a csv of all the places mentioned in a Jesuit Catalogue (about 30000)
And there you go!
Shapefiles are a very common file type for individaul spatial data layers and can be downloaded from spatial database sites like BostonMaps. To import a shapefile into QGIS:
1) Go to Layers-->Add Layer-->Vector Layer
2) Select your ZIPPED folder containing your shapefile as the file to be imported, and click Add!
And your shapefile (in this case polygons representing the open, public spaces of Boston, is added to the map!
GeoJson files are imported the same way as Shapefiles, though no need to zip since its just one file!
Up to now, we've been adding other people's data, or data we have generated in a spreadsheet....what if we want to creat our own data from scratch inside QGIS?
Instead of Adding a Layer, we Create a new one!
When making a new vector layer from scratch, you define its type and attributes similar to how you would in a spreadsheet.
Here I've created a Point shapefile called "Cities". To start adding to it, I just right-click and toggle editing on!
When editing is on, the small editing toolbar will become accessible
From left to right the tools are:
Current Edits allows you to manage your editing session. Here you can save and rollback edits for one or more selected layers.
Toggle Editing provides an additional means of beginning or ending an editing session for a selected layer.
Save Layer Edits allows you to save edits for the selected layer(s) during an editing session.
The Add Features tool will change to the appropriate geometry depending on whether a point, line or polygon layer is selected. Points and vertices of lines and polygons are created by left clicking. To complete a line or polygon feature right click. After adding a feature you will be prompted to enter the attributes.
Features can be moved with the Move Tool by clicking them and dragging them to the new position. Individual feature vertices can be moved with the Node Tool. Click on a feature once with the tool to select it, the vertices will change to red boxes. Click again on an individual vertex to select it. The selected vertex will turn to a dark blue box. From there the vertex can be moved to the desired location. Additionally, edges between vertices can be selected and moved. To add vertices to a feature, simply double click on the edge where you want the vertex to be added. Selected vertices can be deleted by clicking the Delete key on the keyboard. Features can be deleted, cut, copied and pasted with the Delete Selected, Cut Features, Copy Features, and Paste Features.
After clicking to create a new Feature, a box to fill in the attributes you've chosen will appear. Below are the attributes for my pretend Cities shapefile.
You can access and edit all the attributes from your current shapefile by right clicking the name of your layer and selecting Open Attribute Table.
Now your data is in....how to make it look good?
Let's look at different ways to style your data using some archaeological data from the site of Gabii originally imported as a .geojson.
When initially imported, all the polygons are red with a black outline, which gives us some general information about the location but doesn't really differentiate the different kinds of archaeological features present. To do that, we need to change our styling.
To get to the styling options (also called Symbology), just double click the layer name in your Layers pane.
Here you can select how you want your features to be styled; the default is "Single Symbol" but often times you will want Categorized, or for quantitative attibutes, Graduated, ways of displaying your features. For now, let's select Categorized.
When stylizing by category, you can select which Attribute(s) you want to stylize by; I'm going to select the Descriptio(n) field because that's the different types of features in my layer.
Once you've picked your attribute, clicking "Classify" at the bottom of the box will assign an initial style to each of your features.
Each feature type is now a different color! You could further customize each individual style if you wanted on the symbology page.
Or, here I have made the color of the outline of the feature change, rather than the fill, in order to make the map more understandable.
Lots can be done with symbology; feel free to explore!
Exporting your figure to share with others or for publication is often the final product for your QGIS map. Here we talk about the basics.
So far we have been working in what I call "Data View" where you can create, edit, and generally mess with your data. Now we are going to look at Print Layout, which allows you to organize your map for publication.
To access print layout, go to Project-->New Print Layout. A box will appear asking for you to name the layout (useful if you are creating mulitiple figures, for example).
A new window will appear that lets you create your layout, almost like working in a word document.
The left toolbar is your friend, allowing you to add map windows to the figure, as well as things like maps, north arrows, titles, legends, and other labels.
Each time you add a feature, it will appear in what is basically the "Layers" sidebar of your print layout, allowing you to further edit its properties. Above I've quickly added a scale bar, north arrow, and legend to the map.
When it looks good, you can export the figure! My figure below is a .tiff