Bug report #16526
Default behavior when loading non-georeferenced images seems to have changed
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | C++ plugins/Georeferencer | ||
Affected QGIS version: | master | Regression?: | No |
Operating System: | Ubuntu 10.14 | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | duplicate |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24432 |
Description
- the image cannot be seen
The same is true for pixel based geometries.
Both have been loaded, but are hard to find.
It looks as if they (the pixel values) are being transformed to 'WSG 84'.
- which in my case is a metric system
The QgsMapSettings.destinationCrs() of the mCanvas is 'WGS 84'
QgsMapSettings map_settings=mCanvas->mapSettings(); QgsGeorefPluginGui::addRaster -3- mCanvas->mapSettings description[WGS 84]
I believe this was always the default behavior in the past.
But now, in QGIS 3, an extra step is needed (at least in the georeferencer) to insure that the default QgsMapSettings.destinationCrs() (Wsg 84) of the georeferencer Canvas is not used.
mLayerRaster = new QgsRasterLayer( rasterFileName, mGcpBaseFileName ); mCanvas->setDestinationCrs(mLayerRaster->crs());
I am not sure what QgsRasterLayer and QgsVectorLayer use in these cases, looks as if the last used metric system is being taken.
Setting the Canvas with loaded raster crs resoves the problem.
When loading a non-georeferenced image in QGIS itsself, the result is the same as in pre QGIS 3 versions.
Related issues
History
#1 Updated by Giovanni Manghi over 7 years ago
- Status changed from Open to Feedback
I just tried on master/windows (can do also on Ubuntu later) and I don't see any difference from the (wrong anyway) way the non georeferenced images are treated upon loading them in the georeferencer:
the behavior depends on how the QGIS general option "CRS for new layer" is configured. So if the option is set to "prompt for CRS" that makes sense for rasters loaded in the canvas that may not have an explicit CRS (like the ones that have only the world file) but does not for rasters loaded in the georeferencer: regardless if they don't have any CRS or have one the tool should not bother trying "apply" to them one.
After loading an image with no CRS in the georeferencer in QGIS master/Windows I can see it without apparently issues.
#2 Updated by Giovanni Manghi over 7 years ago
- Resolution set to duplicate
- Easy fix? changed from Yes to No
- Status changed from Feedback to Closed
duplicate of #4377
#3 Updated by Jürgen Fischer over 7 years ago
- Duplicates Bug report #4377: if "Options -> CRS -> coordinate reference system for new layers" is set "prompt for CRS", then the CRS is asked when loading a map into the georeferencer added