Skip to content
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 generates random tiles with black background #50170

Closed
2 tasks done
AaronJohnsonSpambox opened this issue Sep 10, 2022 · 5 comments
Closed
2 tasks done

mbtiles generates random tiles with black background #50170

AaronJohnsonSpambox opened this issue Sep 10, 2022 · 5 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms

Comments

@AaronJohnsonSpambox
Copy link

What is the bug or the crash?

When trying to generate a topo map using Generate XYZ tiles (MBTiles). Several of the tiles at zoom level 15 or 16 have a black background even though they are PNGs and I use the default transparent background. I discovered the bug on a much more detailed topographic dataset and have pared it down to a much simpler one that still shows the problem.

MB Tiles output:
Results:
QGIS version: 3.26.2-Buenos Aires
QGIS code revision: feec3d3
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.5.1
GEOS version: 3.10.3-CAPI-1.16.1
PROJ version: Rel. 9.0.1, June 15th, 2022
PDAL version: 2.4.2 (git-version: 6cb4e7)
Algorithm started at: 2022-09-10T11:25:46
Algorithm 'Generate XYZ tiles (MBTiles)' starting…
Input parameters:
{ 'BACKGROUND_COLOR' : QColor(0, 0, 0, 0), 'DPI' : 96, 'EXTENT' : '4114751.886400000,4201829.355200000,-380132.886800000,-316419.954400000 [EPSG:3857]', 'METATILESIZE' : 4, 'OUTPUT_FILE' : 'C:/temp/test.mbtiles', 'QUALITY' : 75, 'TILE_FORMAT' : 0, 'ZOOM_MAX' : 16, 'ZOOM_MIN' : 10 }

Using 12 CPU Threads:
Generating tiles for zoom level: 10
Generating tiles for zoom level: 11
Generating tiles for zoom level: 12
Generating tiles for zoom level: 13
Generating tiles for zoom level: 14
Generating tiles for zoom level: 15
Generating tiles for zoom level: 16
Execution completed in 36.76 seconds
Results:
{'OUTPUT_FILE': 'C:/temp/test.mbtiles'}

Loading resulting layers
Algorithm 'Generate XYZ tiles (MBTiles)' finished

Steps to reproduce the issue

Unzip and open the attached project topo.zip and run the Generate XYZ tiles (MBTiles) command:

Input parameters:
{ 'BACKGROUND_COLOR' : QColor(0, 0, 0, 0), 'DPI' : 96, 'EXTENT' : '4114751.886400000,4201829.355200000,-380132.886800000,-316419.954400000 [EPSG:3857]', 'METATILESIZE' : 4, 'OUTPUT_FILE' : 'C:/temp/test.mbtiles', 'QUALITY' : 75, 'TILE_FORMAT' : 0, 'ZOOM_MAX' : 16, 'ZOOM_MIN' : 10 }

Once finished, add the resulting test.mbtiles result to the project and if you zoom into level 15 / 16, and pan around you'll usually see something like this:

Screenshot 2022-09-10 112714

Versions

QGIS version
3.26.2-Buenos Aires
QGIS code revision
feec3d3
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.5.1
PROJ version
9.0.1
EPSG Registry database version
v10.064 (2022-05-19)
GEOS version
3.10.3-CAPI-1.16.1
SQLite version
3.38.1
PDAL version
2.4.2
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

Active Python plugins
db_manager
0.1.20
grassprovider
2.12.99
MetaSearch
0.3.6
processing
2.12.99
sagaprovider
2.12.99

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@AaronJohnsonSpambox AaronJohnsonSpambox added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Sep 10, 2022
@agiudiceandrea agiudiceandrea added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Sep 11, 2022
@Jean-Roc
Copy link
Member

I can confirm this behavior using tilesxyzmbtiles processing in QGIS 3.28.2

{
  "area_units": "m2",
  "distance_units": "meters",
  "ellipsoid": "EPSG:7019",
  "inputs": {
    "BACKGROUND_COLOR": "rgba( 0, 0, 0, 0.00 )",
    "DPI": 96,
    "EXTENT": "685164.8273,719222.6358,7044827.5740,7077232.0603 [EPSG:2154]",
    "METATILESIZE": 4,
    "OUTPUT_FILE": "[...]/run_lvl_18.mbtiles",
    "QUALITY": 75,
    "TILE_FORMAT": 0,
    "ZOOM_MAX": 18,
    "ZOOM_MIN": 18
  }

qgis_bug_black_tiles

@pfbreton-perso
Copy link

I have this problem as well

image

QGIS version
3.28.3-Firenze
QGIS code revision
c12bcb2
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.6.2
PROJ version
9.1.1
EPSG Registry database version
v10.076 (2022-08-31)
GEOS version
3.11.1-CAPI-1.17.1
SQLite version
3.39.4
PDAL version
2.4.3
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

@danzig666
Copy link

Same here, both with QGIS 3.22.16 and 3.32.0

@Smurfj3
Copy link

Smurfj3 commented Aug 24, 2023

Issue is also happening for me with version 3.32.1

@alexbruy
Copy link
Contributor

Fixed by #54321.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Processing Relating to QGIS Processing framework or individual Processing algorithms
Projects
None yet
Development

No branches or pull requests

7 participants