Digitizing is one of the most common tasks that a GIS Specialist has to do. Often a large amount of GIS time is spent in digitizing raster data to create vector layers that you use in your analysis. QGIS has powerful on-screen digitizing and editing capabilities that we will explore in this tutorial.
We will use a raster topographic map and create several vector layers representing features around a park.
Land Information New Zealand (LINZ) provides raster topographic maps at 1:50,000 scale for the New Zealand mainland and Chatham Islands.
Download the GeoTIFF Image file from the Christchurch Topo50 map download page.
For convenience, you may directly download a copy of the dataset from the link below:
Data Source [LINZ]
BX24_GeoTifv1-02.tif
and click Open.BX24_GeoTifv1-02
layer
and choose Properties.Ctrl
key and select all
the resolutios offered in the Resolutions panel. Leave other
options to defaults and click Build pyramids. Once the process
finishes, click OK.nztopo.sqlite
. Choose
the Layer name as Roads
and select Line
as the
Type. The base topographic map is in the
EPSG:2193 - NZGD 2000
CRS, so we can select
the same for our roads layer. Check the Create an
autoincrementing primary key box. This will create a field called pkuid
in the attribute table and assign a unique numeric id automatically to each
feature. When creating a GIS layer, you must decide on the attributes that
each feature will have. Since this is a roads layer, we will have 2 basic
attributes - Name and Class. Enter Name
as the Name
of the attribute in the New attribute section and click
Add to attribute list.Class
of the type Text data.
Click OK.Note
You can use the scroll wheel of the mouse to zoom in or out while digitizing. You can also hold the scroll button and move the mouse to pan around.
Roads
layer and select Properties.Delete
key.
(Option+Delete
on a mac)nztopo.sqlite
database from the dropdown list. Name the new layer as
Parks
. Select Polygon
as the Type. Create a new
attribute called Name
. Click OK.Parks
layer.Buildings
by going to .Buildings
layer is added, turn off the Parks
and Roads
layer so the base topo map is visible. Select the Buildings
layer and
click Toggle Editing.Most GIS projects require georeferencing some raster data. Georeferencing is the process of assigning real-world coordinates to each pixel of the raster. Many times these coordinates are obtained by doing field surveys - collecting coordinates with a GPS device for few easily identifiable features in the image or map. In some cases, where you are looking to digitize scanned maps, you can obtain the coordinates from the markings on the map image itself. Using these sample coordinates or GCPs ( Ground Control Points ), the image is warped and made to fit within the chosen coordinate system. In this tutorial I will discuss the concepts, strategies and tools within QGIS to achieve a high accuracy georeferencing.
This tutorial is to geo-reference an image which has coordinates information available on the map image itself (i.e. grids with labels). If your source image does not have such information, you can use the method outlined in the next tutorial
We will use a scanned map of southern India from 1870 and geo-reference it using QGIS.
Hipkiss’s Scanned Old Maps website has an excellent collection out-of-copyright scanned maps that one can use for research.
Download the 1870 map of southern India and save it as a JPG image on your hard drive.
For convenience, you may directly download a copy of the dataset from the link below:
1. Georeferencing in QGIS is done via the Georeferencer GDAL plugin. Modern versions of QGIS have all the features of this plugin included by default, so you can skip this instruction and go to the step 2. However, if the menu option mentioned in the next step is missing, then you can follow this instruction. Georeferencer GDAL is a core plugin - meaning it is already part of your QGIS installation. You just need to enable it. Go to Georeferencer GDAL plugin in the Installed tab. See Using Plugins for more details on how to work with plugins.
and enable thePolynomial 2
. See QGIS Documentation to learn about different transofrmation types and their uses. Click Select CRS button next to Target SRS.everest
and select the CRS with oldest definition of the Everest datum (EPSG:4042). Click OK.Note
Survey of India Topo Sheets created between the year 1960 and 2000 use the Everest 1956 spheroid and India_nepal datum. If you are georeferencing SOI Topo Sheets, , you can define a Custom CRS in QGIS with the following paramters and use it in this step. This definition includes a delta_x, delta_y and delta_z parameters for transforming this datum to WGS84. See this page for more information on the Indian Grid System.
+proj=longlat +a=6377301.243 +b=6356100.2284 +towgs84=295,736,257,0,0,0,0 +no_defs
Note
Most maps are created using a Projected CRS. If the map you are trying to georeference uses a projected CRS that you know of, but the graticules labels are in a Geographic CRS (latitude/longitude), you may use an alternate workflow to minimize distortion. Instead of using a Geographic CRS like we are using here, you can create a vector grid in QGIS and transform it to the projected CRS to be used as a reference for accurate coordinate capture. See this page for more details.
1870_southern_india_modified.tif
. Choose LZW
as the Compression. Make sure the Load in QGIS when done option is checked. CLick OK.Note
Uncompressed GeoTIFF files can be very large in size. So compressing them is always a good idea. You can learn more about different TIFF compression options (LZW, PACKBITS or DEFLATE) in this article.
13 . In the pop-up window, enter the coordinates. Remember that X=longitude and Y=latitude. Click OK.
Polynomial 2
transform requires at least 6 GCPs.dX
, dY
and Residual
error values. If a particular GCP has unusually high error values, that
usually means a human-error in entering the coordinate values. So you
can delete that GCP and capture it again. You can also edit the
coordinate values in the GCP Table by clicking the cell in either Dest. X or Dest. Y columns. Once you are satisfied with the GCPs, go to . This will start the process of warping the image using the GCPs and creating the target raster.Note
The GCPs will also be displayed in the main QGIS Canvas. If you wish to remove them, you can switch to the Georeferencer window, and choose .
In the previous tutorial we covered the basic process of georeferencing in QGIS. That method involved reading the coordinates from your scanned map and entering them manually as control points. Many times though you may not have the coordinates printed on your map, or you are trying to georeference an image. In that case, you can use another georeferenced data-source as your input. In this tutorial, you will learn how to use existing open data sources in your georeferencing process.
We will georeference high resolution balloon-imagery using reference coordinates from OpenStreetMap.
In this tutorial, we will be using kite and balloon imagery collected by The Public Laboratory. They make the georeferenced versions of the images also available, but we will download a non-georeferenced JPG image and go through the process of georeferencing it in QGIS.
Download the JPG image of Washington Square Park, New York. You can right-click the JPG button and choose Save link as....
For convenience, you may directly download a copy of the dataset from the link below:
OpenStreetMap
layer under XYZ Tiles in the Browser Panel.
Drag the layer to the main canvas. Once loaded, note the Coordinate
Reference System (CRS) for this layer in the bottom-right corder. It is
set as EPSG 3857 Pseudo Mercator
. This is important because the coordinates we infer from this layer during georeferencing will be in this CRS.Note
See this page for more details on XYZ layers and how to add other basemaps in QGIS.
Washington Square Park, New York
.
You can zoom/pan try to locate this park in the map. But that is
cumbersome and may not be practical. An easier way is to use the
OpenStreetMap (OSM) Place Search plugin to search for the exact
location. Install the OSM Place Search
plugin from . If you do not see this plugin in the search results, make sure you have checked Also show experimental plugins under Settings. See Using Plugins for more information on using plugins in QGIS.Washington Square Park
in the Name contains.. box and click ->. You will see the matching place names appear in the results panel. Select the correct result and click the Zoom button.Polynomial 2
. See QGIS Documentation to learn about different transofrmation types and their uses. As noted earlier, our basemap is in EPSG 3857 Pseudo Mercator
CRS, so set that as the Target CRS. You can leave the Output raster name to the default and choose LZW
as the Compression. Check the Use 0 for transparency when needed. Make sure the Load in QGIS when done option is checked. CLick OK.Note
Tip: When selecting a GCP on a building, always choose the bottom of the building. Many aerial and satellite imagery have leaning buildings, so choosing a point on the rooftop will introduce errors.
dX
, dY
and Residual
error values. If a particular GCP has unusually high error values, that
usually means a human-error in entering the coordinate values. So you
can delete that GCP and capture it again.255
as the Additional no data value and click OK.Note
8-bit images have pixel values in the range 0-255. 0 is black and 255 is white.
Many times the GIS data comes in a table or an Excel spreadsheet. Also, if you have a list lat/long coordinates, you can easily import this data in your GIS project.
We will be importing a text file of earthquake data to QGIS.
NOAA’s National Geophysical Data Center produces a great dataset of all significant earthquakes since 2150 BC. Learn more.
Download Significant Earthquake Database text file.
For convenience, you may directly download a copy of both the datasets from the links below:
Data Source [NGDC]
Ctrl + L
keyboard shortcut.LONGITUDE
and LATITUDE
. You may change it if the import selects the wrong fields. You can leave the Geometry CRS to the default EPSG:4326 WGS84
CRS. If your file contained coordinates in a different CRS, you can select the appropriate CRS here. Click OK.Note
It is easy to confuse X and Y coordinates. Latitude specifies the north-south position of a point and hence it is a Y coordinate. Similarly Longitude specifies the east-west position of a point and it is a X coordinate.
signif
.The purpose of the task is to get experience of the tools for editing vector data in QGIS. There are two subtasks. The first is to digitize new features from an ortophoto, the second is to create a new layer using the accidents data.
Launch QGIS and open the map from this zip-archive. Select "SWEREF99/RT90 2.5 gon V emulation" CRS for the project and for all layers (please refer to instruction in the Lab 1 assignment). You will see an ortophoto covering the areas around Campus Norrköping, a vector layer and a polygon layer showing the outlines of the study area. The task is to create three new vector layers showing water areas (polygons), trees (points) and streets (lines) in the study area.
Instructions for subtask 1
Create a new polyline layer and fill in the name street centerlines
and add an attribute name
. Create another layer in the same way with feature type point and the name trees
and finally a third polygon layer with the name water
.
Select the tree layer, zoom into the ortophoto to find the positions of the trees and enter a point in each center as accurate as possible. Digitize most of the trees that you see in the image. Continue by selecting the water layer and trace the borderlines of the different water sections as accurate as possible (zoom in). You should trace several different polygons separated by bridges and dams. You will find that it is difficult to see the shorelines in the image for your help you can use the existing line layer as support.
Tip
Maximize the QGIS window when you work and zoom in so you get high accurracy.
Use lines to draw streets. Street segments must start and stop in crossings. Use the snapping tool to connect the segments in crossings. Enter street names according to the rastermap in the table.
Instructions for subtask 2
Import the table road_accidents
from the data to the view and convert the table to a point layer. A new layer should be created in the top of the table of content. Symbolize it as you see fit.
Report Make a report that describes the home assignment in the usual way. Create a map layout with a map (select an appropriate scale) together with the traditional layout elements. The map must show the three layers that you have created by digitizing and also the symbolized traffic accidents. The street names must also be added on the map but the ortophoto should not be visible.