r-barnes / faster-unmixer

A faster implementation of the sediment inverse/unmixing scheme proposed in Lipp et al (2021).
5 stars 1 forks source link

Change sample coordinates to match the projection of the raster #33

Closed AlexLipp closed 1 year ago

AlexLipp commented 1 year ago

This modifies the data input assumptions so that we now assume that the x and y coordinates are the same coordinates of the D8 raster. Previously, it was assumed that they represented model indices from the lower left. To accommodate this change I have modified faster-unmixer.cpp so that it converts the input coordinates into model indices from the upper left, by reading in the projection information using the GDAL API. I have also modified the test datasets to consider an (arbitrary) origin to the lower left of the domain. I also provide the d8 in .tiff and .nc to check it works for a variety of geospatial inputs. This closes Issue #30.

@r-barnes I'm not a native C++ programmer so do let me know if I've made any errors.