Coordinate reference systems
- 1 Introduction
- 2 Background
- 3 Project CRS
- 4 Layer CRS
- 5 Useful links
Coordinate reference systems allow each part of the Earth's surface to be defined by a set of three numbers, called coordinates. There are many different coordinate reference systems, which are each relevant to a specific area of the Earth (either local, regional or global). QGIS supports approximately 7000 coordinate reference systems. When working with geospatial data it is therefore important to have a good understanding of coordinate reference systems so that you can make sure that you are working with the correct one (the screenshots below show an extreme case of what can happen if you use the wrong one!).
In QGIS there are two main things that you should be familiar with related to the coordinate reference system (CRS): project CRS and layer CRS. This tutorial will provide a basic introduction to these two. For more information on coordinate reference systems, check out the useful links at the bottom of the page.
To ensure that it is possible to identify each coordinate reference system, EPSG codes are used. An EPSG code consists of 4-5 digits, which is linked to a definition that uniquely describes a specific coordinate reference system.
Common EPSG codes
- WGS 84: global system based on the Earth's centre of mass (used by GPS)
- Web Mercator projection: global system used by many web-based mapping tools (e.g. Google & OpenStreetMap)
- International Terrestrial Reference Frame 2014 (ITRF2014): global, Earth-fixed system, independent of continental drift
EPSG codes for the Netherlands
- Amersfoort / RD New: projected CRS of the Netherlands (unit: meters) (2D)
- Amersfoort / RD New: projected CRS of the Netherlands + NAP height in meters (3D)
Types of CRS
There are two types of coordinate reference system: geographic and cartesian. This section will briefly explain the difference between the two. See this page for a more detailed explanation.
Geographic coordinate reference systems
Geographic coordinate systems define where spatial data is located on the Earth's surface. Since the Earth is spherical, the coordinates are defined using degrees of latitude and longitude. Each geographic coordinate system uses an approximate model of the Earth's surface to construct lines of latitude and longitude. This model is chosen so that it fits best with the area for which the coordinate system is intended to be used. Keep in mind that, as a result, this means that a point on Earth can have very different coordinates depending on which geographic coordinate system is used.
Cartesian coordinate reference systems
Cartesian coordinate systems (also known as projected coordinate systems) define how to draw spatial data on a flat surface, such as a map or the interface of QGIS. Cartesian coordinate systems define coordinates in meters (or another linear unit). A cartesian coordinate system is always based on a geographic coordinate system that has been flattened using a map projection. The map projection defines how the Earth's surface should be distorted so that it can be transformed from 3D to 2D. There are many different types of map projection. Each one is best suited to a particular part of the Earth and causes the least deformation in that area.
Each project you open in QGIS has a coordinate reference system associated with it. This is called the project CRS. The project CRS determines how the data you add to a project is displayed on the map canvas. You can view the project CRS in the bottom right corner of the screen.
When you open a new project, the project CRS is set to WGS84 (EPSG:4326) by default. When you add your first layer to an empty project, the project CRS will be automatically changed to match the CRS of the data that you have imported. If this is not the case then you can change the default settings by navigating to(Windows) / (Mac) and selecting the CRS tab in the window that opens. The choice to "use CRS from first layer added" is under the CRS for projects section.
Changing the project CRS
You can change the project CRS by following these simple steps:
Step 1: Click on the EPSG code in the bottom right corner of the QGIS interface.
Step 2: Search for a CRS in the search box using either its name or EPSG code.
Step 3: Select the CRS from the list of results. Make sure that you select the one with the correct EPSG code, many coordinate systems have the same name!
Step 4: Click OK. The map canvas view will be changed to show the data in the coordinate system that you have selected.
Step 5: If you see a pop-up window asking you to select a transformation, click OK.
Each layer you open in QGIS will include information about the coordinate reference system of the data it contains (it's also possible that it doesn't, in which case you have to define it yourself but this is unusual). This section will explain the basics of working with the layer CRS.
Determining layer CRS
You can find the coordinate reference system of a layer by right-clicking on the layer in the layers list and choosing "Properties..." (you can also just double-click on the layer to open the properties). The layer's CRS can be found under the "Information" tab.
You can also quickly view a layer's CRS by hovering your cursor over it in the layers list. The EPSG code is shown beside the layer's name in the box that appears.
As you can imagine, different layers added to a project can have different coordinate reference systems. For example, you could open OpenStreetMap (EPSG:3857) alongside cadastral data from the Dutch government (EPSG:28992).
QGIS deals with this by applying a so-called on-the-fly projection so that all layers are re-projected and displayed on the map canvas using the project CRS. This setting is applied by default.
If you want to change the coordinate system of a layer, you can re-project it using the following steps.
Step 1: Right-click on the layer in the layers panel.
Step 2: Selectfrom the menu.
Step 3: Choose a file name and path by clicking on theon the right beside the file name field.
Step 4: Select a different CRS from the drop-down menu (only shows recently used coordinate systems). Click on the button beside this to select a projection from the complete list of available options.
Step 5: Leave all other fields the same and click OK. You have now created a new file containing the same data as the original, but with a different CRS.
- Introduction to coordinate reference systems: https://docs.qgis.org/3.10/en/docs/gentle_gis_introduction/coordinate_reference_systems.html
- Geographic vs. projected CRS: https://www.esri.com/arcgis-blog/products/arcgis-pro/mapping/gcs_vs_pcs/
- QGIS documentation on working with projections: https://docs.qgis.org/3.10/en/docs/user_manual/working_with_projections/working_with_projections.html
- Working with projections tutorial: https://www.qgistutorials.com/en/docs/working_with_projections.html
- Re-projecting and transforming data: https://docs.qgis.org/3.10/en/docs/training_manual/vector_analysis/reproject_transform.html