0

I have a FeatureClass derived from ArcGIS Desktop 10.6.1's Polygon Neighbors tool [Windows 10 - 64]. I have supplied a tiny sample (of >250k) that gives the flavour and an example of the objective.

NEW LINK: https://drive.google.com/file/d/1L58l02AWW64lhrE-lfZfLZ3PqXPlLf9K/view?usp=sharing

The attribute table is sorted by area - so we start with the smallest polygons and work our way incrementally through progressively larger features (there will be a cut-off beyond which I'll not want to progress - but let's not worry about that at this stage). In this example, we stop at OBJECTID = 7.

The attribute table includes fields src_OBJECTID and nbr_OBJECTID, generated originally by the Polygon Neighbours tool. I have dropped all neighbours other than the single feature with which the feature src_OBJECTID shares the longest boundary (attribute = Maximum_LENGTH).

What I am wanting to do is to dissolve progressively larger src_OBJECTIDs into their nbr_OBJECTID.

So, for example, the smallest polygon (src_OBJECTID '388') has nbr_OBJECTID '668'.

668 is thereby identified as the (longest shared boundary) neighbour of 388. 668 is also a (larger) SOURCE polygon feature further down in the table, with src_OBJECTID 668.

So I need do dissolve feature src_OBJECTID 388 into that neighbour feature - src_OBJECTID 668.

I then increment to the second-smallest feature. This is feature src_OBJECTID 131, which has to dissolve into its largest neighbour - feature src_OBJECTID 459. You will note that the third feature (OBJECTID = 3) is src_OBJECTID 459, and this has to be dissolved in turn into feature src_OBJECTID 668. So this is an example of nested dissolves, which are very common in the full dataset.

The subsequent features all dissolve into src_OBJECTID 668.

The difficulty I'm having is that I do not see how to select the target for the dissolve on the basis of it having the same src_OBJECTID as the nbr_OBJECTID of the fragment being dissolved into it.

Or, as @Hornbydd put it much more clearly:

... how to dissolve all the nested polygons, so in your example 131 dissolves into 459 which dissolves into 668 as well as all those that dissolve directly into 668 which ultimately dissolves into 638?

I'll create an image tomorrow.

I am stuck at the first hurdle (no ModelBuilder stuff to show). I would first of all like to establish whether this is actually possible.

Then, if it is possible, establish the sequence of ArcGIS Pro tools required.

2
  • 1
    Please include a picture of a test model to show what you have tried and where you are stuck. – PolyGeo Mar 13 at 13:02
  • 1
    The "killer question" is this statement "The difficulty I'm having is that I do not see how to select the target for the dissolve on the basis of it having the same src_OBJECTID as the nbr_OBJECTID of the fragment being dissolved into it." Frankly I don't understand what you are asking here. This needs to be reworded in a manner that we can understand? may be images? Are you asking how to dissolve all the nested polygons, so in your example 131 dissolves into 459 which dissolves into 668 as well as all those that dissolve directly into 668 which ultimately dissolves into 638? – Hornbydd Mar 18 at 16:53
1

Without seeing the full dataset and understanding the topological relationships within your data we only have your isolated block of touching polygons to go by. What we don't know is the nature of your dataset, was this just a select and export from a continuous coverage of data (e.g. a geological dataset), which may be the case as your largest 668 should dissolve into 638 which was not supplied in your sample dataset? Your data might be multipart or have holes, or both? Its clear you are trying to dissolve slivers so I'm guessing your dataset is a product of a Union operation?

I would say this is probably very difficult to impossible to solve with modelbuilder, so approach this problem with scripting.

I would create a initial dictionary where key is nbr ID and the item is a list of src IDs. With your sample data this would create an initial dictionary of:

key, item

668, [387,388,389,459,639]

638, [668]

459, [131]

Then some looping code that checks if key is in the list, if so append it's list and keep going until all appends. Another check is to see if the value in the list for a non-matching key is the key for another list, in that case you append that list to the non-matching as that is an example of 668 going into 638. You ultimately end up with:

638, [668,387,388,389,459,639,131]

This you can use to do a simple select and dissolve by.

1
  • Thank you very much for your input. Well, the full dataset is rather complex. It's come about from multiple clip, union and symmetrical difference and multipart to singlepart operations.The basic datasets were 1981 Enumeration Districts for England and Wales and the oldest available full detailed coastline. There should net be any multipart features but there could easily be holes. I am going to put together some explanatory graphics. – Bruce Mitchell Mar 19 at 10:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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