Editing the geometry of polygon to match polygon in same geographical location but in different shapefile

370
3
Jump to solution
04-28-2021 09:43 AM
Labels (2)
RadkaAnyzova
New Contributor

Hello, i have two shapefiles, each including 200 polygons scattered in the area (sites distributed in the area). both of the shapefiles are for the same area and showing same sites (corresponding site codes in attributes table) but one of the shapefiles has the polygons edited to their proper outlines, the second one however, all of the polygons are in form of centroids. i need to edit those centroids to the outline of those in the other shapefile and i dont want to do it all by hand in editor. Is there any way to do it automatically? is there any function such as clip, which would not only cut the centroids but also fill the area where the centroids are not?

Thank you

Radka

0 Kudos
2 Solutions

Accepted Solutions
JohnSobetzer
Frequent Contributor

If the matching polys share a unique site ID you could do a join of the centroids to your shape polys and export that to a new layer, deleting the fields you don't want to keep.  If they don't share a unique ID you could do a spatial join and then delete the fields you don't want, or prior to the join make a copy of your shape polys, delete its fields and then do the join.  This assumes the centroids are all within the shape polys which isn't always true but a select by location might tell you which ones to manually move.  Another option if you have the Advanced License is to use the Feature to Point tool on the centroids, Feature to Line on the shape polys, and then Feature to Polygon with those lines as inputs and the points as "labels" with the attributes.

View solution in original post

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Do all the centroid polygons's overlay on top of the corresponding polygons with actual boundary? Then  Spatial Join tool should resolve your issue.

Keep the Actual Boundary Polygon layer as the target features, and the Centroid polygon layer as the Join features.

Join Operation: One-to-One

Match Option: "CONTAINS" or "COMPLETELY CONTAINS"

You may then delete the field(s) that you don't need in the output.



Think Location

View solution in original post

0 Kudos
3 Replies
DavidPike
MVP Frequent Contributor

I would probably run a search cursor to grab the SHAPE@ geometry token of the correct feature.

Then a search cursor to run through the point/centroid feature class, grab the required attributes to then insert those and the correct geometry into either a new feature class or the correct polygon fc.

JohnSobetzer
Frequent Contributor

If the matching polys share a unique site ID you could do a join of the centroids to your shape polys and export that to a new layer, deleting the fields you don't want to keep.  If they don't share a unique ID you could do a spatial join and then delete the fields you don't want, or prior to the join make a copy of your shape polys, delete its fields and then do the join.  This assumes the centroids are all within the shape polys which isn't always true but a select by location might tell you which ones to manually move.  Another option if you have the Advanced License is to use the Feature to Point tool on the centroids, Feature to Line on the shape polys, and then Feature to Polygon with those lines as inputs and the points as "labels" with the attributes.

0 Kudos
JayantaPoddar
MVP Esteemed Contributor

Do all the centroid polygons's overlay on top of the corresponding polygons with actual boundary? Then  Spatial Join tool should resolve your issue.

Keep the Actual Boundary Polygon layer as the target features, and the Centroid polygon layer as the Join features.

Join Operation: One-to-One

Match Option: "CONTAINS" or "COMPLETELY CONTAINS"

You may then delete the field(s) that you don't need in the output.



Think Location
0 Kudos