I am trying to select zonetypes (eg forest, agriculture) within a municipality and to show the area of each zonetype in this municipality.
I am doing this in ModelBuilder and will export it to a python script later on.
I am stuck with following Points
This question is also posted here: arcgis desktop - Select by point using ModelBuilder? - Geographic Information Systems Stack Exchange
Solved! Go to Solution.
The Select Layer by Location tool requires a Layer object as input so there shouldn't be any need for you to create a layer file on disk. The MakeFeatureLayer tool would be used to create the layer object for you. The reason why the select tool needs the layer object is because you can only apply a selection against a layer object. For example, say that you have a point feature class and you want to select the point with OID 3. To do this you would need to open ArcMap, add the data to the map, and then select the point. When you added the data to the TOC of the map document you've essentially created a layer object, which you can apply selections against.
I would think that if you want to calculate the area of data based on where you clicked within ModelBuilder you'd want to use a FeatureSet. The FeatureSet would essentially allow you to use the tool's dialog to create a point feature on the fly (i.e. when the FeatureSet parameter is active it would allow you to click on the map and it would create points there without you having to either create a feature class or start an edit session). You would use these points to select the intersecting polygons that you want to calculate the areas against. If you wanted to update the source data you could use the CalculateField tool to calculate the area in the units you're needing or you could make a copy of the data and perform the calculation there.
I would assume at the simplest your model would look as shown below.
Some questions/ideas that may help elucidate things:
The temporary feature layer can be saved as a layer file using the Save To Layer File tool or saved as a new feature class using the Copy Features tool.
Source: Make Feature Layer (Data Management)
Chris Donohue, GISP
I work with ArcGIS 10.2 with an advanced license level. The source data is in a file geodatabase and so is the Output.
Thanks for the link to the Feature layer, will try if it works that way!
You can use feature set as part of your interaction with your map. Create a model for testing purposes and use a feature set as a variable then use with select by location, that should give you a feel for haw it works.
A quick tour of using Feature Set and Record Set—Help | ArcGIS for Desktop
The Select Layer by Location tool requires a Layer object as input so there shouldn't be any need for you to create a layer file on disk. The MakeFeatureLayer tool would be used to create the layer object for you. The reason why the select tool needs the layer object is because you can only apply a selection against a layer object. For example, say that you have a point feature class and you want to select the point with OID 3. To do this you would need to open ArcMap, add the data to the map, and then select the point. When you added the data to the TOC of the map document you've essentially created a layer object, which you can apply selections against.
I would think that if you want to calculate the area of data based on where you clicked within ModelBuilder you'd want to use a FeatureSet. The FeatureSet would essentially allow you to use the tool's dialog to create a point feature on the fly (i.e. when the FeatureSet parameter is active it would allow you to click on the map and it would create points there without you having to either create a feature class or start an edit session). You would use these points to select the intersecting polygons that you want to calculate the areas against. If you wanted to update the source data you could use the CalculateField tool to calculate the area in the units you're needing or you could make a copy of the data and perform the calculation there.
I would assume at the simplest your model would look as shown below.
Thank you Freddie, that Model and your explanation was a perfect base for my task!!
moved to Geoprocessing
Community structure is here for proper placement of questions...GeoNet Community Structure
Model Builder is an application that you can create, edit and manage forms. If you were not already done so, you should read to create a simple model, because it shows you, by example, the basic tasks to create a model in ModelBuilder. You should also read an overview of the concepts of the model and the conditions and matters referred to there, because they know many of the terms used here.
Below are presented application components ModelBuilder.
Reading a summary of these tools
Discusses the minister added tool in creating a data model operations.
And discusses the navigation tools in the form of movement.
Select the item allows you to select an item to move, copy, access to the properties, and delete.
Communication tool connecting elements, such as variable data into a tool, and discussed the creation of the operations model.
Play button works and is discussed in turn model model.
You can not customize this toolbar.
Topics that follow discuss the use of ModelBuilder and the mechanics of creating, editing, and management models.
Build a model approach discusses the basic approaches to model building.
When building a model, you can create processes (process is a tool in addition to its own data) and communication between them, and create operations model shows you how.
You can run your models within ModelBuilder, or implementation of a tool like any other tool used in the dialogue or command line window. Run Sample shows you how to run models within ModelBuilder.
The ratification of the model shows you how to check your form for errors and synchronize data variables.
Typical environments discusses the use of geoprocessing environment variables and how they can be used in the models.
A typical appearance shows how you can change the shape and arrangement of elements model to increase readability.
You can print a diagram of the model (print model), and generate and print a report (Report) model, and the model for the export scenario (export model).
Documentation model is very important for models to participate. Process documentation shows how to submit documents for individual operations model.
Walaa Njr Is it not helpful that you mark your own post helpful especially when done within minutes of posting it.
It might attract the attention of moderators.
Do you have any particular reason for adding this post since Freddie Gibson seems to have provide more than adequate coverage?
Can you point out where previous comments were deficient and where yours improve on the discussion since it might focus PV's consideration?
Simple explanation to use tool model builder