{"id":182811,"date":"2012-11-13T18:41:36","date_gmt":"2012-11-13T18:41:36","guid":{"rendered":"http:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=182811"},"modified":"2018-12-18T11:26:51","modified_gmt":"2018-12-18T19:26:51","slug":"more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","title":{"rendered":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs"},"author":3991,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[23341],"tags":[24321,39581,28481],"industry":[],"product":[36991],"class_list":["post-182811","blog","type-blog","status-publish","format-standard","hentry","category-analytics","tag-geoprocessing","tag-overlapping-polygons","tag-overlay","product-arcgis-desktop"],"acf":{"short_description":"I\u2019ll show how spaghetti and meatballs can be used to calculate the number of overlapping polygons.","flexible_content":[{"acf_fc_layout":"content","content":"<p>In my\u00a0<a href=\"http:\/\/blogs.esri.com\/esri\/arcgis\/2012\/11\/09\/splitting_polygons\/\">last blog post about overlay<\/a>, I introduced the concept of cartographic spaghetti and how it can be used to split polygons by line features. In this post, I want to continue with the cartographic spaghetti theme by introducing a companion concept: meatballs, which are the centroids of the spaghetti polygons. I\u2019ll show how spaghetti and meatballs can be used to calculate the number of overlapping polygons.<span id=\"more-22788\"><\/span><\/p>\n<h3>Downloads<\/h3>\n<p>If you\u2019re looking for a tool you can use immediately to count overlapping polygons, you can download the\u00a0<a href=\"http:\/\/www.arcgis.com\/home\/item.html?id=1dd4a6832b3d40b494dbf8521cc5134c\">Count Overlapping Polygons<\/a>\u00a0tool.\u00a0 You can also download the sample data and model used in this post\u00a0<a href=\"http:\/\/www.arcgis.com\/home\/item.html?id=012ed7ded9c24316b742821171c110c0\">here<\/a>.<\/p>\n<h2>The scenario<\/h2>\n<p>The\u00a0<a href=\"http:\/\/en.wikipedia.org\/wiki\/Deepwater_Horizon_oil_spill\">Deepwater Horizon oil spill<\/a>\u00a0in the Gulf of Mexico lasted from April 20 to July 15, 2010. During this time, NOAA mapped the extent of the plume daily and distributed it in various GIS formats. The map below uses this data to show the plume concentration over 67 days. The count value in the legend is the number of days the plume covered an area. Since there is one polygon per day, count is simply the number of overlapping plume polygons.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/overview_of_spill_1.png\" alt=\"\" width=\"596\" height=\"469\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 1: Number of days that the plume covered an area<\/p>\n<\/div>\n<h2>Counting overlaps<\/h2>\n<p>The easiest and fastest way I\u2019ve found to count the number of overlapping polygons is the \u2018spaghetti and meatballs\u2019 method described below. To use this method, you need a single feature class containing all the overlapping polygons. For example, the oil spill data above started out as 67 feature classes, each containing one polygon, and I used the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Merge\/001700000055000000\/\" target=\"_blank\" rel=\"noopener\">Merge<\/a>\u00a0tool to merge all 67 features into one feature class (the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Append\/001700000050000000\/\" target=\"_blank\" rel=\"noopener\">Append<\/a>\u00a0tool can also be used).<\/p>\n<div class=\"wp-caption alignleft\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/overlapping_buffers_1.png\" alt=\"\" width=\"200\" height=\"155\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 2: Example data<\/p>\n<\/div>\n<p>To illustrate the details of this technique, I\u2019ll use the dataset shown in Figure 2, one I created by buffering a bunch of point features.<\/p>\n<h3>Create some spaghetti<\/h3>\n<p>The first step is to create some cartographic spaghetti from the overlapping polygons. As described in the\u00a0<a href=\"http:\/\/blogs.esri.com\/esri\/arcgis\/2012\/11\/09\/splitting_polygons\/\" target=\"_blank\" rel=\"noopener\">previous post<\/a>, the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Feature_To_Polygon\/00170000003n000000\/\" target=\"_blank\" rel=\"noopener\">Feature To Polygon<\/a>\u00a0 tool does this for you. Feature To Polygon takes one or more line or polygon feature classes and creates a polygon feature class as output. And, as mentioned in the post, you want to avoid having any attributes on the output of Feature To Polygon and there\u2019s a trick you can use of supplying an empty point feature class to the\u00a0<strong>Label Features<\/strong>\u00a0parameter of Feature To Polygon. (Alternatively, you could use the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Delete_Field\/00170000004n000000\/\" target=\"_blank\" rel=\"noopener\">Delete Field<\/a>\u00a0tool.) Figure 3 shows the model to create an empty point feature class in memory and connecting it to Feature To Polygon.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/create_spaghetti_1.png\" alt=\"\" width=\"560\" height=\"191\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 3: Creating spaghetti<\/p>\n<\/div>\n<div class=\"wp-caption alignleft\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/before_after.png\" alt=\"\" width=\"400\" height=\"189\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 4: Overlapping polygons and spaghetti polygons<\/p>\n<\/div>\n<p>The output of Feature To Polygon is shown on the right side of Figure 4. The left side is the original overlapping polygons and I\u2019ve highlighted two void areas that are made into polygons by Feature To Polygon. I call these \u2018artifact\u2019 polygons. I note these because such artifact polygons require a bit of special handling later.<\/p>\n<h3>Create some meatballs<\/h3>\n<p>The next step is to create a centroid point for each polygon in the output of Feature To Polygon. These centroids are the \u2018meatballs\u2019 of the spaghetti and meatballs technique. We\u2019re going to use these points in an overlay of the original overlapping polygons to produce a count.<br \/>\nTo create the meatballs, use the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Feature_To_Point\/00170000003m000000\/\" target=\"_blank\" rel=\"noopener\">Feature To Point<\/a>\u00a0tool, illustrated in Figure 5.\u00a0 Be sure to check the\u00a0<strong>Inside<\/strong>\u00a0option\u2014this guarantees that the point created will be inside the polygon.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/meatball_model.png\" alt=\"\" width=\"600\" height=\"361\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 5: Using Feature To Point to create centroids<\/p>\n<\/div>\n<p>Figure 6 shows the meatballs inside their spaghetti polygons along with the attribute table. On the attribute table,\u00a0<em>ORIG_FID<\/em>\u00a0is the\u00a0<em>OBJECTID<\/em>(feature ID) of the spaghetti polygon from which the point was constructed.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/spaghetti_and_meatballs_map.png\" alt=\"\" width=\"600\" height=\"274\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 6: Meatballs and their attributes<\/p>\n<\/div>\n<h2>Point-in-polygon overlay<\/h2>\n<p>Now comes the interesting part\u2014we overlay these meatball centroids with the original overlapping polygons to get a count of how many polygons overlap each meatball point. There are several ways we can do this. For example, the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Intersect\/00080000000p000000\/\" target=\"_blank\" rel=\"noopener\">Intersect<\/a>\u00a0 tool could be used to create a new point feature class containing one point for each polygon that overlaps it. The next step would be to count up the number of occurrences of\u00a0<em>ORIG_FID<\/em>\u00a0using the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Summary_Statistics\/00080000001z000000\/\" target=\"_blank\" rel=\"noopener\">Summary Statistics<\/a>\u00a0 tool. But this is a lot of steps to go through just to get the count.<\/p>\n<p>I\u2019ve found the fastest way is to use the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Spatial_Join\/00080000000q000000\/\" target=\"_blank\" rel=\"noopener\">Spatial Join<\/a>\u00a0tool. Figure 7 shows the model and dialog.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/spatial_join_diagram.png\" alt=\"\" width=\"587\" height=\"547\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 7: Overlaying the centroids (meatballs) with the overlapping polygons<\/p>\n<\/div>\n<div class=\"wp-caption alignleft\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/spatial_join_output_table.png\" alt=\"\" width=\"424\" height=\"139\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 8: Result of Spatial Join<\/p>\n<\/div>\n<p>Figure 8 shows the attribute table of the result of Spatial Join \u2013 a copy of the meatball point feature class with a\u00a0<em>Join_Count<\/em>field, which is the number of polygons that overlap the point.<\/p>\n<p>A couple of things to note about the Spatial Join parameters:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li>The\u00a0<strong>Join Operation<\/strong>\u00a0parameter is JOIN_ONE_TO_ONE,\u00a0<em>not<\/em>JOIN_ONE_TO_MANY. Choosing JOIN_ONE_TO_MANY would result in many more points output\u2014if a point was overlain by 3 polygons, 3 points would be output\u2014and\u00a0<em>Join_Count<\/em>\u00a0would not be calculated.<\/li>\n<li><strong>Keep All Target Features<\/strong>\u00a0is checked. If it was unchecked, the artifact polygons would not be joined. We need them in the output because we want to find them (their\u00a0<em>Join_Count<\/em>\u00a0will be zero) and delete them.<\/li>\n<li>In the\u00a0<strong>Field Map<\/strong>\u00a0parameter, I remove all attributes except\u00a0<em>ORIG_ID<\/em>, the only attribute I care about.<\/li>\n<li>Finally, the\u00a0<strong>Match Option<\/strong>\u00a0is WITHIN, which means only\u00a0<strong>Join Features<\/strong>\u00a0(the overlapping polygons) will be matched if a\u00a0<strong>Target Feature<\/strong>(meatball) is within them. The INTERSECT Match Option would also work here.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Copy the\u00a0<em>Join_Count<\/em>\u00a0field<\/h2>\n<p>Now all we need to do is to copy the\u00a0<em>Join_Count<\/em>\u00a0field back to the spaghetti polygons. I use the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Join_Field\/001700000065000000\/\" target=\"_blank\" rel=\"noopener\">Join Field<\/a>\u00a0tool for this, illustrated below.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/Join_Field_Model.png\" alt=\"\" width=\"524\" height=\"454\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 9: Adding Join_Count to the spaghetti polygons<\/p>\n<\/div>\n<h2>Deleting artifacts<\/h2>\n<p>The final step is to delete the artifact polygons described above. All we need to do is select those polygons with a\u00a0<em>Join_Count<\/em>\u00a0equal to zero and delete them. Here\u2019s the last piece of the model that does this:<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/Delete_Features.png\" alt=\"\" width=\"593\" height=\"116\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 10: Deleting the artifact polygons<\/p>\n<\/div>\n<p>In the\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Make_Feature_Layer\/00170000006p000000\/\" target=\"_blank\" rel=\"noopener\">Make Feature Layer<\/a>\u00a0tool, the\u00a0<strong>Expression<\/strong>\u00a0parameter value is\u00a0\u201cJoin_Count\u201d = 0. This creates a layer with the two artifact polygons selected.\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Delete_Features\/001700000036000000\/\" target=\"_blank\" rel=\"noopener\">Delete Features<\/a>\u00a0 is executed on this layer to delete these two polygons. (When the Delete Features tool is executed in the above model, it will always issue\u00a0WARNING 000117: Warning empty output generated\u00a0which you can ignore.)<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/Delete_Features_Map.png\" alt=\"\" width=\"581\" height=\"383\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 11: Final output<\/p>\n<\/div>\n<h2>Oil spill revisited<\/h2>\n<p>Let\u2019s go back to the original 67 oil spill polygons for a moment. Running Feature To Polygon on these 67 overlapping polygons results in 18,733 unique polygons with a maximum\u00a0<em>Join_Count<\/em>\u00a0of 65. To count overlaps on these 18,733 polygons using the spaghetti and meatballs method takes about 65 seconds on my laptop. Using\u00a0<a href=\"http:\/\/blogs.esri.com\/esri\/arcgis\/2012\/10\/31\/announcing-64-bit-geoprocessing\/\" target=\"_blank\" rel=\"noopener\">64bit background processing<\/a>, it takes 44 seconds.<\/p>\n<div class=\"wp-caption alignnone\">\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/downloads.esri.com\/Blogs\/analysis\/SpaghettiAndMeatballs\/oil_spill_detail.png\" alt=\"\" width=\"599\" height=\"273\" \/><\/p>\n<p class=\"wp-caption-text\">Figure 12: Details of the oil spill polygons<\/p>\n<\/div>\n<h2>Summary<\/h2>\n<p>Overlapping polygons in a single feature class is not uncommon. By creating spaghetti with the Features To Polygon tool, you can resolve the overlaps and begin further analysis. The technique of creating meatballs (centroids) of the spaghetti gives you a point feature class that can be used in overlays to discover other properties, such number of overlaps as was done with the oil spill data above. In a future post, I\u2019ll show how you can use this technique to resolve one-to-many problems that occur frequently in ecology data, where geographic extent (the range) of an individual species is captured as a single polygon, and the task is to find overlapping ranges and the species within.<\/p>\n<p>A final note: this spaghetti and meatballs technique is not a substitute for standard overlay tools such as\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Intersect\/00080000000p000000\/\" target=\"_blank\" rel=\"noopener\">Intersect<\/a>,\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Identity\/00080000000n000000\/\" target=\"_blank\" rel=\"noopener\">Identity<\/a>, and\u00a0<a href=\"http:\/\/resources.arcgis.com\/en\/help\/main\/10.1\/index.html#\/Union\/00080000000s000000\/\" target=\"_blank\" rel=\"noopener\">Union<\/a>. Spaghetti and meatballs is only for data that has the exact same attribute schema\u2014that is, you have a single feature class with overlapping polygons. If you have two or more feature classes, such as one of soil data and another of slope data, you\u2019ll want to use the standard overlay tools.<\/p>\n<p>Read the next blog in this series:\u00a0<a href=\"http:\/\/blogs.esri.com\/esri\/arcgis\/2012\/11\/26\/spaghetti_meatballs_one_to_many\/\">spaghetti, meatballs, and the one-to-many problem<\/a><\/p>\n"}],"authors":[{"ID":3991,"user_firstname":"Dale","user_lastname":"Honeycutt","nickname":"dmhoneycutt","user_nicename":"dmhoneycutt","display_name":"Dale Honeycutt","user_email":"dhoneycutt@esri.com","user_url":"","user_registered":"2018-03-02 00:15:37","user_description":"","user_avatar":"<img alt='' src='https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&#038;d=blank&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=192&#038;d=blank&#038;r=g 2x' class='avatar avatar-96 photo' height='96' width='96' loading='lazy' decoding='async'\/>"}],"related_articles":"","card_image":false,"wide_image":false},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>More adventures in overlay: counting overlapping polygons with spaghetti and meatballs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2018-12-18T19:26:51+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\"},\"author\":{\"name\":\"Dale Honeycutt\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088\"},\"headline\":\"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs\",\"datePublished\":\"2012-11-13T18:41:36+00:00\",\"dateModified\":\"2018-12-18T19:26:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\"},\"wordCount\":11,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"geoprocessing\",\"Overlapping Polygons\",\"overlay\"],\"articleSection\":[\"Analytics\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\",\"name\":\"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2012-11-13T18:41:36+00:00\",\"dateModified\":\"2018-12-18T19:26:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088\",\"name\":\"Dale Honeycutt\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g\",\"caption\":\"Dale Honeycutt\"},\"url\":\"\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","og_locale":"en_US","og_type":"article","og_title":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2018-12-18T19:26:51+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs"},"author":{"name":"Dale Honeycutt","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088"},"headline":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs","datePublished":"2012-11-13T18:41:36+00:00","dateModified":"2018-12-18T19:26:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs"},"wordCount":11,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["geoprocessing","Overlapping Polygons","overlay"],"articleSection":["Analytics"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs","name":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2012-11-13T18:41:36+00:00","dateModified":"2018-12-18T19:26:51+00:00","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/arcgis-desktop\/analytics\/more-adventures-in-overlay-counting-overlapping-polygons-with-spaghetti-and-meatballs#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"More adventures in overlay: counting overlapping polygons with spaghetti and meatballs"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/ecf725596ec627cacb0bf10409502088","name":"Dale Honeycutt","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/5431fd1559b9dcbc86438ecb083710d6710a1a74625018e6378d57ab2d6149fe?s=96&d=blank&r=g","caption":"Dale Honeycutt"},"url":""}]}},"text_date":"November 13, 2012","author_name":"Dale Honeycutt","author_page":false,"custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/08\/Newsroom-Keyart-Wide-1920-x-1080.jpg","primary_product":"ArcMap","tag_data":[{"term_id":24321,"name":"geoprocessing","slug":"geoprocessing","term_group":0,"term_taxonomy_id":24321,"taxonomy":"post_tag","description":"","parent":0,"count":129,"filter":"raw"},{"term_id":39581,"name":"Overlapping Polygons","slug":"overlapping-polygons","term_group":0,"term_taxonomy_id":39581,"taxonomy":"post_tag","description":"","parent":0,"count":4,"filter":"raw"},{"term_id":28481,"name":"overlay","slug":"overlay","term_group":0,"term_taxonomy_id":28481,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw"}],"category_data":[{"term_id":23341,"name":"Analytics","slug":"analytics","term_group":0,"term_taxonomy_id":23341,"taxonomy":"category","description":"","parent":0,"count":1325,"filter":"raw"}],"product_data":[{"term_id":36991,"name":"ArcMap","slug":"arcgis-desktop","term_group":0,"term_taxonomy_id":36991,"taxonomy":"product","description":"","parent":36981,"count":325,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=arcgis-desktop","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/182811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/3991"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=182811"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/182811\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=182811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=182811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=182811"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=182811"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=182811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}