Skip to content

Commit

Permalink
bugfix for cog
Browse files Browse the repository at this point in the history
  • Loading branch information
basaks committed Aug 3, 2023
1 parent 2fa4d1d commit 5c36de1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions configs/ref_rf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ prediction:
quantiles: 0.95
outbands: 4
geotif_options:
TILED: YES
BLOCKXSIZE: 256
BLOCKYSIZE: 256
# TILED: YES
# BLOCKXSIZE: 256
# BLOCKYSIZE: 256
driver: COG

validation:
Expand Down
2 changes: 1 addition & 1 deletion uncoverml/geoio.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ def __init__(self, shape, bbox, crs, name, n_subchunks, outputdir,
file_names = []

if mpiops.chunk_index == 0:
driver = kwargs.pop('driver') if 'driver' in kwargs else 'GTiff'
for band in range(self.outbands):
output_filename = os.path.join(outputdir, name + "_" + file_tags[band] + ".tif")
driver = kwargs.pop('driver') if 'driver' in kwargs else 'GTiff'
f = rasterio.open(output_filename, 'w', driver=driver,
width=self.shape[0], height=self.shape[1],
dtype=np.float32, count=1,
Expand Down

0 comments on commit 5c36de1

Please sign in to comment.