diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 76d7509..1772dd8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,13 @@ Changelog ========= +Version 0.2.2 +============= + +- fixed wrong encoding of mask arrays +- added geometry reprojection to mosaic methods +- added new `poi2tile()` method + Version 0.2.1 ============= diff --git a/src/geospade/raster.py b/src/geospade/raster.py index c9864be..97dca11 100644 --- a/src/geospade/raster.py +++ b/src/geospade/raster.py @@ -2291,9 +2291,9 @@ def _mask_tile(self, tile) -> Tile: """ if tile.mask is None: if tile.mosaic_topology == 'INNER': - tile.mask = np.ones(tile.shape) + tile.mask = np.ones(tile.shape, dtype=np.uint8) elif tile.mosaic_topology == 'OUTER': - tile.mask = np.zeros(tile.shape) + tile.mask = np.zeros(tile.shape, dtype=np.uint8) elif tile.mosaic_topology == 'BOUNDARY': intrsct_geom = self.boundary.Intersection(tile.boundary) # first, using 'outer_boundary_extent' as a pixel buffer for generating the rasterised @@ -2721,7 +2721,7 @@ def select_tiles_by_geom(self, geom, sref=None, active_only=True, apply_mask=Tru """ - intsctd_raster_geom = self._raster_geom.slice_by_geom(geom, True, False) + intsctd_raster_geom = self._raster_geom.slice_by_geom(geom, snap_to_grid=True, inplace=False) if intsctd_raster_geom is None: return None intsctd_mosaic_height, intsctd_mosaic_width = intsctd_raster_geom.shape