22

You can achieve this with a very simple model if you have ArcGIS 10.0 or higher. Create a model with Feature Iterator where the group by field is the attribute you wish to select by then send the output to the copy features tool using inline substitution to ensure a unique file name. The model is shown below:


16

I do not have access to ArcMap 10, only 9.3, but I expect that it won't be very different from this. 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. If you are not familiar with python scripting, all you need to do is open you ...


13

Did you see Split Layer By Attributes tool updated for ArcMap 10 here? If it does not work you can use Split (Analysis) for your needs. Splitting the Input Features creates a subset of multiple output feature classes. The Split Field's unique values form the names of the output feature classes. These are saved in the target workspace. Example Code: ...


11

You need to use Split Vector Layer from processing toolbox. You can find the tool from Processing toolbox -> QGIS geoalgorithms -> Vector general tools -> Split Vector Layer Select the input shapefile and use a unique ID field to save each grid block into separate file. You need to specify the output folder to save all the polygons in it.


9

I used @AlexandreNeto's script and updated it for ArcGIS 10.x users. Mainly you now have to import "arcpy" instead of "arcgisscripting": # Script created to separate one shapefile in multiple ones by one specific # attribute # Example for a Inputfile called "my_shapefile" and a field called "my_attribute" import arcpy #Set Input Output variables inputFile ...


7

Combining the script mentioned above by AkselO with model builder, I would go with the model below. Create a new field, use the field calculator to create a unique identifier (by combining fields 1, 2 and 3) then use the script to split that shapefile by the unique field value.


6

I know you can use an iterator in model builder, but if you prefer to use python here is something I came up with. Add the script to a toolbox with the parameters in order as Input shpfile, fields(multivalue,obtained from input), and workspace. This script will split the shapefile into multiple shapefiles based on the fields you select, and output them into ...


6

This is an even easier way to do this... and it outputs into a GDB. http://www.umesc.usgs.gov/management/dss/split_by_attribute_tool.html download the tool from USGS, took me 3 minutes to do what i had been trying for 1 hour.


4

I have eventually got it working with SearchCursor and Select_analysis arcpy.env.workspace = strInPath # create a set to hold the attributes attributes=set([]) # ---- create a list of feature classes in the current workspace ---- listOfFeatures = arcpy.SearchCursor(strInPath,"","",strFieldName,"") for row in listOfFeatures: attributes.add(row.getValue(...


4

Your target workspace appears to be a file geodatabase, which means your output will be feature classes. Open the Target GDB in Catalog/ArcMap and you will see the split attributes as single Feature Classes. The documentation for the tool states the outputs are either feature classes or tables http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-...


4

This is now a tool in the processing Toolbox Lots of thing have been added and/or moved in processing, remember to use the new search fonction (bottom left) to easily find anything


4

Filtering a layer should exclude the filtered data from any analyses - that's an advantage of a filter vs just visually excluding those features with rule-based symbology. Sometimes there are bugs where filtered data is actually included, so it's safest to create a separate shapefile. There are multiple ways to do this, here are two: The Split Vector Layer ...


3

QGIS3.0+ Let us assume we have a buildings layer (orange polygons: A, B, C) which is linked to another layer parcel (gray polygons: 101, 102, 103) by Parcel_Num attribute field. We can use Geometry by Expression tool in Processing Toolbox | Vector geometry. Click on the large Epsilon mark to open an expression dialog window: Expression is: intersection(...


3

Instead of: inputLayer = arcpy.MakeFeatureLayer_management(inputFeatures, "inputLayer") arcpy.AddMessage("...Extracting unique values: ") with arcpy.da.SearchCursor(inputLayer, "*") as cursor: for selection in valueList: arcpy.AddMessage(selection) arcpy.SelectLayerByAttribute_management(inputLayer, "NEW_SELECTION", "\'fieldName\' = \'%...


3

You can use a Search Cursor to loop through individual features in a feature class and write just the geometries to unique feature classes. In this example, I use a feature class of the USA and export the states to new shapefiles: import arcpy # This is a path to an ESRI FC of the USA states = r'C:\Program Files (x86)\ArcGIS\Desktop10.2\TemplateData\...


3

I'm not familiar with the Iterate Feature Selection tools in ModelBuilder, but exporting just that as Python code indicate that they can be called using arcpy. # Created on: 2015-05-19 15:26:10.00000 # (generated by ArcGIS/ModelBuilder) # Description: # --------------------------------------------------------------------------- # Import arcpy module ...


3

I have fallen foul to this particular tool and unsurprisingly its all about actually bothering to read the help file. A lesson I had to learn and now pass on to you... So go to the Help file for the split by attributes tool and specifically look at the syntax section. What is the output? It is a layer - no, is it all the layers created by the split - no, ...


3

It appears that the Split By Attributes tool does not currently support creating its output feature classes in a Feature Dataset. One way to workaround that software limit would be to use an ArcPy answer to Exporting feature class into multiple feature classes based on field values using ArcGIS Desktop? as starting code to develop one. Another is the ...


2

You can use a geometry token (SHAPE@) within Copy Features (Data Management) to export each feature. import arcpy, os shp = r'C:\temp\yourSHP.shp' outws = r'C:\temp' with arcpy.da.SearchCursor(shp, ["OBJECTID","SHAPE@"]) as cursor: for row in cursor: outfc = os.path.join(outws, "fc" + str(row[0])) arcpy.CopyFeatures_management(row[1], ...


2

In Arcpy, Cursors honor layer/TableView selections. According to Getting list of selected features in ArcGIS for Desktop using Python code?, you can simply iterate feature selections. However if you want to make a selection using arcpy, use SelectLayerByAttribute_management tool.


2

If you have ArcGIS 10.5 and above, you can use Split By Attribute tool which will split each point based on unique attributes: Splits an input dataset by unique attributes. If you have older version of ArcGIS, you need to select each point manually and export. Or better, you can create your own script and loop over each point to save it to a separate ...


2

To do this I would create a simple Model Tool in ModelBuilder that Adds a text field (perhaps named CLASS) Uses a Calculate Field tool that calculates CLASS based on HEIGHT (if that is the name of your height field) with the Python Parser def calculate(height): if height < 3: return "A" elif 6 < height < 0.645051: return "B" else: ...


2

Build a query on your dataset: https://docs.qgis.org/2.8/en/docs/user_manual/working_with_vector/query_builder.html In your example above, it would be: "COLORS" != "RED'


2

One solution would be to create a new field named ID or something similar. Then Calculate Field and set it equal to OBJECTID, which does show up in the field calculator. Then you can use the new ID field as the Split Field in the Split By Attributes tool.


2

The provided/accepted answer explains the behavior. This answer provides a possible workaround. As Split by Attributes is a Script tool, you can hack it a little bit. (I don't have 10.5 to test if this change will 'just work', but I know the hack will get you the behavior you want: to set the output in the tool to a feature dataset). With ArcToolbox or the ...


2

The split by attributes tool does not require a loop; you can just specify the output location and the criteria for splitting, per the documentation: http://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/split-by-attributes.htm Your initial code using the loop would give an error due to arcpy.SplitByAttributes_analysis not returning a list (it ...


1

This is some working code that I have modified (simplified) to suit your purpose, the original is more generic but may be confusing: import os, sys, arcpy InShp = "c:/temp/folder/shapefile.shp" # from your values OutFolder = "c:/temp/folder" Field = "NAME" UValues = [] # an empty list, then recurse and add each unique value with arcpy.da....


1

I am unable to reproduce your problem, and your graphic does not show your tool dialog in its entirety which might enable me to do a more nuanced test. When I use the Search window to find and open the Split By Attributes tool using ArcGIS Desktop 10.6 on Windows 7 SP1 it opens with a green dot next to the Input Table as you can see below: If you are ...


1

Check out the Split by Attribute tool in the Extract toolset. Should be the tool you are looking for to split your layer


1

Use the Split tool, as described here: https://support.esri.com/en/technical-article/000008282 In newer versions of ArcGIS, you can use the Split By Attributes tool.


Only top voted, non community-wiki answers of a minimum length are eligible