Extend polygon to line in batch?

5007
11
02-05-2015 08:18 AM
NathanialStory1
New Contributor III

I am looking for a good way to 'fill the gaps' between my county's polygon layer and a land use layer I inherited.Temp.JPG

I need the green symbolized land use polygons to, at the very least, overlap the red lined parcel polygons. There are several thousands of this example throughout my county and I would like to avoid correcting them by hand if I can. Does anyone have a solution or tool for my situation? Thank you!

0 Kudos
11 Replies
DanPatterson_Retired
MVP Emeritus

There appears to be no pattern in the sample image that you submitted, suggesting that these are the artifacts of manual digitizing.  If this is indeed representative of the pattern throughout your image, I can't think of anything offhand that would take spatially random displacements/mis-shapes and get everything back to where you want it to be.  Should you be able to identify a particular shift in one direction, then it may be due to a projection/datum issue.  If not and the shapes are randomly different, then nothing can take randomness and impose order.

0 Kudos
ChrisDonohue__GISP
MVP Alum

I'm doing something similar for my City's Land Use layer, where most of the Land Use extents are parcel based.  If I am reading your request correctly, you need to get the green Land Use polys at minimum to extend as far as the red Parcel polygons.  While not an automated/instant solution, this suggested process will identify the issues areas where your landuse polys do not extend as far as the parcels and provide some spatial material to quickly fix some of them without having to redraw them:

If you have access to an Advanced (ArcInfo) license:

- Use the Erase (Analysis) Geoprocessing Tool, with the Parcels as the Input Feature and the Land Use as the Erase Features.  This will result in a polygon polygon feature class representing the "gaps" between the Parcel layer and the landuse.

If you only do not have access to an Advanced (ArcInfo) license:

- You can do a process that essentially the same as Erase, but takes more steps.

Use the Union Geoprocessing tool with both the Landuse and Parcels as inputs, and with the "Allow Gaps" parameter set to "ALL".  The new feature class that results will be a combination of the two originals.  To find the "gaps", you will next need to make a selection from the Union featureclass.  Find the field called FID_parcels and do a selection of all that are a value of -1.  Export the resulting polygons as a new feature class - these are your "gap" polygons.

Some gaps can then be fixed fairly easily:

You can use this new "gaps" feature class as a means to correct the "easy" problem areas of your landuse - i.e. there is only landuse polygon and one parcel, with a gap between them - by using the Merge Geoprocessing Tool or the Append Geoprocessing tool to add those polygons back into your Landuse feature Class.  Before running either, it is probably best to delete all the attribute fields in your "gap" feature class so as to prevent confusion in the following steps.  The Delete Field (Data Management) Geoprocessing tool is very helpful for this.

Then start an edit session on the landuse and select the original landuse poly and the new one, and then on the Editor Toolbar select Editor, Merge.  On the "Merge" Window that pops up, there will be two (or more) polygons listed.  Click on it (it will flash them so you can tell which one you are on) to find the original one.  Highlight that one and hit OK to finish the merging.  Be sure to select the original landuse polygon so you retain the original attributes.

As for the more complex areas:

These will likely take lots of manual editing and decision-making.  You have the material to fill the gaps, but decisions will need to be made on how to split it up so it correctly extends the existing landuse polys to the parcel limit.

Erase

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Union

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Append

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Merge

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Delete Field

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Chris Donohue, GISP

ChrisDonohue__GISP
MVP Alum

Another idea:

If your Landuse layer is parcel based and should match the parcel base, you may be able to accomplish a full changeover without using my previous suggestion by doing the following:

1.  Run the Identity (Analysis) Geoprocessing Tool, with the Parcels as the Input Features and the Landuse as the Identity Features.  Make sure the Join Attributes parameter is still on "All" (the default).  This will add the Landuse attributes to your parcels and esssentially create a new Landuse feature class.

2.  Run a Dissolve (Data Management) Geoprocessing Tool with the field that differentiates your Landuse as the "Dissolve Field".

3.  Clean things up by Deleting any extra fields (there may be many from the Identity).

CAVEAT:

If the existing Landuse is not coincident to the parcels (i.e. the landuse unintentionally splits a parcel), running an Identity on it will result in a multitude of new polygons.  Instead, you may be able to get around this by doing a Spatial Join (Analysis) instead of an Identity. You will have to test some of the Spatial Join settings to find the optimal one for your data.

Another approach would be to create Centroids and Identity or Spatial Join that, but that gets a bit more complex to work out.

Identity(Analysis)

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Dissolve

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Spatial Join

ArcGIS Help (10.2, 10.2.1, and 10.2.2)

Chris Donohue, GISP

0 Kudos
NathanialStory1
New Contributor III

Thanks Chris,

Unfortunately my Landuse layer isn't parcel based. I started with your first suggestion and it has highlighted my problem areas, its somewhat slow going but I guess I am just a little whiny and looking for a 'magic' tool to fix all my problems .

Thanks again Chris!

0 Kudos
MicahBabinski
Occasional Contributor III

The Integrate(Management) tool may meet your needs, but make a copy of your data before experimenting, as this tool will permanently alter your data.

I'll be curious to know what ends up working as I occasionally have similar challenges!

Regards,

Micah

0 Kudos
NathanialStory1
New Contributor III

Micah,

That tool like like exactly what I am looking for, however, does it appears it modifies both inputs. Is there a way or a separate tool that holds one input as "gospel" and modifies the others?

Thanks again!

0 Kudos
MicahBabinski
Occasional Contributor III

The only thing that comes to mind is the ranking setting within the tool. Specifying your 'gospel' layer as a 1 may leave its geometry intact while making modifications to the 2 layer.

Then again, it does say the top-ranked layer may be modified if using a large cluster tolerance, so I can't say for sure.

Hope that helps.

Micah

NathanialStory1
New Contributor III

Thanks Micah,

I tried the rankings but unfortunately my XY tolerance is large enough that no matter the ranking it still moves the input ranked at "1".

0 Kudos
MicahBabinski
Occasional Contributor III

Ok, here's my final idea before I admit defeat!

Make a few copies of the parcel boundaries dataset, with numbered suffixes like "parcels_1", "parcels_2", "parcels_3", "parcels_4", "parcels_5", etc. Then, use a for loop with a range to go through them, using each one as the first-ranked input to the integrate tool, like:

for x in range(1, n):
    arcpy.Integrate_management("[path]\\parcels_" + str(x) + " 1;[path]\\landuse 2", [cluster_toleance])

If each iteration makes a little bit of progress, then perhaps by the end of your process you will have a land use layer that aligns with the parcel boundaries.

Micah

0 Kudos