File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -80,17 +80,21 @@ def check_cached_osm(self, force_update=False):
80
80
pbf_newer = file_utils .is_a_newer_than_b (self .pbf_path , self .osm_path )
81
81
if force_update or pbf_newer or not fresh or not sized :
82
82
self .clip_to_bbox (input_path = self .pbf_path , output_path = self .osm_path )
83
+ fresh = True
84
+ else :
85
+ fresh = False
83
86
84
87
# step 3: .osm file check
85
88
if not file_utils .is_min_sized (self .osm_path , min_size ):
86
89
e = "OSM file {} is not big enough" .format (self .osm_path )
87
90
raise Exception (e )
88
91
89
- # step 4: other OSM processing steps
90
- OsmRename .rename (self .osm_path , do_bkup = False )
91
- OsmInfo .cache_stats (self .osm_path )
92
- self .osm_to_pbf ()
93
- self .other_exports ()
92
+ # step 4: other OSM processing steps on a new (fresh) .osm file
93
+ if fresh :
94
+ OsmRename .rename (self .osm_path , do_bkup = False )
95
+ OsmInfo .cache_stats (self .osm_path )
96
+ self .osm_to_pbf ()
97
+ self .other_exports ()
94
98
95
99
def get_osmosis_exe (self ):
96
100
""" get the path osmosis binary
You can’t perform that action at this time.
0 commit comments