Hello,
I'm looking for suggestions to clean up some polygons I've generated from rasters. I want to explain what I've done up to this point first to give some background information:
1. Generated rasters from contour data to show 'low lying areas'. I have ~350 rasters, because for the scope of this project, I needed to generate a unique raster for each relevant polygon (each polygon has a different definition of/parameters for a low-lying area)
2. Clipped each of the resulting rasters to its appropriate polygon, using the polygon's geometry as the clipping extent:
3. Converted each of the rasters to polygons:
As expected, the perimeter of the resulting polygon does not perfectly match the original:
How can I clean up the polygons I've created so they match the boundaries of the original polygons? If there were only a handful of them, I'd just do it manually using trace tools, but with 350+ polygons, this isn't feasible. I also cannot take the original polygon geometry and apply it to the generated polygons, because that'll defeat the purpose of what I've generated (green polygon is the low-lying area generated from the selected polygon):
I've tried using the Align Features tool, but it's not giving me the results I was hoping for.
I've also tried the Overlay Layers tool, and when combined with spatial & table joins, I am able to delete the bits of my polygons that overlap into the wrong original polygons. So that gains me a bit of progress, but I still end up with small gaps
Each of the generated polygons has a field ("POLY_ID") that matches the original polygon. I have access to almost all the Esri toolboxes.
Any suggestions would be very appreciated
Expand (Spatial Analyst)—ArcGIS Pro | Documentation
like a buffer (a cell size or 2), but for rasters prior to clipping "might" help, but nothing is going to give you a perfect match to the polygon edge, even for really small cell sizes.
Another tool I would consider is the Align Edge feature modication tool that works with topological edges. You can read more about this here - Align topological edges—ArcGIS Pro | Documentation
Thanks Robert, that works really well. The issue I have with that is the sheer number of polygons that I'll need to do that with. If I only had a handful, that would be a perfect solution
Right, thanks Dan. That would be a good thing to try out, but like you said, it's not going to be a perfect match. I'm fine with the raster not matching perfectly, because it's the polygon that I'm really going for. Here's a bit more context:
I'm generating these polygons to assign specific sections of road as 'low lying', but along the polygon edges, there are some spots that will be missed just because the geometries don't 100% line up. In this example, the purple line is the original polygon geometry, and the blueish and pink areas are 2 of the generated polygons. In theory, the grey RR280 vertical line *should* get split at the purple line: Everything above will be called "Type A" and everything below will be "Type B".
The problem is that I can't use the purple line to split the road line because I have way more spots where the road crosses a purple line without a low-lying area than I have spots that do have a low-lying area. I put green circles around areas the roads would split where I *don't* want the roads to be broken up:
If I just use the polygons I generated, I'll end up with errors in spots like that first picture where the section of road going through the gap won't be designated as a low-lying area, even though it should be. In that example, I'll end up with an unclassified 3.25m line
Any thoughts?
short of manually editing/classifying there is little you can do... except perhaps reduce your cell size by a factor of 2 or so.
you will never get things to match perfectly, nor split perfectly. Perhaps you need to concentrate on identifying those potential areas of discrepency to accompany the main focus of the delineation
I figured out a way to get some results I'm happy with. I haven't done much QC with it yet, but it seems like it's going to work out. Here's what I did:
1. Used the Overlay tool to identify non-overlapping areas between my original polygons and my generated polygons, and created a feature class from that
2. Converted the non-overlapping areas into singlepart polygons
3. Made a 15m buffer around my generated polygons. I did 2 of these: One completely dissolved, and one dissolved on the POLY_ID field.
4. Selected any non-overlapping areas that were completely within my dissolved polygon, and deleted them.
5. Used a quick python script to iterate through each of my generated (buffered) polygons and clipped them to their original polygon to re-establish that boundary (the purple line in my previous posts)
6. Now I had 15m too much around my generated polygons wherever they didn't clip to the original boundaries. So, I did another overlay to identify the 'empty' areas between the original polygons, and my generated polygons.
7. I created another 15m buffer around those 'empty' areas (dissolved on POLY_ID), and clipped each to their corresponding original polygon using the script from step 5.
8. Now I had 2 polygon types inside each of my original polygons with their combined outer boundaries matching the original polygon. But the two polygon types overlapped 15m
9. Used Pairwise Erase to remove the 15m overlap from my low-lying polygons
10. Added a source field to both new feature classes (low lying vs not low lying) and merged into one final feature class.
I ended up with a 5 square meter discrepancy over 4,227 square kilometers. Was this a perfect method? Nope. Did I make some assumptions as I went? Yep. But is it going to be close enough for what I need? Absolutely
Thanks for all the suggestions