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) - error when run #51298

Closed
2 tasks done
tek-witch opened this issue Dec 23, 2022 · 4 comments
Closed
2 tasks done

Generate XYZ tiles (MBTiles) - error when run #51298

tek-witch opened this issue Dec 23, 2022 · 4 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter!

Comments

@tek-witch
Copy link

What is the bug or the crash?

QGIS version: 3.28.2-Firenze
QGIS code revision: b47e00b
Qt version: 5.15.3
Python version: 3.9.5
GDAL version: 3.6.1
GEOS version: 3.11.1-CAPI-1.17.1
PROJ version: Rel. 9.1.1, December 1st, 2022
PDAL version: 2.4.3 (git-version: f8d673)
Algorithm started at: 2022-12-23T17:51:03
Algorithm 'Generate XYZ tiles (MBTiles)' starting…
Input parameters:
{ 'BACKGROUND_COLOR' : QColor(0, 0, 0, 0), 'DPI' : 96, 'EXTENT' : '573.578924385,1204.666331795,-1756.883371974,-564.522169583 [EPSG:4326]', 'METATILESIZE' : 4, 'OUTPUT_FILE' : 'TEMPORARY_OUTPUT', 'QUALITY' : 75, 'TILE_FORMAT' : 0, 'ZOOM_MAX' : 12, 'ZOOM_MIN' : 12 }

Traceback (most recent call last):
File "C:\PROGRA1/QGIS321.2/apps/qgis/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 463, in processAlgorithm
self.generate(writer, parameters, context, feedback)
File "C:\PROGRA1/QGIS321.2/apps/qgis/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 291, in generate
metatiles = get_metatiles(self.wgs_extent, zoom, self.metatilesize)
File "C:\PROGRA1/QGIS321.2/apps/qgis/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 123, in get_metatiles
left_tile, top_tile = deg2num(north_edge, west_edge, zoom)
File "C:\PROGRA1/QGIS321.2/apps/qgis/./python/plugins\processing\algs\qgis\TilesXYZ.py", line 72, in deg2num
ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
ValueError: math domain error

Execution failed after 0.04 seconds

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

Steps to reproduce the issue

  1. Virgin Install: QGIS version 3.28.2-Firenze QGIS code revision b47e00b on Windows 10
  2. create new project
  3. add raster layer (png, tiff, etc)
  4. Menu > Processing > Toolbox > Generate XYZ tiles (MBTiles)
  5. [set to current map canvas extent]
  6. [default parameters]
  7. [run]

Versions

QGIS version
3.28.2-Firenze
QGIS code revision
b47e00b
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.6.1
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

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

@tek-witch tek-witch added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Dec 23, 2022
@roya0045
Copy link
Contributor

... did you realise that you imported an unprojected image that wrapped the globe multiple times? If you used some data that actually made sense I doubt you'd get an error.

@tek-witch
Copy link
Author

So much for "trying to be helpful", eh?

Time to update your bio.

@roya0045
Copy link
Contributor

If you try with data that is within the boundary of a crs, do you get an error?

@alexbruy
Copy link
Contributor

alexbruy commented Jun 5, 2023

Not a bug, your data have incorrect extent and/or CRS set.

@alexbruy alexbruy closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2023
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!
Projects
None yet
Development

No branches or pull requests

3 participants