Ask A Cartographer

Reorder and rename fields of shapefiles

April 30 2008 | 0 comments
Categories: ArcGIS Methods

Hi!

How could I reorder and rename fields of shapefiles in Arc without having to create a new file? We need to do some editing of some shp structure for clients who have really strict specifications...

thanks!

Mapping Center Answer:

First, there's now way to rename fields.  So you have to create a new field and calculate it to have the values of the old field, which for a one-off problem is likely faster.

But if the shapefile has a number of such problems, there's no way to do this without creating a new shapefile.   But, the new shapefile could replace the old one.  Here's how I would do this. Create a Geoprocessing model that creates a new empty feature class and then sequentially adds the fields in the correct order using the Add Field tool. It is very important to exactly match all the properties of these fields to your original dataset's fields (the name may need to be changed. Then use the Append tool with your original feature class as the input dataset and your empty feature class as the target dataset.  Note that you can use the field mapping part to deal with mis-named fields.

Now you have a model that you can run anytime you receive non-conforming data for this client.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |