In QGIS the default projection, or CRS, is WGS84 Geographic Coordinate System. This CRS has become a global standard for latitude and longitude positions, such as those captured with GPS devices. Note that "unprojected" data, or those with projections that cannot be interpreted will be projected by default in WGS-84 when using QGIS. It is possible to load layers with different CRS into a QGIS project and view them seamlessly in the same coordinate space. This exercise will introduce the basics of managing CRS in QGIS. See also Peter H. Dana's Map Projection Overview .
- From the Menu go to PROJECT PROPERTIES
- Note the checkbox for enabling "only the fly" CRS transformations
- The CRS Selection Panel shows the current project CRS, and other pre-set CRS to choose from
- Next is a proj4 text panel, where projections can be set by pasting in proj4 format CRS statements. [You can look up proj4 statements by EPSG number at SpatialReference.org
- The Search by CRS Name panel provides a drop-down selection of the main Projection Authorities, such as EPSG, and a form to search for a name or ID number within that authority list.
- You can also select from Recently Used projection settings.
Note: the current project CRS is indicated in the lower right corner of the STATUS BAR as EPSG #.
- For this exercise go to PROJECT | PROPERTIES and UNCHECK the "on the fly" transformations setting and click OK.
- Add Vector Data
- Set the Encoding to ISO-8859-1 [Latin alphabet with European standard diacritic marks]
- browse to the SPAIN sample data in the workshop folder workshop_data/part_2/ESP_adm4 then OPEN.
- click on the ZOOM TO ALL
- The Egypt layers and the Spain layers will all be seen in the Map View
- Right click on the ESP_adm4 layer to check its CRS (projection setting)
- Under the GENERAL Tab of the Layer Properties, you should see that the LAYER CRS is set to EPSG:4326 - WGS 84
- Close the Layer Properties window and note that the PROJECT CRS is also set to EPSG:4326 on the lower right of the status bar
- Right click on one the Egypt layers and you will find that the same CRS settings are found, EPSG:4326
- That is why all the layers are shown correctly, even though we have UNCHECKED the setting for ENABLE ON-THE-FLY CRS TRANSFORMATIONS !
- Now let us test this by adding a layer with a very different CRS definition
- First make sure that in PROJECT | PROJECT PROPERTIES the ON-THE-FLY Transformation is still UNCHECKED
- Add Vector Data
- Set the Encoding to GBK
- Browse to the China Provinces sample data in the workshop folder workshop_data/part_2/v4_1820_prov_pgn_gbk then OPEN.
- Very often when adding incompatible CRS layers in the same map view, and with the ON-THE-FLY Transformation unchecked, the Map View will be blank
- Try clicking on the ZOOM FULL button
- QGIS 2.0 will automatically RESET the ON-THE-FLY Transform option, and your layers should now show up in correct relative positions
- Now go to PROJECT | PROJECT PROPERTIES and UNCHECK the ON-THE-FLY Transform option
- At this point the projection should change to that of the active layer
- Now click ZOOM FULL on the navigation toolbar
- The Map View will attempt to view all the layers, but they will no longer be in compatible projection space
- Typically this means that the Project CRS will have been set to the active layer, which will look proportionally correct, while the other data layers will be so tiny that they will be visible as a single dot, or not shown on the screen at all
- Now go to PROJECT | PROJECT PROPERTIES and CHECK the ON-THE-FLY Transform option again
- Now the all the data layers will be transformed to the CRS of the active layer
- Click ZOOM FULL on the navigation toolbar
- The Map View will attempt to view all the layers, but in this example, the Egypt layers will be very distorted, because the WGS-84 CRS is not appropriate to be transformed to the China CRS
- Note, in the Project CRS listed in the STATUS BAR it is set to EPSG:2333 (which is a specialized Gauss Kruger Xian 1980 projection for China)
- Finally, let us go to PROJECT | PROJECT PROPERTIES and reset the PROJECT PROJECTION to WGS-84
- You should be able to see WGS-84 EPSG:4326 in the RECENTLY USED projections list
- Click on the EPSG:4326 line and APPLY
- The selected CRS should now read WGS 84
- Click OK and then ZOOM FULL
- The Map View should now seem more or less as we would expect it to, with the layers for Egypt, China, and Spain showing up in their relative positions.
- That is one advantage of using the Global Geographic CRS, WGS-84, because it should work for a map containing elements from anywhere on the standard global grid, and not be a custom projection that will only work for a specific area of the world.
Most Projected Coordinate Systems are meant for specific areas or purposes. WGS84 was meant to provide a global framework for geodata, and is therefore a reasonable default setting for CRS.
|