Question

Least depth to polygon

  • 11 April 2016
  • 4 replies
  • 0 views

Badge

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


4 replies

Userlevel 2
Badge +12

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.

Userlevel 2
Badge +17

Hi @jonbird, there could be several ways. I would try this.

  1. ElevationExtractor: Extract the elevation (z-coordinate) from the point features.
  2. 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.
  3. ListRangeExtractor: Extract minimum and maximum from the "_relationships{}._elevation". The minimum would be the required value.
Badge

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?

Userlevel 2
Badge +17

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.

  1. ListExploder - List Attribute: _relationships{}, Conflict Resolution: Use Incoming List
  2. StatisticsCaluclator - Group By: <identifier for polygon>, Attributes to Analyze: _elevation

Alternatively the ListStatisticsCalculator from the FME Hub could also be used.

Reply