Posted 30 April 2008 - 08:33 AM

Does anyone knows how to reorder and rename fields of shapefiles in Arc? We have clients that have really strict specifications and we need to do that for them without, if possible, having to create new files everytime.

pfyfield

Posted 30 April 2008 - 08:49 AM

pfyfield

Master Contributor

Validated Member

100 posts

Gender:Male

Location:Portland, Oregon

United States

There are two ways I commonly do this. One is to add new fields with the names and in the order that I want and use the field calculator to copy the attributes over from the fields I don't want, then delete them. This is clearly not ideal.

If I need to do substantial edits I do it in excel.

Paul FyfieldCartographer, Bureau of Land ManagementOregon State OfficePortland, Oregonpfyfield@blm.gov

Hans van der Maarel

Posted 30 April 2008 - 08:57 AM

Hans van der Maarel

CartoTalk Editor-in-Chief

Admin

4,170 posts

Gender:Male

Location:The Netherlands

Interests:Cartography, GIS, history, popular science, music.

Netherlands

This can be done in FME (I was going to say "quite easily", but then I thought of that one project where I had to put 50+ columns in the correct order), which has the added benefit of being reproducable. Of course that's only going to help if you have to export data into that structure on a regular basis

Erin John LeFevre

Posted 30 April 2008 - 09:34 AM

Interests:I'm interested in writing music, making maps, hiking around my home in the mountains of Colorado, and spending time with my family and friends.

United States

There are two ways I commonly do this. One is to add new fields with the names and in the order that I want and use the field calculator to copy the attributes over from the fields I don't want, then delete them. This is clearly not ideal.

If I need to do substantial edits I do it in excel.

Unfortunately I believe this is what you have to do if your working with shp files. How about using feature classes instead? You should be able to modify the names directly in MS Access if you went that route. Someone correct me if I'm wrong. You could also download the XTools trial. They have a tool called "Table Restructure" but I don't know the specifics on it. So who knows.

With the field names could you get away with assigning an alias? Check out XTools

Posted 30 April 2008 - 10:12 AM

Unfortunately I believe this is what you have to do if your working with shp files. How about using feature classes instead? You should be able to modify the names directly in MS Access if you went that route. Someone correct me if I'm wrong. You could also download the XTools trial. They have a tool called "Table Restructure" but I don't know the specifics on it. So who knows.

With the field names could you get away with assigning an alias? Check out XTools

I did it often when I was working in geodatabase, but we have to work with shapefile exclusively...

I had XTools and it works well. It create a new file, but I can live with that but if I may... any free tools to do that? (I just don't have to be the one to always do those operations )

Posted 30 April 2008 - 12:05 PM

I asked the same question to a ESRI Mapping Center's cartographer and it's his/her response:

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.

I still think it should be easier to do it... MapInfo do it quite well! (that last comment was just to tickle them )

I really like XTools when working with shapefiles within an arc environment. It may be over $100, but if your an ESRI'er, it has many other tools (eg recalcing area and length, etc) that make GIS life much more pleasant.

Posted 30 April 2008 - 07:32 PM

save as XLS > import into ArcMap as a separate table > join XLS to original dbf > delete original data

but than again I'm a Manifold user, & my Arc knowledge is a bit back at 8.3

"There is much beauty that we fail to see through our own eyes teeming with life forms that give us that perception of our reality. Leaves on the trees blowing gently in the wind, or scarily, the waves pounding through high surf, or lightly on a warm summer’s day; that opportunity to sit or swim in the water on a white beach. That comfort to shout, “The universal conscious do you hear me? I am alive, guide me dear logos towards the path of rightnesses.” Earned what has been kept, no longer to be absorbed into a life filled with cold damn winds and that stubborn fog clouding my vision with nothing but darkness."

peanut

Posted 01 May 2008 - 07:39 AM

peanut

Master Contributor

Validated Member

138 posts

Location:Austin, TX

United States

I really like XTools when working with shapefiles within an arc environment. It may be over $100, but if your an ESRI'er, it has many other tools (eg recalcing area and length, etc) that make GIS life much more pleasant.

As of ArcGIS 9.2 calculating area and length are part of the core product. Just right click on your field and select calculate geometry. I am so glad ESRI added this.

I really like XTools when working with shapefiles within an arc environment. It may be over $100, but if your an ESRI'er, it has many other tools (eg recalcing area and length, etc) that make GIS life much more pleasant.

As of ArcGIS 9.2 calculating area and length are part of the core product. Just right click on your field and select calculate geometry. I am so glad ESRI added this.

Rich

so true! back in the day i would convert my edited shapefile to a coverage so i could get recalced area, create a new "acre" field, and then do a math calculation just to populate the field. then, after all of that, i would have to reconvert the coverage back into a shapefile for my clients. ESRI's move from coverage to gdb was pretty painful from 8.2-9.0. I did that a couple of times before I just went back to the command line environment and edited coverages in arcedit. ArcMap gui is nice, but I still marvel at how much good stuff was left behind and is only now resurfacing. Most commonly in the toolbox, but it's a rare pleasure when it's only a right mouse click away!