Question

Have a set of geographic points with each having values. Then intersect it with a Main and Sub-Polygons. Need help to get the % of the sub-polygon with respect to main polygon datapoint total values after the total of the sub-polygon is taken off i

  • 11 August 2021
  • 1 reply
  • 1 view

Sample figure shows the 36 points within a MAIN Polygon (purple color). Each have its respective the data point value and summing up comes to 666. With the sub-polygon it crosses these points and have its own total of the data points within it. Need to take of the sum of the sub-polygon from the overall total (main polygon - 666) and get the % of each result with respect to overall total of main polygon. See table


1 reply

Userlevel 4
Badge +26

One method could be as follows:

 

  1. Use a PointOnAreaOverlayer on the points with the MAIN polygon first. You can build a list on the main polygon with the required attributes from the points, you can then sum up the list to get the total value using a ListSummer.
  2. Next is to again use another PointOnAreaOverlayer with the points and the SUB polygons. You can do the same thing on the sub polygons to get the total.
  3. Next perform an AreaOnAreaOverlayer with the sub-polygons and MAIN polygons. The Sub polygons can pick up the attributes from the MAIN polygon.
  4. Lastly just use ExpressionEvaluators to calculate the difference and percentage

 

Important. This method assumes there is no overlap between MAIN polygons or SUB polygons. If there is overlap this wont work as expected

Reply