[GIS] Need to select and delete features in ModelBuilder

arcgis-desktopmodelbuilderselect-by-attribute

I'm new to ModelBuilder and I'm planning to take some class of it, but in the meantime I have a project with a relative easy task.

The high-level plan of this project is:

  • Load shapefile into modelbuilder [USER PARAMETER]
  • Select by attribute and delete selected features
  • Load another shapefile into modelbuilder [USER PARAMETER]
  • Make a buffer of 15 meters of this recently loaded shapefile
  • ERASE first shapefile with the second shapefile (buffered)
  • Add Field to the output of the ERASE process.
  • Use Field Calculator to calculate meters on this new field(!shape.length@meters!)
  • Select all features that are <200 meters and delete them
  • Make a Centroid of the result that is >200 meters.

My problem is that I can't select and delete features after the Field Calculator step.

Does someone have an idea of what I did wrong?

A snapshot of what I have so far:

Modelbuilder task

Best Answer

Note that you don't need to delete the feature in your case. Just make sure that you use a SQL statement together with your "Make FEature Layer" in order to only select the feature that you want to use for processing. You can also use "select layer by attribute" with the "switch" selection if you have a selection.

If you really want to delete, you can use "delete Feature" as a tool. Again, you'll need a "make feature layer" and a "select layer by attribute" first.

Related Question