Hello all,
I've got a set of raster images that have a negative y coordinate axis. I'm trying to apply some image analysis techniques like segmentation using scipy.ndimage. Since the ndimage library doesn't handle coordinate systems, I'm passing the raster in as an array and re-attaching it to the coordinates later (I'm producing arrays of an identical size and shape). However, I'm getting funny results when I then try to do any further geospatially aware operations (such as polygonizing the raster using rasterio). The issue seems to stem from how I'm handling the arrays, and I've landed on a few "basic" questions I can't seem to puzzle out, even with basic examples.
da = dataarray
var = variable in da
1. What's the difference between da.var.values and da.var.data? In a MWE I get np.allcose(da.var.values, da.var.data) returning True, as I'd expect, but when I do the same thing on a particular dataarray (of type float64) from my dataset , I get False. I can't fathom why - any ideas?
2. Does anyone know of any example workflows doing image analysis on an xarray dataset with a non-geospatially aware package where the y coordinates are negative? I know that there are lots of good examples out there created by the awesome folks on this list that don't show up in google searches.
Thanks,
~Jessica