inputfile = OSMReader(inFile) except: print "Failed to initialize OSMReader" exit(-1) if show_stats: print "Step 1: List nodes in BBOX" try: #for uline in inputfile: while True: # Read one OSM XML object without depending on line breaks # (so this works with history files) inputfile.getNextObject() if inputfile.objType == objTypes.eof: break obj_count += 1 if (show_stats): if (obj_count % 250000) == 0: print "Processed " + str(obj_count) + " objects." # Is the node within the timestamp? if (inputfile.objTimestamp < start_date or inputfile.objTimestamp > end_date): continue
inputfile = OSMReader(inFile) except: print "Failed to initialize OSMReader" exit(-1) if show_stats: print "Step 1: List nodes in BBOX" try: #for uline in inputfile: while True: # Read one OSM XML object without depending on line breaks # (so this works with history files) inputfile.getNextObject() if inputfile.objType == objTypes.eof: break obj_count += 1 if (show_stats): if (obj_count % 250000) == 0: print "Processed " + str(obj_count) + " objects." # Is the node within the timestamp? if (inputfile.objTimestamp < start_date or inputfile.objTimestamp > end_date): continue #