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

self.ds.tag()['AREA_OR_POINT'] gets updated into 'Area' when cropping (updating) #127

Closed
rhugonnet opened this issue Mar 15, 2021 · 5 comments · Fixed by #509
Closed

self.ds.tag()['AREA_OR_POINT'] gets updated into 'Area' when cropping (updating) #127

rhugonnet opened this issue Mar 15, 2021 · 5 comments · Fixed by #509
Assignees
Labels
bug Something isn't working

Comments

@rhugonnet
Copy link
Contributor

see #120

@erikmannerfelt
Copy link
Contributor

Could you elaborate on this, @rhugonnet ? In #265, I was very confused as to why the "Area" representation is hardcoded after certain operations.

@rhugonnet
Copy link
Contributor Author

Some more details: when using the crop() function (and maybe others! might come from the from_array), the self.ds.tag()['AREA_OR_POINT'] property of the Raster is updated into Area even if it was originally Point.

This might be problematic. So we need to check if:

  • This is respecting the pixel position (i.e. shifting the grid by half a pixel), which would be fine.
  • Overwriting the AREA_OR_POINT attribute without making any grid change, which would be a wrong behaviour.

@erikmannerfelt
Copy link
Contributor

Thanks for the additional info!

Perhaps a test-driven approach could verify this: we write the tests with the expected outcome and see if the functionality fits?

@rhugonnet
Copy link
Contributor Author

Yes! This thread is a bit old and I was not so familiar with Python tests at the time 😆

@erikmannerfelt
Copy link
Contributor

Oh yeah, it's almost a year old! I went through old issues to see how many were solved by removing the memoryfile, and this caught my attention.

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
3 participants