Select to view content in your preferred language

Split shapefile into smaller shapefiles using Python

5072
5
02-23-2016 11:03 AM
DavidBarry1
Occasional Contributor

Is there a way I can take a large shapefile and split it into several smaller shapefiles using Python? My point shapefile has about 62,000 records and I'm trying to spatially join it to a line feature class, but it's taking forever. I'm thinking if I was able to split it up that I could spatially join each "mini" shapefile and get through the process faster. Any thoughts would be greatly appreciated. Thanks!

0 Kudos
5 Replies
XanderBakker
Esri Esteemed Contributor

Sure you can, no problem, but maybe you want to test with a different format first. Have you tried loading your data into a File Geodatabase? This format may result in faster joins.

To split into shapefile into different featureclasses, how do you want to split them up, based on a spatial characteristics of simply taking a # number of records and writing them to a new featureclass?

0 Kudos
DavidBarry1
Occasional Contributor

For some reason, ArcMap is crashing when I try to export from the shapefile into a file geodatabase feature class. So I guess I'm going to have to stick with working from the shapefile. Also, I'd like to just split it up based on a number of records (no particular outcome other than breaking the shapefile up into smaller shapefiles (or feature classes)).

0 Kudos
DanPatterson_Retired
MVP Emeritus
DavidBarry1
Occasional Contributor

Thanks Dan, I'll have a look at it!

0 Kudos
TroyFoster
Frequent Contributor

dead link, and judging by his username he retired 😞

0 Kudos