0

I have layers containing polygons. The difference between the layers are the periods of the year about which the layers have information. So layer 1 is called Lawn_p1 and layer 2 is called Lawn_p2 (p stands for period) and so on. The layers contain the same fields. With model builder I want to combine all these layers into one shapefile and also add for every field p1 up to p10. This way for every polygon I can see all the information for every period in the same row.

As a first step I want to change the field names of each layer by adding the period to it: so for layer Lawn_p1 every field should get _p1 at the end. This should then be done for all the other layers as well. Then I should merge/join the layers.

Does anyone know how to do the first step with model builder for all the layers?

I guess I have to use iteration/for loops.

2

I don't think you can rename fields in shapefiles, which is a very old format. Import your layers into a file geodatabase then a simple model with FeatureClass iterator you can use AlterField tool to change the name of existing fields.

If the actual boundary of each polygon does not change in shape or size then you could use the JoinField tool to join fields into layer 1.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.