I have a large amount of depth points and in the same area I have some polygons. I need a field within the polygon to take up the least of the depths that fall spatially within the polygon. Any ideas? Thanks
Use the CoordinateExtractor to get X, Y and Z for each point in attributes.
Use the PointOnAreaOverlayer to get the name/ID for th epolygon on each point.
Then use the StatisticsCalculator to generate the minimum Z value, using the group by on the polygon name/ID.
If needed merge this value per polygon on the area features using the FeatureMerger with the areas as requester and the statistics as supplier.
Hi @jonbird, there could be several ways. I would try this.
- ElevationExtractor: Extract the elevation (z-coordinate) from the point features.
SpatialRelator: Send the polygons to the Requestor port, send the points to the Supplier port. This transformer adds a list (called "_relationships{}" by default) to the Requestor features. The list stores all attributes of every Supplier feature that has been spatially related to the Requestor.
ListRangeExtractor: Extract minimum and maximum from the "_relationships{}._elevation". The minimum would be the required value.
Thanks @erik_jan and @takashi for your answers, I will try these later. Will this also work with average depth and not just minimum depth?
Thanks @erik_jan and @takashi for your answers, I will try these later. Will this also work with average depth and not just minimum depth?
If you need to get some statistics other than minimum, use the ListExploder and StatisticsCalculator, instead of the ListRangeExtractor.
- ListExploder - List Attribute: _relationships{}, Conflict Resolution: Use Incoming List
- StatisticsCaluclator - Group By: <identifier for polygon>, Attributes to Analyze: _elevation
Alternatively the ListStatisticsCalculator from the FME Hub could also be used.