Description
This tool deletes one or more features from an input feature data source. The features to be deleted are specified using a 'where' clause. See the 'where' section for further details on how to formulate the where clause.
This tool is dangerous if not used with caution. Deleted features cannot be recovered. You should familiarise yourself with how this command operates on a copy of the dataset. You can use the copyfeaturedataset command to create a backup of the target data source before running this tool (even in a script). You can also test your where clause in ArcGIS using the 'Select by attributes' command and inspecting the resulting selection to ensure it is appropriate.
Syntax
deletefeatures(in, where);
| in | the input feature data source | |
| where | the selection statement that will be applied to the feature data source to identify a subset of features to process (see full Help documentation for further details) |
Example
deletefeatures(in="C:\data\plotlayer.shp", where="COUNTY='WOOD' AND MONTH=7");
deletefeatures(in="C:\data\samples.shp", where="AREA < 100");
deletefeatures(in="C:\data\roads.shp", where="FID=20123");