minx,miny=deg2num(minlat,minlon,maxzoom)
maxx,maxy=deg2num(maxlat,maxlon,maxzoom)
print maxzoom,':',minx,'-',maxx,'/',miny,'-',maxy
- if (maxx-minx>32) or (maxy-miny>24) or (maxzoom==16):
+ if (maxx-minx>16) or (maxy-miny>12) or (maxzoom==16):
break
else:
maxzoom=maxzoom+1
db=options.directory+'/gpx.db'
map=options.map
zoom=options.zoom
+ if not zoom:
+ zoom=12
force=(options.force=='on')
- if zoom:
- if len(args)==1:
- filename,=args
- print "Rendering file: "+filename+"\n"
- queue_render(db,filename)
- else:
- minlat,minlon,maxlat,maxlon=args
- queue_tiles(db,float(minlat),float(minlon),float(maxlat),float(maxlon),int(zoom))
+ if len(args)==1:
+ filename,=args
+ print "Rendering file: "+filename+"\n"
+ queue_render(db,filename)
+ else:
+ minlat,minlon,maxlat,maxlon=args
+ print "Rendering region "+minlat+'..'+maxlat+' / '+minlon+'..'+maxlon+"\n"
+ queue_tiles(db,float(minlat),float(minlon),float(maxlat),float(maxlon),int(zoom))
if map:
+ print "Processing map "+map+"\n"
process_queue(db,map,force)
if __name__ == "__main__":