Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoRaster2.get_tile messes up masked values in some cases #118

Open
astrojuanlu opened this issue Aug 9, 2018 · 2 comments
Open

GeoRaster2.get_tile messes up masked values in some cases #118

astrojuanlu opened this issue Aug 9, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@astrojuanlu
Copy link
Contributor

This code:

import telluric as tl
rs2 = tl.GeoRaster2.open("../tests/data/raster/overlap2.tif", lazy_load=False)
rs2.get_tile(4377, 3038, 13)

produces this image in the notebook:

Faulty tile

This is what @guydou said about it in #108:

about the mask, the mask will not have an effect on a raster that nodata value set, the paramter tells rasterio not to read the mask from the raster, we are doing it, because when you have no-data value set up rasterio is not using the overview masks

@drnextgis
Copy link
Contributor

drnextgis commented Aug 9, 2018

This is consequence of having nodata=0 in GeoRaster2 constructor. If we change this row:

raster = self.copy_with(image=array, affine=affine)
to:

raster = self.copy_with(image=array, affine=affine, nodata=None)

then image looks as expected:

image

@guydou
Copy link
Contributor

guydou commented Oct 23, 2018

it looks a projection issue and not masking

crop with out projection
image

and then projection

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants