Select to view content in your preferred language

Add a new version of a feature in a database without losing the data from the old version

1981
4
Jump to solution
10-23-2021 04:23 AM
IB3
by
Regular Contributor

Hi, AG community, 

I have to edit a feature class of polygons so that it matches another feature class of polygons. 

I have a feature class with up-to-date topographic data and I have to update a feature class that represents only the waterway based on it. In other words, I have to align the water surfaces with the ones from the topographic feature. 

Sometimes, I only need to make small adjustments, then it's easier just to edit the vertices so that the borders match the ones from the topographic surface. 

But in some cases, the difference is pretty big and I think it would be simpler to just make a copy of the surface in the topographic database and include it in the waterway database. 

I arrive at the real problem. The databases don't contain the same fields. Plus, it's really important that I keep the object ID in the waterway feature class which is automatically created. I can't make new ones. 

Does anyone have an idea how I can add a new version of a feature in a database without losing the data that is already linked with the old version (not aligned) of the feature? Or if you have other solutions to propose, I am interested to hear about them. 

Thanks in advance!

 

 

 

 

 

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

There's also this really great feature under Editor SettingsField Mapping. These settings apply to the Transfer Attributes tool.

You can set your fields to align as needed, if the fields are different. Importantly, you can include the shape as a transferred attribute. It's also possible to use expressions for the transfer, if, for example, you needed to convert from meters in one layer to feet in the other, or wanted to concatenate two fields from one to a single field in the other.

jcarlson_1-1635169364332.png

You have to be quite careful which features you click on with the Transfer Attributes tool, but you can always hit "Undo" if you've modified the wrong one.

- Josh Carlson
Kendall County GIS

View solution in original post

0 Kudos
4 Replies
JohannesLindner
MVP Frequent Contributor

Option 1:

  • select your "wrong" polygon
  • Replace Geometry (ArcGIS Pro: Edit -> Tools)
  • Trace the "correct" polygon

 

Option 2:

  • select both polygons  !IMPORTANT!
  • edit and run this code in the python window
source_layer = "Layer with the correct shape"
destination_layer = "Layer with the wrong shape"

correct_shape = [row[0] for row in arcpy.da.SearchCursor(source_layer, ["SHAPE@"])][0]
with arcpy.da.UpdateCursor(destination_layer, ["SHAPE@"]) as cursor:
    for row in cursor:
        cursor.updateRow([correct_shape])

 


Have a great day!
Johannes
IB3
by
Regular Contributor

Thanks Johannes, I will have a look! 

0 Kudos
jcarlson
MVP Esteemed Contributor

There's also this really great feature under Editor SettingsField Mapping. These settings apply to the Transfer Attributes tool.

You can set your fields to align as needed, if the fields are different. Importantly, you can include the shape as a transferred attribute. It's also possible to use expressions for the transfer, if, for example, you needed to convert from meters in one layer to feet in the other, or wanted to concatenate two fields from one to a single field in the other.

jcarlson_1-1635169364332.png

You have to be quite careful which features you click on with the Transfer Attributes tool, but you can always hit "Undo" if you've modified the wrong one.

- Josh Carlson
Kendall County GIS
0 Kudos
IB3
by
Regular Contributor

Thanks @jcarlson I will have a look! 

0 Kudos