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

Skip Missing Tile! #37

Open
faridcher opened this issue Dec 7, 2014 · 1 comment
Open

Skip Missing Tile! #37

faridcher opened this issue Dec 7, 2014 · 1 comment

Comments

@faridcher
Copy link

I am trying to convert an Mbtile file to a single raster. Landez gives me this error:
ExtractionError: Could not extract tile (12, 2644, 1692) from Shiraz.sqlite
which simply means the mentioned tile is missing in the mbtile.
I want to skip this tile and I want to add no data pixels instead that tile ( I'm exporting to Png).
Here is my simple code:

import logging
from landez import ImageExporter

logging.basicConfig(level=logging.DEBUG)

ie = ImageExporter(mbtiles_file="Shi.sqlite") 

ie.export_image(bbox=(52.3615993,29.461357,52.682949,29.85397), zoomlevel=12, imagepath="shi12.png")

Is is possible to do so with landez?
Thanks

@leplatrem
Copy link
Collaborator

Thanks for your feedback!

It is already supported for MBTiles creation using the ìgnore_errors option.
Unfortunately this option is ignored in ImageExporter code ! We should fix that!

If you can do it, we would be pleased to review your pull request! Have a look at how it was done for MBTiles : 594d987 and mimic the idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants