-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MBTiles raster support in WMS provider #33855
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code looks good to me, and quite straightforward. I think there's a good argument for this change too.
+0 to merge, +1 if you add a unit test.
src/providers/wms/qgswmsprovider.cpp
Outdated
{ | ||
QgsCoordinateTransform ct( QgsCoordinateReferenceSystem( QStringLiteral( "EPSG:4326" ) ), QgsCoordinateReferenceSystem( mSettings.mCrsId ), | ||
transformContext() ); | ||
QgsPointXY customTopLeft = ct.transform( QgsPointXY( sourceExtentWgs84.xMinimum(), sourceExtentWgs84.yMaximum() ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try/catch
(i'd be happy to see this merged for 3.12 too, I think it's a sufficiently low risk change) |
f45970d
to
9f7c6d9
Compare
Thanks Nyall for the fast review - I have added some basic tests and I would merge it for 3.12... |
Any notes on how to use this @wonder-sk ? Must we enter a file:/// path to an mbtiles file in the URL |
sorry @timlinux I have missed the notification.... You don't need to do anything special - it is automatic. If you simply open a mbtiles file from the browser or drag'n'drop it to qgis, the WMS provider will be now used (instead of gdal). |
Hi @wonder-sk, it looks like there are issue when the MBTiles layer's path contains multibytes characters (after unicode U+00FF): please see #56023. |
I have had this code around for a while and would like to hear what other devs think about it... (I don't mind if it does not get into 3.12.)
This PR adds MBTiles tiled raster map support to WMS provider so that it uses the same code paths
like WMTS or XYZ tiles.
Why move away from GDAL implementation? Here are the advantages of the approach through WMS provider: