Drawing a rectangle and converting it into a feature in Model Builder

1524
6
11-28-2019 10:32 PM
Anastasia_Ejov
New Contributor

If I have a grid loaded, how do I draw a rectangle around an area and convert it into a feature and export it as a shapefile in the ArcMap Model Builder?

0 Kudos
6 Replies
DanPatterson_Retired
MVP Emeritus

If the selection is already made you can simply use

Copy Features—Data Management toolbox | ArcGIS Desktop 

selections are honored when features are copied

There is no specific tool for model builder to perform a manual selection

0 Kudos
Anastasia_Ejov
New Contributor

By selection, do you mean dragging the grid layer into the builder?

0 Kudos
DanPatterson_Retired
MVP Emeritus

No, the 'draw a rectangle....' bit.  That would be considered a step prior to running the model

0 Kudos
Anastasia_Ejov
New Contributor

Ok- I am still lost on how to convert the rectangle to a feature and export it. 

If I had drawn the rectangle around the area outside of the model- in the model I only convert? 

0 Kudos
DanPatterson_Retired
MVP Emeritus

Perhaps you had better elaborate on the full extent of your model and what other tools you intend to use, since certain tools allow you to draw features on the map to use them as input for processing.

If your intent is to simply produce a polygon/rectangle, you don't need a model to do that, simply create a featureclass and draw the geometry, then save your edits.

0 Kudos
KimOllivier
Occasional Contributor III

You can do this in ArcTools by creating a custom tool and then add your custom tool to ModelBuilder. It is not clear if you want to avoid any Python programming, but that is the simplest way to do exactly as you asked.

You create an empty template layer (for geometry type, fields and symbology). Then you create a new tool and set the dialog to input a featuredataset (it needs the template). When the tool opens it asks you to draw some graphics similiar to the graphic Draw tool. You can also set attributes if needed, there can be more than one feature. It is very flexible.

When the tool executes it passes the featuredataset as a parameter. This can be turned into a featureclass and exported as an output for use in the ModelBuilder chain.

Interacting with the map in a script was always much easier to do in Workstation/AML and later ArcView/Avenue.

If you are still interested in this approach I could post an example script.

Here is the help where I needed the user to sketch a proposed marine reserve:

 

Create MPA from Sketch or Features

 

Zoom to the area

 

Use the interactive sketch tool to draw polygons on the map

You can use the graphic tools to draw circles, ellipses, rectangles or freehand polygons

You can edit the graphic shapes, adjust vertices and in the graphic properties adjust to an exact coordinate

 

When you select [OK] the parts will be assembled and saved to a new featureclass with the default name or the one you specified.

 

Dialog

 

 

0 Kudos