I’m trying to implement an accuracy assessment section for my plugin. Right now when testing this in Python and loading the whole scene, there is no problem. I’ll just get the validation data from a shapefile using a variation of this code snippet here to convert lat-long to x,y indices of my supplied raster.
pos = GeoPos(lat, lon) self.source_product.getSceneGeoCoding().getPixelPos(pos, None)
The problem arises when I try to do this in SNAP because the tiling would screw up the returned x,y indices. I should change source_product to the current tile in focus, but then getSceneGeoCoding() would not work for that object-type. Looking at the API docs for tile methods, I could attempt a crude way of readjusting the indices relative to the tile using getRectangle(). Is there a better way to do this?
Lastly, is it normal that a custom processor that otherwise works when invoked from the Menu bar can’t be selected in GraphBuilder? Is there a workaround for that?