Ticket #3529 (closed bug: duplicate)
Default CRS does not work as expected
| Reported by: | benoitrsa | Owned by: | nobody |
|---|---|---|---|
| Priority: | major: does not work as expected | Milestone: | Version 1.7.0 |
| Component: | Projection Support | Version: | Trunk |
| Keywords: | CRS,Projection,load,default | Cc: | |
| Platform Version: | Win7, XP | Platform: | Windows |
| Must Fix for Release: | Yes | Awaiting user input: | no |
Description
In the general "Options" dialog box, CRS tab there are three options for the default CRS: (1) Prompt for CRS, (2) Project wide default CRS..., (3) Global default CRS...
When loading a layer (either vector or raster) none of those options recognise the layer internal CRS, even if that layer CRS is defined and is reported as defined by GDAL.
This means that, when a layer is loaded:
- With option (1) the CRS dialog box is ALWAYS presented and the default choice is most of the time wrong. Is it extremely frustrating to define the CRS for 100's of layers being imported, knowing that those layer HAVE an internal CRS (them being GeoTIFs of shapefiles).
- With option (2) the project CRS is given to the loaded layer, irrespective of that layer internal CRS. When OTF is on, this has disastrous results as you do not expect the CRS of a loaded layer to be changed and find your layer wait out of where it should be!
- With option (3) the global CRS is given to the loaded layer, irrespective of that layer internal CRS. When OTF is on, this has the same disastrous results as in option (2)!
Example:
1 - Open a new QGIS project and set project CRS to WGS84 UTM30N (EPGS:32630)
2 - Create a shapefile in that CRS, draw some points and save it
3 - Check with GDAL that its projection is indeed WGS84 UTM30N
4 - Save project as "Project1"
5 - Create a new QGIS project, set the project default CRS set to Google Mercator (EPSG:900913) and enable on-the-fly projection
6 - Select option (2) in above dialog box
7 - Import the shapefile created in step 2.
8 - Load a google satellite image, with the Google plugin, and realise that the shapefile is at the wrong location!
9 - Use GDAL-Wrap (Raster menu) to convert the google image to GeoTIFF with an internal CRS of WGS84 UTM30N.
10 - Check with GDAL that the internal CRS of the GeoTIFF file is correctly defined.
11 - Load Project1
12 - Select option (1) in the dialog above
13 - Load the GeoTIFF file created in step 9.
14 - QGIS asks for its CRS! In that case the default CRS presented by the CRS dialog box is correct because both the GeoTIFF and the project have the same CRS.
Repeat steps 5-14, but in step 6, select option (3). You will have similarly wrong results.