Skip to content

Commit

Permalink
BUGFIX: Fixing getting data from overviews when geotiff has a single …
Browse files Browse the repository at this point in the history
…time dimension.
  • Loading branch information
mpu-creare authored and Robbie Meyers committed May 21, 2021
1 parent aa99134 commit 7b56d1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions podpac/core/data/rasterio_source.py
Expand Up @@ -195,7 +195,7 @@ def get_data_overviews(self, coordinates, coordinates_index):
)
slc = (slice(window[0][0], window[0][1], overview), slice(window[1][0], window[1][1], overview))
new_coords = self.coordinates[slc]
coordinates_shape = new_coords.shape
coordinates_shape = new_coords.shape[:2]

# The following lines are *nearly* copied/pasted from get_data
if self.outputs is not None: # read all the bands
Expand All @@ -205,7 +205,8 @@ def get_data_overviews(self, coordinates, coordinates_index):
raster_data = self.dataset.read(self.band, out_shape=coordinates_shape, window=window)

# set raster data to output array
data = self.create_output_array(new_coords, data=raster_data)
data = self.create_output_array(new_coords)
data.data.ravel()[:] = raster_data.ravel()

return data

Expand Down

0 comments on commit 7b56d1d

Please sign in to comment.