You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code tries to composite tiles from two mbtiles and make into a composite:
importloggingfromlandezimportMBTilesBuilder, TilesManagerlogging.basicConfig(level=logging.DEBUG)
mb=MBTilesBuilder(filepath="composite_z12_15.mbtiles", mbtiles_file="OSMBrightZ12_15_label_only.mbtiles") # base layeroverlay=TilesManager(mbtiles_file="watercolor_z12_15.mbtiles")
# if no coverage the bottom layer, but I need this to avoiding running into another landez bugmb.add_coverage(bbox=(-122.1099,37.4531,-121.8768,37.6107), zoomlevels=range(12,16)) # 12 to 15mb.add_layer(overlay)
mb.run()
This runs into the error of:
DEBUG:landez.sources:Execute query 'SELECT tile_data FROM tiles WHERE zoom_level=? AND tile_column=? AND tile_row=?;' ((15, 5284, 20081),)
Traceback (most recent call last):
File "./composite.py", line 13, in
mb.run()
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 288, in run
self._gather((z, x, y))
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 322, in gather
tilecontent = self.tile((z, x, y))
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 155, in tile
output = self.reader.tile(z, x, y)
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/sources.py", line 106, in tile
raise ExtractionError(("Could not extract tile %s from %s") % ((z, x, y), self.filename))
landez.sources.ExtractionError: Could not extract tile (15, 5284, 12686) from OSMBrightZ12_15_label_only.mbtiles
Where as my previous code (which I mistakenly written with two overlays) ran fine:
logging.basicConfig(level=logging.DEBUG)
mb=MBTilesBuilder(filepath="composite_z12_15.mbtiles")
overlay=TilesManager(mbtiles_file="OSMBrightZ12_15_label_only.mbtiles")
overlay2=TilesManager(mbtiles_file="watercolor_z12_15.mbtiles")
# if no coverage the bottom layer, but I need this to avoiding running into another landez bugmb.add_coverage(bbox=(-122.1099,37.4531,-121.8768,37.6107), zoomlevels=range(12,16)) # 12 to 15mb.add_layer(overlay2)
mb.add_layer(overlay)
mb.run()
I think the first code is grabbing the wrong tile number.
The text was updated successfully, but these errors were encountered:
Thanks. That explains it. That's probably because my add_coverage() call is spanning an area bigger than the tiles are? But that would be weird, giving that the same bbox is used for the base layer which I obtained from TileMill, and the overlay which I obtained using Landez connecting to Stamen's watercolor tiles.
What's the default behavior suppose to be if I don't supply any coverage area?
Right now it would cause exception to throw (please mind that the line number might be different from the trunk)
DEBUG:landez.tiles:Clean-up /tmp/landez/composite_z12_15_2
Traceback (most recent call last):
File "./composite.py", line 13, in <module>
mb.run()
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 271, in run
metadata = bottomlayer.reader.metadata()
AttributeError: 'tuple' object has no attribute 'reader'
This code tries to composite tiles from two mbtiles and make into a composite:
This runs into the error of:
DEBUG:landez.sources:Execute query 'SELECT tile_data FROM tiles WHERE zoom_level=? AND tile_column=? AND tile_row=?;' ((15, 5284, 20081),)
Traceback (most recent call last):
File "./composite.py", line 13, in
mb.run()
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 288, in run
self._gather((z, x, y))
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 322, in gather
tilecontent = self.tile((z, x, y))
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/tiles.py", line 155, in tile
output = self.reader.tile(z, x, y)
File "/usr/local/lib/python2.7/dist-packages/landez-2.0.3.dev0-py2.7.egg/landez/sources.py", line 106, in tile
raise ExtractionError(("Could not extract tile %s from %s") % ((z, x, y), self.filename))
landez.sources.ExtractionError: Could not extract tile (15, 5284, 12686) from OSMBrightZ12_15_label_only.mbtiles
Where as my previous code (which I mistakenly written with two overlays) ran fine:
I think the first code is grabbing the wrong tile number.
The text was updated successfully, but these errors were encountered: