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

Generate XYZ tiles (MBTiles): MBTiles 1.1 spec violation #59986

Open
2 tasks done
oarchner opened this issue Dec 20, 2024 · 1 comment
Open
2 tasks done

Generate XYZ tiles (MBTiles): MBTiles 1.1 spec violation #59986

oarchner opened this issue Dec 20, 2024 · 1 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

Comments

@oarchner
Copy link

oarchner commented Dec 20, 2024

Created MBTile files are missing the description record in table metadata. According to the MBTiles 1.1 specification, this entry is mandatory.

Steps to reproduce the issue

  1. Raster Tools/Generate XYZ Tiles (MBTiles)
  2. Enter a valid map extent
  3. Define the output as: test.mbtiles
  4. Run the tool
  5. Open the output with a SQLite DB viewer like dbeaver
  6. The description record is missing
    image
  7. Fix to fulfill the spec: `insert into metadata (name,value) values ('description','test');
    image

Versions

3.40.1

Supported QGIS version

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

New profile

Additional context

MBTile files with a missing description record can't be added as custom maps to DJI Pilot 2

@oarchner oarchner added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 20, 2024
@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Dec 20, 2024

@oarchner, while I see that the value of the version key metadata is set to "1.1" by the algorithm itself

mMbtilesWriter->setMetadataValue( "version", QStringLiteral( "1.1" ) );
I'm not sure it refers to the MBTiles specification version number, since the MBTiles specifications say that such key "refers to a revision of the tileset itself, not of the MBTiles specification".

Since the processing algorithm has been developed in Python in 2019 (#9857) by @marcel-dancak and ported to C++ in 2023 (#54321) by @alexbruy, I guess the algorithm was developed referring to the version 1.3 (2018) of MBTiles specification where the description key is not mandatory. Another clue is the fact that the algorithm sets the minzoom and maxzoom keys which are only defined in 1.3 version.

Anyway it should be simple to make the algorithm also add such key in the metadata in order to be compatible with versions 1.1 and 1.2.

@agiudiceandrea agiudiceandrea added the Processing Relating to QGIS Processing framework or individual Processing algorithms label Dec 20, 2024
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

2 participants