Skip to content

Commit 9b77e69

Browse files
author
SRM
committed
BUG: Fix raster tiling issue
Rounding off the profile['transform'] to 3 decimal places is leading to overwrite of some tiles while saving the chips.
1 parent 0e52484 commit 9b77e69

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

solaris/tile/raster_tile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ def save_tile(self, tile_data, mask, profile, dest_fname_base=None):
510510
if self.proj_unit not in ["meter", "metre"]:
511511
dest_fname = "{}_{}_{}.tif".format(
512512
dest_fname_root,
513-
np.round(profile["transform"][2], 3),
514-
np.round(profile["transform"][5], 3),
513+
np.round(profile["transform"][2], 6),
514+
np.round(profile["transform"][5], 6),
515515
)
516516
else:
517517
dest_fname = "{}_{}_{}.tif".format(
@@ -536,7 +536,6 @@ def save_tile(self, tile_data, mask, profile, dest_fname_base=None):
536536
dest.write(mask, profile["count"] + 1)
537537

538538
dest.close()
539-
540539
return dest_path
541540

542541
# if self.cog_output:

0 commit comments

Comments
 (0)