Jump to content

 
Photo

Reorder and rename fields in ArcGIS

- - - - -

  • Please log in to reply
19 replies to this topic

#1
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 688 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

Hi!

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.

Thanks!

#2
pfyfield

pfyfield

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 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 Fyfield
Cartographer, Bureau of Land Management
Oregon State Office
Portland, Oregon
pfyfield@blm.gov

#3
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,860 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 :rolleyes:
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#4
ELeFevre

ELeFevre

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 1,049 posts
  • Gender:Male
  • Location:Louisville, Colorado USA
  • Interests:Cartography, musical instruments, reading, hiking, craft beer
  • 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



#5
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 688 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

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 :P )

Thanks Erin! :)

#6
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 688 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

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 ;) )

#7
ELeFevre

ELeFevre

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 1,049 posts
  • Gender:Male
  • Location:Louisville, Colorado USA
  • Interests:Cartography, musical instruments, reading, hiking, craft beer
  • United States

MapInfo do it quite well! (that last comment was just to tickle them ;) )


Yep, you can do this in Mapinfo with one hand tied behind your back and one eye closed!



#8
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,301 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

Why make it hard for yourself - just open the .dbf file in excel and go nuts at it! (rename, reorder etc)

For tasks that you may need to repeat, you can also script things in e.g. python.
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#9
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 688 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

Why make it hard for yourself - just open the .dbf file in excel and go nuts at it! (rename, reorder etc)


Well I guess I wanted to it while editing my files because it's when I need to do it ;) ... and because Excel 2007 doesn't save in .dbf anymore :( I'll try some dbf editor from the Web...

#10
ELeFevre

ELeFevre

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 1,049 posts
  • Gender:Male
  • Location:Louisville, Colorado USA
  • Interests:Cartography, musical instruments, reading, hiking, craft beer
  • United States

Why make it hard for yourself - just open the .dbf file in excel and go nuts at it! (rename, reorder etc)


Well I guess I wanted to it while editing my files because it's when I need to do it ;) ... and because Excel 2007 doesn't save in .dbf anymore :( I'll try some dbf editor from the Web...



Open Office!




#11
A. Fenix

A. Fenix

    Analisa Fenix

  • Validated Member
  • PipPipPipPip
  • 175 posts
  • Gender:Female
  • Location:Cascadia
  • Interests:Cartography, PGIS, PPGIS, GIS, Urban/regional Planning, Conservation, Biodiversity/Cultural Diversity, Travel, History, Ecology, Geography, Biking, Gardening, Cooking, Physics, Permaculture, Sky diving, Green Roofs, Music (creating and enjoying), Photography, Carpentry, Film making, Writing...
  • No Country Selected

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.
Analisa Fenix
GIS Manager/Chief Cartographer
Ecotrust

#12
James Hines

James Hines

    James Anthony Hines

  • Validated Member
  • PipPipPipPipPipPip
  • 536 posts
  • Gender:Male
  • Location:Centreville, Nova Scotia
  • Interests:Cartography, Philosophy, Politics, Psychology, Economics, Occultism, Spiritualism
  • Canada

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."


#13
frax

frax

    Hall of Fame

  • Associate Admin
  • PipPipPipPipPipPipPip
  • 2,301 posts
  • Gender:Male
  • Location:Stockholm, Sweden
  • Interests:music, hiking, friends, nature, photography, traveling. and maps!
  • Sweden

How about MS Access 2007 then?
Hugo Ahlenius
Nordpil - custom maps and GIS
http://nordpil.com/
Twitter

#14
peanut

peanut

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 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.

Rich

#15
A. Fenix

A. Fenix

    Analisa Fenix

  • Validated Member
  • PipPipPipPip
  • 175 posts
  • Gender:Female
  • Location:Cascadia
  • Interests:Cartography, PGIS, PPGIS, GIS, Urban/regional Planning, Conservation, Biodiversity/Cultural Diversity, Travel, History, Ecology, Geography, Biking, Gardening, Cooking, Physics, Permaculture, Sky diving, Green Roofs, Music (creating and enjoying), Photography, Carpentry, Film making, Writing...
  • No Country Selected

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!

a
Analisa Fenix
GIS Manager/Chief Cartographer
Ecotrust




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->