landezBuild a MBTiles file from a tiles server or a Mapnik stylesheet | |
Download |
landez Ranking & Summary
Advertisement
- License:
- LGPL
- Publisher Name:
- Mathieu Leplatre
- Publisher web site:
- http://mathieu-leplatre.info
landez Tags
landez Description
Build a MBTiles file from a tiles server or a Mapnik stylesheet landez is a module that builds MBTiles files either from a remote tile service URL or from a local Mapnik stylesheet.The land covered is specified using a list of bounding boxes and zoom levels.It uses mbutil from Mapbox https://github.com/mapbox/mbutil at the final stage to build the MBTiles file.INSTALLLandez requires nothing but python remote mode (specifying a tiles URL), but requires mapnik if the tiles are drawn locally.sudo aptitude install python-mapnikUSAGERemote tilesUsing a remote tile service (Cloudmade by default):import loggingfrom landez import MBTilesBuilderlogging.basicConfig(level=logging.DEBUG)mb = MBTilesBuilder(remote=True, cache=False)mb.add_coverage(bbox=(-90.0, -180.0, 180.0, 90.0), zoomlevels=)mb.run()Please respect Tile usage policies < http://wiki.openstreetmap.org/wiki/Tile_usage_policy >Local renderingUsing mapnik to render tiles:import loggingfrom landez import MBTilesBuilderlogging.basicConfig(level=logging.DEBUG)mb = MBTilesBuilder(stylefile="yourstyle.xml", filepath="dest.mbtiles")mb.add_coverage(bbox=(-90.0, -180.0, 180.0, 90.0), zoomlevels=)mb.run() Requirements: · Python
landez Related Software