DataSet.HighestRasterValue Method
Finds the highest raster value inside the given polygon.
HighestRasterValue(PolygonGeometry polygon)
Finds the highest raster value inside the given polygon.Syntax
public Point HighestRasterValue (
PolygonGeometry polygon
)
Parameters
The polygon specifying the area to search.
Return Value
A point at the center of the raster cell with the highest value, with Z set to the value of the cell.
Remarks
This method is only supported by raster datasets using a raster cache with Max as the downsampling method. In all other cases this method will throw an exception. It is also not supported for Jpeg2000DataSet, since it may do its own resampling with some other method.
This method will use the overviews in the raster cache to quickly locate the raster cell with the highest value within the specified polygon. Raster cells in the highest resolution on the edge of the polygon will be considered.
The method will return a Point at the center of the raster cell in the highest resolution where the highest value was found; the Z coordinate will be set to the highest value. Note that if the cell is at the edge of the polygon, its center point might actually be just outside the polygon (but no further than half the cell diagonal).
If more than one cell is found with the same highest value, one of the cells will be chosen. Normally this will be the cell closest to the center of the polygon, but that may not always be the case.
Undefined raster cells in the data are ignored. If there are no raster cells with a defined value at all within the polygon, Point.Undefined is returned.
Platforms
Windows, Linux, Android