From: Roman Bazalevsky Date: Thu, 31 Jul 2014 12:27:35 +0000 (+0400) Subject: Command line parameters for forced tile generation added X-Git-Url: https://git.rvb.name/pyrungps.git/commitdiff_plain/cd8c8297c42837a888936b6d75542d5087fe5bb0?ds=inline Command line parameters for forced tile generation added --- 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__":