You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @liuh886,
Good catch, thanks for reporting it. We'll correct this!
I think we only recently realized that Area and Point are actually solely about interpretation (see https://gdal.org/user/raster_data_model.html#metadata) and not georeferencing. We were misguided in our first implementation by shifting the coordinate depending on the interpretation. Maybe this is because we do have to shift coordinates by half a pixel sometimes: some data do come with such a shift, and it exists also when converting to netCDF, for instance.
I'm fully back to work now. Hoping to get on that next week! (and the datum shift in xDEM too)
Describe the bug
I have a short test on the raster's function of xy2ij, and ij2xy below:
The results show i_1, j_1 != i_2, j_2, which means the two functions are not reversible.
To Reproduce
Here is a minimal test function:
Expected behavior
I expected the two functions to be reversible on both case 1 and 2
However, the 'xy2ij' has a problem of turning xy back to ij when offset='center'.
When offset='ul' and area_or_point='Area', it works as expected.
System (please complete the following information):
Additional context
The main issue is how to turn the index of rows and columns into ij when area_or_point='Point'.
It seems like lines 2202/2203 at https://github.com/GlacioHack/geoutils/blob/main/geoutils/georaster/raster.py should be:
The text was updated successfully, but these errors were encountered: