Solved

Attribute based feature fanout

  • 21 March 2017
  • 3 replies
  • 8 views

Badge

Dear all,

I have the following scenario:

  1. Find all points in an area
  2. Calculate values for the corresponding area based on the points within this area. Calculation should be grouped/split by the attribute called "YEAR" within the point dataset.

     

  3. Save the area with the calculated values per YEAR, where an unique area should be created based on the attribute "YEAR".

Until now my workspace looks like the following.

The geometric calculation using the "PointOnAreaOverlayer" in combination with my TestAreaValues_2 is working properly (step 1). As a result of step 1 I get a list of all points within one area.

My problem is step 2: You can I calculate my needed values grouped/split by the YEAR attribute which is available in each list-pointelement? Until now I only get one area, where the calculation consider all points independent of the YEAR attribute....

For example: I have five points. Three with YEAR=2010 and two with YEAR=2011. Now I want to calculate values based on the YEAR=2010 points and vaues based on the YEAR=2011 points. As a result I get two areas, where one feature is YEAR=2010 and one YEAR=2011.

Would be great to get some tips!

icon

Best answer by schlomm 22 March 2017, 13:34

View original

3 replies

Userlevel 2
Badge +17

Hi @schlomm, if the PointOnAreaOverlayer could merge area ID attribute to spatially related points, I think it would be easier to process the points to calculate something with grouping by YEAR and area ID. You can then merge the resulting attribute(s) to areas as a list attribute with the FeatureMerger (using the area ID as join key), explode the list with the ListExploder, and write the areas with fanout by YEAR.

Userlevel 2
Badge +16

Could you not do a Group by Year and TestAreaValues_2 in the PointonAreaOverlayer, so creating an Area feature per TestAreaValue_2 Year combination?

Badge

Hi @takashi, Hi @erik_jan,

Thanks for your tips. I combined both of your approaches to the following, finally working workspace.

Short description:

  1. PointOnAreaOverlayer searches all points within on area. Found points are saved in a list for each area.
  2. TestAreaValues checks resulting areas for at least one point within this area using the "_overlaps" attribute.
  3. ListExploder_2 explodes the list containing the points for each area
  4. ListBuilder creates a new list. This new is grouped by "YEAR" and "AreaID", so I get unique features for each area per year.
  5. ListSummers, AttributeCreators and ListRemover calculate needed and delete unneeded values for my grouped list.
  6. FeatureMerger merges new calulcated feature with the original area using the "AreaID". Using this I get the needed geometry.
  7. GridAttribute-Creator creates needed attributes using the joiner based on AreaID.
  8. Coordinate transformer transforms geom if needed.
  9. Output is written to FileGDB.

If you have any question, please let me know :)

Reply