Select to view content in your preferred language

Create multiple shapefiles from one

6406
3
09-27-2014 03:42 PM
ErikAnderson2
Deactivated User

I need to break a shapefile (TIGER roads data) into multiple shapefiles based on an attribute field. I need to break the shapefile up into ~100 separate shapefiles, so I would prefer to do this iteratively in ModelBuilder or if necessary with Python script. Can anyone help me figure out the most efficient way to do this?

Thanks,

Erik

Tags (3)
0 Kudos
3 Replies
MahtabAlam1
Frequent Contributor

Use arcpy.Frequency_analysis to get the unique value of your attributes into a table

Use cursor to read these unique values from this table

Inside this cursor use

arcpy.FeatureClassToFeatureClass_conversion with unique value as in where clause

0 Kudos
DanPatterson_Retired
MVP Emeritus

Use Split Layers by Attributes  make sure your shapefile resides in a folder and not a geodatabase

JimCousins
MVP Regular Contributor

I have used Dan's tool Split Layers by Attriubtes, and it works quite well.

0 Kudos