Bug report #18409
Starting A new project loading osm xyz layer does not zoom to extent, but stays on 0,0 scale 1:1700
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Browser | ||
Affected QGIS version: | 3.1(master) | Regression?: | No |
Operating System: | Debian sid | Easy fix?: | No |
Pull Request or Patch supplied: | No | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 26298 |
Description
Since some days with current 3.1 master if I start a fresh project and load OSM as xyz it will not zoom to 'world', but stays on 0,0 scale 1:1700.
Meaning I'm seeing a nice blue screen and I have to either zoom out a couple of times, or use 'Zoom to Layer'.
Before I always zoomed to the world extent of osm.
To reproduce:
- remove ~/.local/share/QGIS to be sure you have a clean profile
- start QGIS (and not it starts in EPSG:4326)
- from browser open osm layer from XYZ tiles
- see bleu screen as in attached image
Note that if you then resize the screen,
Remove the osm layer
Load the osm layer again: all is fine: you will see the world.
History
#1 Updated by Richard Duivenvoorde almost 7 years ago
Note: I use proj5 here (Debian sid with recent proj patch). That could be the problem. I do not see it on Windows/OSGeo4w (using proj4).
Hopefully somebody else using proj5 can test?
Note that my messages are flooded with:
2018-03-14T17:51:00 WARNING No QgsCoordinateTransformContext context set for transform
and in debug msg in terminal I see:
../src/core/raster/qgsrasterlayerrenderer.cpp: 147: (QgsRasterLayerRenderer) [0ms] myProjectedLayerExtent is -20037508.3427892439067364,-20037508.3427892550826073 : 20037508.3427892439067364,20037508.3427892439067364 ../src/core/geometry/qgsrectangle.cpp: 350: (toString) [0ms] Extents : -567.0000000000000000,-492.7800534283170464 : -189.0000000000000000,-164.2600178094390344 ../src/core/raster/qgsrasterlayerrenderer.cpp: 148: (QgsRasterLayerRenderer) [0ms] myRasterExtent is -567.0000000000000000,-492.7800534283170464 : -189.0000000000000000,-164.2600178094390344 ../src/core/raster/qgsrasterlayerrenderer.cpp: 205: (QgsRasterLayerRenderer) [0ms] mapUnitsPerPixel = 0.336598 ../src/core/raster/qgsrasterlayerrenderer.cpp: 206: (QgsRasterLayerRenderer) [0ms] mWidth = 0 ../src/core/raster/qgsrasterlayerrenderer.cpp: 207: (QgsRasterLayerRenderer) [0ms] mHeight = 0 ../src/core/raster/qgsrasterlayerrenderer.cpp: 208: (QgsRasterLayerRenderer) [0ms] myRasterExtent.xMinimum() = -567 ../src/core/raster/qgsrasterlayerrenderer.cpp: 209: (QgsRasterLayerRenderer) [0ms] myRasterExtent.xMaximum() = -189 ../src/core/raster/qgsrasterlayerrenderer.cpp: 210: (QgsRasterLayerRenderer) [0ms] myRasterExtent.yMinimum() = -492.78 ../src/core/raster/qgsrasterlayerrenderer.cpp: 211: (QgsRasterLayerRenderer) [0ms] myRasterExtent.yMaximum() = -164.26 ../src/core/raster/qgsrasterlayerrenderer.cpp: 213: (QgsRasterLayerRenderer) [0ms] mTopLeftPoint.x() = 0 ../src/core/raster/qgsrasterlayerrenderer.cpp: 214: (QgsRasterLayerRenderer) [0ms] mBottomRightPoint.x() = 1123 ../src/core/raster/qgsrasterlayerrenderer.cpp: 215: (QgsRasterLayerRenderer) [0ms] mTopLeftPoint.y() = 0 ../src/core/raster/qgsrasterlayerrenderer.cpp: 216: (QgsRasterLayerRenderer) [0ms] mBottomRightPoint.y() = 976 ../src/core/raster/qgsrasterlayerrenderer.cpp: 218: (QgsRasterLayerRenderer) [0ms] mWidth = 1123 ../src/core/raster/qgsrasterlayerrenderer.cpp: 219: (QgsRasterLayerRenderer) [0ms] mHeight = 976 ../src/providers/wms/qgswmsprovider.cpp: 108: (QgsWmsProvider) [0ms] constructing with uri 'type=xyz&url=https://mt1.google.com/vt/lyrs%3Ds%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D&zmax=18&zmin=0'. ../src/providers/wms/qgswmscapabilities.cpp: 40: (parseUri) [0ms] uriString = type=xyz&url=https://mt1.google.com/vt/lyrs%3Ds%26x%3D%7Bx%7D%26y%3D%7By%7D%26z%3D%7Bz%7D&zmax=18&zmin=0 ../src/providers/wms/qgswmsprovider.cpp: 313: (addLayers) [0ms] Entering: layers:xyz, styles:xyz ../src/providers/wms/qgswmsprovider.cpp: 325: (addLayers) [0ms] set visibility of layer 'xyz' to true. ../src/providers/wms/qgswmsprovider.cpp: 334: (addLayers) [0ms] Exiting. Warning: No QgsCoordinateTransformContext context set for transform Stacktrace (piped through c++filt): /home/richard/bin/qgis/master/debug/bin/qgis(+0xc5c5)[0x5625f59975c5] /home/richard/bin/qgis/master/debug/bin/qgis(+0xca3c)[0x5625f5997a3c] /lib/x86_64-linux-gnu/libQt5Core.so.5(+0x955da)[0x7fb5be83a5da] /lib/x86_64-linux-gnu/libQt5Core.so.5(QMessageLogger::warning(char const*, ...) const+0xae)[0x7fb5be83b3ae] /home/richard/bin/qgis/master/debug/lib/libqgis_core.so.3.1.0(QgsCoordinateTransform::transformCoords(int, double*, double*, double*, QgsCoordinateTransform::TransformDirection) const+0x34d)[0x7fb5c8376909] /home/richard/bin/qgis/master/debug/lib/libqgis_core.so.3.1.0(QgsCoordinateTransform::transform(QgsPointXY const&, QgsCoordinateTransform::TransformDirection) const+0xc4)[0x7fb5c8374c9a]
#2 Updated by Salvatore Larosa almost 7 years ago
Unfortunately, I still cannot test it on Mac as proj5 formula generates a build errror. I will do as soon as the build error goes away.
#3 Updated by Borys Jurgiel almost 7 years ago
I can confirm on Debian Buster (today it got the 5.0.0-3 patch from experimental; not tested with older proj).