@@ -118,7 +118,7 @@ def zarr2tiff(input_file, config, process_existing=False, limit=-1, create_cog=F
118118 print ('Created GeoTIFF ' + output_file )
119119
120120 # TODO: Check if we need to flip y-axis
121- print ('Converting coordinates from 0 - 360 to -180 - 180 ' )
121+ print ('Flipping y-axis ' )
122122 output_file_360 = output_file .replace ('.tiff' , '_360.tiff' )
123123 print ('Creating GeoTIFF file ' + output_file_360 )
124124 gdal_warp = ['gdalwarp' , '-t_srs' , 'WGS84' , '-te' , '-180' , '-90' , '180' , '90' , output_file ,
@@ -131,7 +131,11 @@ def zarr2tiff(input_file, config, process_existing=False, limit=-1, create_cog=F
131131 for error in process .stderr :
132132 print (error .decode ())
133133 print ('Created GeoTIFF ' + output_file_360 )
134- shutil .move (output_file_360 , output_file )
134+ try :
135+ shutil .move (output_file_360 , output_file )
136+ except FileNotFoundError as ex :
137+ print (ex )
138+ continue
135139 print ('Replaced ' + output_file )
136140
137141 if create_cog :
@@ -478,8 +482,11 @@ def create_mrf(input_files, config, layer_name, colormap, empty_tile):
478482
479483 except FileNotFoundError as ex :
480484 print (ex )
481- print ('Deleting file ' + mrf_config )
482- os .remove (mrf_config )
485+ try :
486+ print ('Deleting file ' + mrf_config )
487+ os .remove (mrf_config )
488+ except FileNotFoundError as ex :
489+ print (ex )
483490
484491
485492if __name__ == '__main__' :
0 commit comments