3

I am using ArcMap 10.2.2 (Advanced license, no toolbar add ons/no spatial analyst) on a Windows 7 computer (i7 processor, 8GB RAM). I have used ArcMap for other basic analyses and have only very basic coding skills.

I am trying to count overlapping polygons where some of the polygons have identical geometry. My end goal is to create a map counting overlapping polygons, along the lines of this or this.

Normally I'd follow the "spaghetti and meatballs" protocol for counting overlapping polygons, which requires using the feature-to-polygon tool or running a union as the first step to chop up the polygons into all their pieces.

However, neither feature-to-polygon or union are working, presumably because of the identical polygons--I get "Invalid Topology [Duplicate Segment]" (I repaired the geometry, just in case, too).

I could delete the geometrically identical polygons but the identical polygons are important--where two identical polygons are, I'd like the count to be 2 (+any other polygons they overlap). Some polygons have up to four identical duplicates (so five identical-geometry polygons).

This is because I'm trying to map the number of pathogens found in any one place (assigning pathogens geographic ranges based on the species that carry them) and if one species carries multiple pathogens, I want that reflected on the map.

Because of this, I don't want to just identify duplicates or delete duplicates using the Find Identical or Find Duplicate tools, which are the options I found when searching this forum.

Besides manually going in and trying to slightly edit the geometry of all the identical polygons, does anyone know a way to count overlapping polygons, when some of those polygons have identical geometry?

I could try to assign those polygons a value of 2 (or more) based on how many duplicates they have, but I'm not sure how to keep that value associated with the polygons when running the feature-to-polygon tool.

To better describe what I'm trying to do, here's a small subset of my data:

data with overlapping polygons

^Rickettsia (small green dots, hard to see without clicking to view the image larger) and Metagonimiasis (blue blobs/"glacier") have exactly the same ranges, whereas Lyme (light yellow) and Toxoplasmosis (angled lines) overlap these polygons but have different geometry.

Since I'm trying to determine disease hot spots, it's important to double count the duplicate geometry polygons, since they represent different pathogens.

Here's the data I'm currently working with, if it would be of use to anyone. It's in a file geodatabase, if that's important. It's the first of several that I'm trying to do.

Edit: I slightly changed the geometry of a couple polygons (edited a single vertex on each) in a subset of the data which made each polygon's geometry unique and I still got the same error when running Feature to Polygon ("Invalid Topology [Duplicate Segment]"), possibly because I didn't edit every segment of the polygon? But if I have to edit each duplicate polygon that much, then the resulting map would be inaccurate (and editing each segment would take a long time!).

Edit2: Tried doing a spatial join of the data to itself, following FelixIP's suggestion/answer and GIS encounters a background processing error, each of the ~10 times I've tried it. Additionally, exporting the files out of the file geodatabase and trying again does not seem to fix this.

  • 1
    This post gis.stackexchange.com/questions/173081/… indicates that getting rid of duplicates didn't help (which I know you don't want to do anyway). Maybe there is some compromised data? You could try exporting data to a new feature class and try again? – jbchurchill Jan 21 '16 at 16:42
  • The Find Identical tool will help you I think: pro.arcgis.com/en/pro-app/tool-reference/data-management/… – Emil Brundage Jan 21 '16 at 17:27
  • JBChurchill- Thanks for the link! I have run Repair Geometry and the files are all in a file geodatabase. I just opened a (subset of) my data, repaired its geometry (for redundant good measure), exported it to a new feature class, and sadly got the same Duplicate Features error when trying the Feature to Polygon tool. Good suggestions, even though they sadly did not work. Emil - Thanks--I'm aware of the Find Identical tool, but after I find the identical polygons, I am still unsure of how to proceed. – MooseGirl Jan 21 '16 at 18:28
2

EXPERIMENT:

I generated random number in range 1,2,3 in non-overlapping polygon feature class

enter image description here

and labelled them by this number:

enter image description here

I created the copy of original and appended it accordingly by selection from original to create identical polygons. Add spatial join:

enter image description here

RESULT:

enter image description here

I hope this is what you are after.

NOTE: this does not dissolve identical polygons, it only calculates their count. Search this forum on how to dissolve them and keep count. One of the possibilities is calculating value str(centre.X)+str(centre.Y) and dissolving using this field.

  • Wow, thanks for running through that, this is very useful. I need to think on this to determine how to take what you've shown here and apply it to my overlapping polygons. By "I created the copy of original and appended it accordingly by selection from original to create identical polygons" is that referring to the spatial join, or is this an additional step? Many thanks. – MooseGirl Jan 21 '16 at 20:13
  • @MooseGirl You have to start with spatial join. Everything before that is my attempt to reproduce your dataset – FelixIP Jan 21 '16 at 20:57
  • Got it. Unfortunately, when I try your method, ArcMap fails (this includes post-reboot and saving files to a different location and trying in a new map). I tried the suggested spatial join maybe six times and got the same error. There's no additional information in the Results under Messages, so it's hard to know what went wrong. I wonder if it could be because my data has overlapping polygons? Here's my set up and here's my error message. – MooseGirl Jan 21 '16 at 22:28
  • 1
    Make sure your environment extent set to Default or Union of inputs. The steps outlined in my solution are very basic, should work always. Might worth working trying shapefiles as opposite to GDB features – FelixIP Jan 22 '16 at 0:26
  • 1
    Your data are massive multipart polygons. Convert them to single part using multipart to single part first. Select single path(ogen?) and try it first – FelixIP Jan 22 '16 at 20:42

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.