"""
import argparse
-import os.path as ospath
+import os
import osmium as o
import pyproj
self.done_nodes.add(n.ref)
try:
self.add_tile_from_node(self.node_cache.get(n.ref))
- except o.NotFoundError:
+ except KeyError:
pass # no coordinate
if path is None:
path = (part + ".meta")
else:
- path = ospath.join(part, path)
+ path = os.path.join(part, path)
- return ospath.join(str(z), path)
+ return os.path.join(str(z), path)
def expire_meta(meta):
"""Expire the meta tile by setting the modified time back.
"""
- if ospath.exists(meta):
+ if os.path.exists(meta):
print("Expiring " + meta)
os.utime(meta, (EXPIRY_TIME, EXPIRY_TIME))
meta = xyz_to_meta(xy[0], xy[1], xy[2], options.meta_size)
for tile_dir in options.tile_dir:
- meta_set.add(ospath.join(tile_dir, meta))
+ meta_set.add(os.path.join(tile_dir, meta))
# add the parent into the set for the next round
new_set.add((int(xy[0]/2), int(xy[1]/2), xy[2] - 1))