Select to view content in your preferred language

Model Builder: Select By Location

2688
2
Jump to solution
07-04-2013 12:02 AM
MarkYoung
Regular Contributor
Hi,
I have a district boundary and some base mapping (vector). What I want to do is use model builder to select by location so all features within the boundary plus a 2 mile buffer are selected. I tried using select by location tool but for some reason it won't connect to my Sde, the only type it wants to connect to is Data Element. I thought about the clip tool but I can't specify a 2 mile buffer on the clip tool as far as I am aware. Any suggestions much appreciated.
Thanks
Mark
0 Kudos
1 Solution

Accepted Solutions
RichardFairhurst
MVP Honored Contributor
Hi,
I have a district boundary and some base mapping (vector). What I want to do is use model builder to select by location so all features within the boundary plus a 2 mile buffer are selected. I tried using select by location tool but for some reason it won't connect to my Sde, the only type it wants to connect to is Data Element. I thought about the clip tool but I can't specify a 2 mile buffer on the clip tool as far as I am aware. Any suggestions much appreciated.
Thanks
Mark


Select Layer By Attribute and Select Layer By Location tools both require that you provide them with a Layer (or Table View in the case of Select Layer By Attribute) as input, like what you see in ArcMap, not a feature class or table, like what you see in ArcCatalog.  The second requirement for the Select Layer By Location tool in the help reads:

"Valid inputs for this tool are layers in the ArcMap, ArcGlobe, or ArcScene table of contents, and also on layers created in ArcCatalog or in scripts using the Make Feature Layer tool."  (For Select Layer By Attribute you can also use the Make Table View tool on tables).

Therefore whenever you use a tool that creates an output type that stores a new feature class/shapefile, that output first must be passed through the Make Feature Layer tool before you pass it to the Select Layer By Location tool.  Or, in the case of the Select Layer By Attribute tool, you must use the Make Feature Layer tool or the Make Table View tool on feature classes or tables.  These Select Layer tools are both within the Layers and Table Views toolset for this reason, they only work with Layer/Table View input/output types.  That is also why the tool names begin with the words Select Layer.

View solution in original post

0 Kudos
2 Replies
RichardFairhurst
MVP Honored Contributor
Hi,
I have a district boundary and some base mapping (vector). What I want to do is use model builder to select by location so all features within the boundary plus a 2 mile buffer are selected. I tried using select by location tool but for some reason it won't connect to my Sde, the only type it wants to connect to is Data Element. I thought about the clip tool but I can't specify a 2 mile buffer on the clip tool as far as I am aware. Any suggestions much appreciated.
Thanks
Mark


Select Layer By Attribute and Select Layer By Location tools both require that you provide them with a Layer (or Table View in the case of Select Layer By Attribute) as input, like what you see in ArcMap, not a feature class or table, like what you see in ArcCatalog.  The second requirement for the Select Layer By Location tool in the help reads:

"Valid inputs for this tool are layers in the ArcMap, ArcGlobe, or ArcScene table of contents, and also on layers created in ArcCatalog or in scripts using the Make Feature Layer tool."  (For Select Layer By Attribute you can also use the Make Table View tool on tables).

Therefore whenever you use a tool that creates an output type that stores a new feature class/shapefile, that output first must be passed through the Make Feature Layer tool before you pass it to the Select Layer By Location tool.  Or, in the case of the Select Layer By Attribute tool, you must use the Make Feature Layer tool or the Make Table View tool on feature classes or tables.  These Select Layer tools are both within the Layers and Table Views toolset for this reason, they only work with Layer/Table View input/output types.  That is also why the tool names begin with the words Select Layer.
0 Kudos
MarkYoung
Regular Contributor
Hi,
Yes Routed through the make feature layer and the selection works,
Thanks
Mark
0 Kudos