-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
gdal2tiles.py: Added support for XYZ tiles (OSM Slippy Map) #2359
Conversation
Added new --xyz option to generate tiles in the OSM Slippy Map standard ( https://wiki.openstreetmap.org/wiki/Slippy_Map ) where the Y coordinate is flipped. Fixed incorrect indentation in a few places.
Thanks, we would also need documentation of the new option in gdal/doc/source/programs/gdal2tiles.rst with a |
done |
not sure why https://travis-ci.com/github/OSGeo/gdal/jobs/308288415 is failing, it doesn't seem related to this change? |
yes, flake. I've restarted the job |
…input This PR fixes two issues: * XYZ tiles were not generated for all zoom levels when a zoom range is specified (e.g. `--zoom=10-12`). I forgot to include this fix in my previous PR (PR OSGeo#2359). Only tiles for the highest zoom level (12) were generated. * When an input .tif image is provided without specifying a `--s_srs` cli parameter, and the image itself is not georeferenced (i.e. it's missing the embedded SRS metadata), the input validation fails, but the program doesn't exit correctly, but hangs instead, as there's still an open pipe (instantiated within multiprocessing.Pool). Given `worker_tile_details()` is a synchronous call that needs to be executed once on the input file, before calling `create_base_tile()`, and cannot be parallelised, there is no need for it to be invoked from within the Pool. This way, if the input validation within `worker_tile_details()` fails, there is no open pipe and the parent process can terminate correctly, reporting the failure with sys.exit(2). I added test cases for both issues.
… input (#2362) This PR fixes two issues: * XYZ tiles were not generated for all zoom levels when a zoom range is specified (e.g. `--zoom=10-12`). I forgot to include this fix in my previous PR (PR #2359). Only tiles for the highest zoom level (12) were generated. * When an input .tif image is provided without specifying a `--s_srs` cli parameter, and the image itself is not georeferenced (i.e. it's missing the embedded SRS metadata), the input validation fails, but the program doesn't exit correctly, but hangs instead, as there's still an open pipe (instantiated within multiprocessing.Pool). Given `worker_tile_details()` is a synchronous call that needs to be executed once on the input file, before calling `create_base_tile()`, and cannot be parallelised, there is no need for it to be invoked from within the Pool. This way, if the input validation within `worker_tile_details()` fails, there is no open pipe and the parent process can terminate correctly, reporting the failure with sys.exit(2). I added test cases for both issues.
Hi, I just wanted to thank you both for getting this in. I wrote about it in a short blog post: https://www.azavea.com/blog/2020/06/18/this-month-we-learned-may-2020/ Thanks. |
Added new
--xyz
option to generate tiles in the OSM Slippy Map standard where theY
coordinate is flipped.Also fixed incorrect indentation in a few places.
Fixes #2098