![]() ![]() I used script and updated it for ArcGIS 10.x users. Gp.Select_analysis (inputFile, outSHP, "\"my_attribute\" = '" + each_attribute + "'") #<- CHANGE my_attribute to the name of your attribute OutSHP = outDir + each_attribute + u".shp" # Output a Shapefile for each different attribute # Reads My_shapefile for different values in the attributeĪttribute_types.add(row.my_attribute) #<- CHANGE my_attribute to the name of your attribute InputFile = u"C:\\GISTemp\\My_Shapefile.shp" #<- CHANGE # Example for a Inputfile called "my_shapefile" and a field called "my_attribute" ![]() # Script created to separate one shapefile in multiple ones by one specific After adapting the code for your my_shapefile, outputdir and my_attribute it should work. ![]() If you are not familiar with python scripting, all you need to do is open you IDLE (the python GUI) create a new file, and copy the code below. You can create a simple script in Python, that checks your attribute field for different values, and then, for each of them runs a SELECT operation to your original Shapefile. I do not have access to ArcMap 10, only 9.3, but I expect that it won't be very different from this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |