[QGIS-trac] [Quantum GIS] #3529: Default CRS does not work as
expected
Quantum GIS
qgis at qgis.org
Mon Feb 28 04:08:18 EST 2011
#3529: Default CRS does not work as expected
---------------------------------------------------------+------------------
Reporter: benoitrsa | Owner: nobody
Type: bug | Status: new
Priority: critical: causes crash or data corruption | Milestone: Version 1.7.0
Component: Projection Support | Version: Trunk
Keywords: CRS,Projection,load,default | Platform_version: Win7, XP
Platform: Windows | Must_fix: Yes
Status_info: 0 |
---------------------------------------------------------+------------------
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.
--
Ticket URL: <https://trac.osgeo.org/qgis/ticket/3529>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats
More information about the QGIS-trac
mailing list