Skip to content

Commit

Permalink
more osm logic added for new osm processing
Browse files Browse the repository at this point in the history
  • Loading branch information
fpurcell committed May 28, 2017
1 parent 5c60d57 commit 96ea017
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions ott/loader/osm/osm_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,21 @@ def check_cached_osm(self, force_update=False):
pbf_newer = file_utils.is_a_newer_than_b(self.pbf_path, self.osm_path)
if force_update or pbf_newer or not fresh or not sized:
self.clip_to_bbox(input_path=self.pbf_path, output_path=self.osm_path)
fresh = True
else:
fresh = False

# step 3: .osm file check
if not file_utils.is_min_sized(self.osm_path, min_size):
e = "OSM file {} is not big enough".format(self.osm_path)
raise Exception(e)

# step 4: other OSM processing steps
OsmRename.rename(self.osm_path, do_bkup=False)
OsmInfo.cache_stats(self.osm_path)
self.osm_to_pbf()
self.other_exports()
# step 4: other OSM processing steps on a new (fresh) .osm file
if fresh:
OsmRename.rename(self.osm_path, do_bkup=False)
OsmInfo.cache_stats(self.osm_path)
self.osm_to_pbf()
self.other_exports()

def get_osmosis_exe(self):
""" get the path osmosis binary
Expand Down

0 comments on commit 96ea017

Please sign in to comment.