I have a Geotiff file which is published as a raster layer in Geoserver. I need to be able to calculate the coordinates of the max n values that are inside a given polygon.
I have found a WPS called
gs:RasterZonalStatistics which returns the max value in a raster layer. But I need to modify its code to return the coordinates of the max value. And further more to return the coordinates of the max n values.
I have searched the geotools code, and found the two classes:
org.geotools.process.raster.RasterZonalStatistics2. I've tried to understand their code and to find the place where I should change but with no success.
Could you please guide me to the place where the real logic of calculating the max value exists?