I'm looking for the highest point in each of a large number of polygons. I'm using this pipeline:
[
'points.las',
{'type': 'filters.crop', 'polygon': polygons},
{
"type": "filters.outlier",
"method": "statistical"
},
{
"type": "filters.range",
"limits": "Classification![7:7]"
},
{'type': 'filters.locate', "dimension": "Z", "minmax": 'max'},
{"type": "writers.text", "precision": 8, "filename": 'output.csv'},
]
Where polygons is a long list of polygons in WKT. Unfortunately if a polygon does not contains any points nothing is output to the CSV making it impossible to correlate the high points with there corresponding polygons.
I'm wondering if there is a way around this or to tell filter.locate to output something else if there are no points.
This was one way to achieve it in case anyone one else comes across this:
Then add a stage like this to your pipeline: