Skip to main content
Question

Least depth to polygon


Forum|alt.badge.img

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

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • April 11, 2016

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.


takashi
Evangelist
  • April 12, 2016

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.

Forum|alt.badge.img
  • Author
  • April 12, 2016

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?


takashi
Evangelist
  • April 12, 2016
jonbird wrote:

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings