0

When saving shapefiles, geocoding results or even exporting data in ArcMap, many different files are created. Most of the time when I save a shapefile, I want only the shapefile and not a .cpg, .prj, lock file, etc.

Is there a way to tell ArcMap (desktop version) using either the UI or Python code, to only save one file when saving shapefiles, dBase tables, etc.

  • 4
    A shapefile isn't just one file. You might want to research the format (en.wikipedia.org/wiki/Shapefile) to find out what all those other files are. – Chris W Apr 10 '15 at 18:49
  • 4
    The PRJ should have been mandatory, but didn't start to be distributed until several years later. The CPG is the newest file, and contains critical information on the codepage used in the dBase file. Lockfiles go away once the lock expires. – Vince Apr 10 '15 at 18:50
9

You may have some "unnecessary" files being created but ArcMap requires 3 files at a minimum for a shapefile to be usable. The absolute minimum is: SHP, SHX and DBF. The PRJ is also very helpful because it defines what coordinates system your shapefile is in.

Some of the others are related to spatial features and are not strictly necessary, but ArcMap will recreate them the next time you open the shapefile in ArcMap anyway, so deleting them won't do you any good in the long term.

Two options for better organization of your files are:

  • Use ArcCatalog to view your files, instead of Windows Explorer - this way you will only see one item for each shapefile. All of the files will remain in Windows Explorer but you will have a much cleaner view in ArcCatalog
  • Store your data in a Geodatabase rather than in shapefiles - Storing your data in a GDB will clean up the look and function the same way in ArcMap. It will appear as one MDB file/folder in Windows Explorer - if you look inside it is messy but you don't want to do anything with it in Windows Explorer, use ArcCatalog or ArcMap.
4

That's just the way shapefiles are. Each of those extra files contains data that is pertinent to how the shapefile is read by the GIS software. For example the .prj file stores the projection information for the shapefile, if you delete it the GIS software will see your shapefile as unprojected. Another is the .dbf file - this stores all the attribute data that is loaded into the attribute table. Unfortunately they're pretty cumbersome.

There are some alternative data formats that might work better for you depending on the situation. You can look at KML/KMZ files, or possibly GPX.

You might consider keeping all your data as feature classes inside of a geodatabase - that way all of your data lives in a single file like an MS Access database or a folder (as in an ESRI file geodatabase).

There's some good info on the various types of geodatabases here: http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/types_of_geodatabases.htm

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.