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?hp=4d541b78fc22b46067e94c71f8bc52e2b7e4e22d 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__":