span8
span4
span8
span4
A very simple question, hopefully with a simple answer.
I have a single-band raster file with flood depths, and want to put a point or label at the deepest point ("X marks the spot"). I can get the deepest value using the RasterBandMinMaxExtractor, but how do I get the location of the deepest value.
The solution I've come up with so far is using a RasterCellCoercer converting the entire raster into a point feature class, and then extract the deepest point using a Tester transformer. But this feels to be a bit of a roundabout way, having to vectorise the raster first.
Hopefully/Surely there is a shortcut....?
I have two thoughts, no idea which will end up being more efficient.
1. RasterExpressionEvaluator, deepest value = 1, everything else = NoData, followed by a RasterCellCoercer with extract NoData set to No.
2. Convert the raster to a point cloud (PointCloudCombiner) followed by a PointCloudFilter, and optionally a PointCloudCoercer.
The point cloud tools are quite efficient and there are often gains in converting a raster to a point cloud and processing.
As a follow-up on @jdh I would add:
If you create a point cloud you could use the PointcloudStatisticsCalcultator transformer to get the values.
Problem with minimun and maximum value of raster 1 Answer
Keep Clipper attributes 2 Answers
RasterCellcoercer 2 Answers
Problem with "RasterCellCoercer" 5 Answers
Removing nodata from raster 1 Answer
© 2019 Safe Software Inc | Legal