From cd8c8297c42837a888936b6d75542d5087fe5bb0 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Thu, 31 Jul 2014 16:27:35 +0400 Subject: [PATCH 1/1] Command line parameters for forced tile generation added --- render_tiles.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/render_tiles.py b/render_tiles.py index 5ce33f1..bef03c1 100644 --- a/render_tiles.py +++ b/render_tiles.py @@ -92,12 +92,20 @@ def main(): help="Data directory", metavar="DIR") parser.add_option("-m", "--map", dest="map", help="Map name", metavar="MAP") + parser.add_option("-z", "--zoom", dest="zoom", + help="Maximal zoom (forced), used with coordinates pairs (minlat minlon maxlat maxlon) in arguments", metavar="MAP") (options, args) = parser.parse_args() db=options.directory+'/gpx.db' map=options.map + zoom=options.zoom - process_queue(db,map) + if zoom: + minlat,minlon,maxlat,maxlon=args + queue_tiles(db,float(minlat),float(minlon),float(maxlat),float(maxlon),int(zoom)) + + if map: + process_queue(db,map) if __name__ == "__main__": -- 2.34.1