0

I have a shapefile with polygons representing a collection of nautical charts. The charts have different scales (an attribute in the layer) and some overlap. I want to create a layer which eliminates overlaps choosing the chart that has the best (lowest) scale. The way I see this working is that for each polygon, I need to see if there are any areas that overlap with a polygon with a lower scale value and remove that area for the polygon.

The end result is that I have a layer where anywhere I query, I will have only one polygon and it will represent the chart with the lowest scale for the point queried.

For example with this input (assuming red scale > yellow scale > green scale):

enter image description here

I would want the green polygon to remain as it was originally. The yellow polygon would become: enter image description here

And the red polygon would become:

enter image description here

3
  • Union them, then encode the outcome and dissolve.
    – Vince
    Sep 19 at 16:03
  • Not sure I understand what you mean by encode the outcome. Sorry, I am quite new to GIS. I can union the layer to itself and then end up with polygons which show the overlaps and provide me with the attributes of each pair of overlapping polygons. If I dissolve that directly I just get one big polygon
    – Campbell
    Sep 19 at 16:38
  • Exactly, which is why you need to do a little logic to indicate your encoding rules (if green, and anything else, then green; if yellow, but not green, then yellow; otherwise red), then dissolve.
    – Vince
    Sep 19 at 16:59

1 Answer 1

0

My layer have an integer field with scales.

  1. Union, with the chart layer as Input Layer, no overlay layer. Output will have duplicate geometries where polygons overlap.
  2. Aggregate to keep only the minimum scale: enter image description here
  3. Dissolve by chart field, with Advanced parameter Keep disjoint features separate=Yes

enter image description here

2
  • Thank you this is definitely helping me out. I think I have almost got this to work I can get it to a "flat" set of polygons but the only attribute I have is the scale. Is there any way to retain the other attributes of the polygon that ends up "winning"
    – Campbell
    Sep 19 at 17:10
  • You can add all fields to aggregate. Easiest by executing Union then Load fields from template layer using Union output. Then set aggregate function = First value for all fields except scale
    – BERA
    Sep 20 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.