Book Image

Mastering QGIS

Book Image

Mastering QGIS

Overview of this book

Table of Contents (18 chapters)
Mastering QGIS
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Working with coordinate reference systems


When working with spatial data, it is important that a coordinate reference system (CRS) is assigned to the data and the QGIS project. To view the CRS for the QGIS project, click on Project Properties under Project and choose the CRS tab.

It is recommended that all data added to a QGIS project be projected into the same CRS as the QGIS project. However, if this is not possible or convenient, QGIS can project layers "on the fly" to the project's CRS.

Note

If you want to quickly search for a CRS, you can enter the EPSG code to quickly filter through the CRS list. An EPSG code refers to a specific CRS stored in the EPSG Geodetic Parameter Dataset online registry that contains numerous global, regional, and local CRS. An example of a commonly used EPSG code is 4326 that refers to WGS 84. The EPSG online registry is available at http://www.epsg-registry.org/.

To enable the "on the fly" projection, perform the following steps:

  1. Click on Project Properties under Project.

  2. Choose the CRS tab and Enable 'on the fly' CRS transformation.

  3. Set the CRS that you wish to apply to the project and make all layers that are not set to the project's CRS transform "on the fly".

To view the CRS for a layer, perform the following steps:

  1. Open the layer's properties by either navigating to Layer | Properties or by right-clicking on the layer in the Layers panel.

  2. Choose Properties from the context menu and then choose the General tab.

  3. If the layer's CRS is not set or is incorrect, click on Specify to open the CRS selector window and select the correct CRS.

To project a layer to a different CRS, perform the following steps:

  1. Right-click on the layer in the Layers panel and then choose Save As from the context menu.

  2. In the Save vector layer as dialog, set the file format and filename, then set CRS to Selected CRS and click on Change to set the target CRS, and save the file.

To create a new CRS or modify an existing CRS, perform the following steps:

  1. Click on Custom CRS under Settings to open the Custom Coordinate Reference System Definition window.

  2. Click on the Add new CRS button to add a new entry to the CRS list.

  3. With the new CRS selected, we can set the name and parameters of the CRS. The CRS properties are set using the Proj.4 format. To modify an existing CRS, click on Copy existing CRS and select the CRS from which you wish to copy parameters; otherwise, enter the parameters manually.

    Tip

    Proj.4 is another Open Source Geospatial Foundation (http://osgeo.org) project used by QGIS, and it is similar to OGR and GDAL. This project is for managing coordinate systems and projections. For a detailed user manual for the Proj.4 format used to specify the CRS parameters in QGIS, download it from ftp://ftp.remotesensing.org/proj/OF90-284.pdf.