Select to view content in your preferred language

Spatial Join. Is possible matching output fields ?

1542
20
Jump to solution
05-09-2022 03:41 AM
PasqualeLanera
New Contributor III

Hello I have ArcGIS 10.3.

I have 2 FC in a GDB, one is a polygon or regular cell of a grid (Grid), the other one is a point feature (PointHabitat). A poygon can contain one or more point. In Point Feature there are two field: AREA, a number that rapresent the surface, and HABITAT, the name of the habitat.

 

Case 3 point features in a cell 

If I do a Spatial Join between Target Feature (Grid) and Join Feature PointHabitat, and choose as Field of Join Features the field AREA Maximum, the output cell have the Field AREA with the value maximum between the 3 point; the Field HABITAT contains the first name of the habitats in alfabetical order.

Instead I want that the output of the Spatial Join will be a cell with the maximum value of the field AREA and for the field HABITAT the name of the habitat of the point feature that has the maximum Area. 

I hope it is clear. I'll prove all night but I don't found the solution. Maybe it's need a python script ?     

Help me, thanks !  

0 Kudos
20 Replies
PasqualeLanera
New Contributor III

Thanks.

We suppose that the first value of the field MyTasteValue in the Iterator is Grid-25 

1) The first query selects all records (usually the max value in a cell is one) in the  HabitatPnts_SJ_GridPolys feature class with an Area of 50 (max value) and where MyTasteValue=Grid-25. So the records selected are usually 1, rarely 2.

In the model follow the second Selection by attribute.

2) When you say for the second Selection by attribute: "That selection set includes the one (or more) points you are interested in returning, plus all other points with an Area of 50." You mean that in the the Grid-25 (a cell of the grid) there are also the points with an Area of 50 of Grid-25 or of other Grid-cells (Grid-26, Grid27, ...) ?   

3) You say: The second select by attribute excludes all points not in Grid-25; leaving you with just the points you want (I.E. those points (one or more) that represent the highest habitat by area in that grid cell).  

I am not well convinced about this statemen, so I decided to delete the second Select Layer by Attribute and run the model. With this change the output was the same of the original model, only 3 records, only the point with the max value of "Area" of each polygon! What do you think about it ? 

4) You have not answered a my question. Wich are the difference between the two tool "Select Layer by Attribute" and "Select by Attribute" ? Could I use in the model also "Select by Attribute" ?

Sincerely

  

 

0 Kudos