<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Spatial Join. Is possible matching output fields ? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173198#M26311</link>
    <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I askek you to send me&amp;nbsp; the model because it is not possible read the SQL script in the figure 7.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 08:37:20 GMT</pubDate>
    <dc:creator>PasqualeLanera</dc:creator>
    <dc:date>2022-05-12T08:37:20Z</dc:date>
    <item>
      <title>Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171895#M26298</link>
      <description>&lt;P&gt;Hello I have ArcGIS 10.3.&lt;/P&gt;&lt;P&gt;I have 2 FC in a GDB, one is a polygon or regular cell of a grid (Grid), the other one is a point&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Case 3 point features in a cell&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope it is clear. I'll prove all night but I don't found the solution. Maybe it's need a python script ?&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Help me, thanks !&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 10:41:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171895#M26298</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-09T10:41:57Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171898#M26299</link>
      <description>&lt;P&gt;I don't have 10.3 to test against, but if you spatial join the points with the polygons to move the cell IDs to the points first (points are the target). Then use a database of query to select the point within each cell that has the highest value for Area (Max query). Then export those points to a new feature class, and th&lt;SPAN&gt;en run the spatial join with the GridCells as the target against just the Max value points. This might work without python or a model builder model&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 11:05:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171898#M26299</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-09T11:05:15Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171937#M26301</link>
      <description>&lt;P&gt;Thanks Kim&lt;/P&gt;&lt;P&gt;The polygon feature class (FC) "Grid" with over 100,000 cells (each cell is 1 km square) is the target Feature and the point FC "PointHabitats" is the Join Features. Each cell can intersect one or more points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't undestand how select in a new layer within a cell the only point with AREA = max and the corrispondence value of HABITAT. I have to use the command SELECT in ArcGIS ? Or I have to use an external database ?&lt;/P&gt;&lt;P&gt;I prove with the tool SELECT but I don't know the exact SQL statement to write. With: "Target.ID =&amp;nbsp;Target.ID AND AREA is max" does not run. The points within the same cell have the same Target.ID&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 13:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1171937#M26301</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-09T13:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172094#M26303</link>
      <description>&lt;P&gt;Sorry, just getting back....Quick questions. Is your data in a file geodatabase or an Enterprise GDB (I.E. SQL Server, Post GRE, Oracle, etc.)?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 17:44:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172094#M26303</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-09T17:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172100#M26304</link>
      <description>&lt;P&gt;In a File Geodatabase.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 18:01:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172100#M26304</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-09T18:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172203#M26305</link>
      <description>&lt;P&gt;Hmmmm.... finding Max in a file geodatabase seems harder than it should be.&amp;nbsp; Database views are not supported in File GDBs and subqueries on file and personal geodatabases don't seem to support GROUP BY and Summarize cannot tell you which habitat has the Max Area.&amp;nbsp; I am seeing your problem.&amp;nbsp; Looks like Model Builder might be the answer if this is a process you have to repeat frequently.&amp;nbsp; Is this a one time process or will you have to repeat it often?&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 21:40:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172203#M26305</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-09T21:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172306#M26306</link>
      <description>&lt;P&gt;This is a one time process or I will have to repeat some time. But it is very strange that with the Spatial Join I don't solve the problem.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 08:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172306#M26306</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-10T08:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172515#M26307</link>
      <description>&lt;P&gt;I have a model that will create a feature class containing one point for each polygon containing just the Maximum Area and the habitat for that area.&amp;nbsp; You should then be able to join this to your polygons using the polygons unique ID which is also an attribute of each point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please keep in mind I tested this in ArcMap 10.8.1 so not 10.3&lt;/P&gt;&lt;P&gt;My test data has different field names and only contains 2 polygons and 13 points.&amp;nbsp; Here are snapshot of the starting tables.&lt;/P&gt;&lt;P&gt;MaxTestPoints:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1652204893461.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41013i0E6EDB8101B657E0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1652204893461.png" alt="KimGarbade_0-1652204893461.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;PolygonTest&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_1-1652204953204.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41014iD6355FDBE92890B9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_1-1652204953204.png" alt="KimGarbade_1-1652204953204.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Using these two I did a spatial joint using points as the target to move the MyTestValue into the points.&amp;nbsp; The result I called MaxTestPoints_SpatialJoin2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_2-1652205072030.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41015i5736F8D92CFD7658/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_2-1652205072030.png" alt="KimGarbade_2-1652205072030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I created a model that pulls just one point for each polygon from this feature class and appends it into a new feature class I called "MaxTestPointsFinal".&amp;nbsp; Each point in MaxTestPointsFinal is the point representing the Maximum value for a MyTestValue polygon.... confusing I know, but when you see the output below I think it will make more sense.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_3-1652205627194.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41019i049F423F09B1733E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_3-1652205627194.png" alt="KimGarbade_3-1652205627194.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The model is pretty simple.&amp;nbsp; The top image is just the model.&amp;nbsp; The images that follow that show important details about the steps:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_4-1652205691053.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41020i15BDE156385EF7F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_4-1652205691053.png" alt="KimGarbade_4-1652205691053.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Iterator on polygon layer, value is the unique ID of the polygon&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_5-1652205740453.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41021iB1CE0FCE4B8EA6C5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_5-1652205740453.png" alt="KimGarbade_5-1652205740453.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select by attribute (gets all records that share max value)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_6-1652205831964.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41022i170C5D44BC35B7F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_6-1652205831964.png" alt="KimGarbade_6-1652205831964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Select by Attribute (with Remove_From_Selection option) to exclude all points that do not fall within the polygon being considered.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_7-1652205895318.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41023i8F437C0669C69A4D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_7-1652205895318.png" alt="KimGarbade_7-1652205895318.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The append step just appends the identified point to a feature class of all Max value points.&lt;/P&gt;&lt;P&gt;There might be a MUCH easier way, but given the constraints of file GDB in ArcMap 10.3 I sure couldn't think of it.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;K&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 18:12:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1172515#M26307</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-10T18:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173183#M26309</link>
      <description>&lt;P&gt;Thanks Kim,&lt;/P&gt;&lt;P&gt;I an not a expert with Models so it is a little difficult. I have some requests.&lt;/P&gt;&lt;P&gt;1) Why you add the field MyTasteValue in PolygonTest ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)&amp;nbsp;MyTasteValue&amp;nbsp; is to identify each polygon, so if there is 4 polygon I will have also TestPoly3 and TestPoly4 ?&lt;/P&gt;&lt;P&gt;3) Why don't use the field ObjectID instead of MyTasteValue&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Could you add the figure of the Apppend Tool ?&lt;/P&gt;&lt;P&gt;5) Why there is "(2)" or "(3)" after the name of an object in the green box&lt;/P&gt;&lt;P&gt;Could you send me yours GDB or shapefile of the example and the model saved like a tool ?&lt;/P&gt;&lt;P&gt;My email is &lt;A href="mailto:planera63@gmail.com" target="_blank"&gt;planera63@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, thanks, thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 07:10:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173183#M26309</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T07:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173197#M26310</link>
      <description>&lt;P&gt;Hello Kim.&lt;/P&gt;&lt;P&gt;Excuse me with wich ESRI platform the solution of my problem will be more easy ?&lt;/P&gt;&lt;P&gt;My polygonal and point feature have over 500,000 records. Do your solution run also if a polygon is empty or if has only one point within ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 08:31:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173197#M26310</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T08:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173198#M26311</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;I askek you to send me&amp;nbsp; the model because it is not possible read the SQL script in the figure 7.&lt;/P&gt;&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 08:37:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173198#M26311</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T08:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173330#M26312</link>
      <description>&lt;P&gt;Rather then sending the data and the model and trying to get them to work on your system I think I can explain a little clearer.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First your questions :&lt;/P&gt;&lt;P&gt;1) I added MyTestValue in PolygonTest to be the unique identifier of the polygon.&amp;nbsp; I am assuming each of your grid cells has a unique ID other than the ObjectID.&amp;nbsp; This is the equivalent of that in the test data.&lt;/P&gt;&lt;P&gt;2) That would be the case in my data if I had added two more polygons.&amp;nbsp; Your data should already have a unique ID assigned to each cell (that is not the ObjectID).&lt;/P&gt;&lt;P&gt;3) ObjectID is a unique Identifier, but Object IDs are not stable and can change when you run analysis (especially analysis that edits or changes the original data) or edit data.&amp;nbsp; Its better to use a stable, user defined, unique ID (like MyTestValue in this case).&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) Here it is.&amp;nbsp; The append tool takes another feature layer as a "Target".&amp;nbsp; I created this as an empty Feature Class to accept the output of the append.&amp;nbsp; I simply created a point Feature Class with columns to accept the values I needed.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1652364385353.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41229iEC1AFE7B7267B7A3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1652364385353.png" alt="KimGarbade_0-1652364385353.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;5) "(2)" and "(3)" show the same dataset after it has been acted on by a different tool.&amp;nbsp; (3) contains the set of records selected by the first Select by Attribute and (2) contains the set of selected records after the second.&lt;/P&gt;&lt;P&gt;The data I used is simply the 13 points in the original post's image and 2 polygons those points fall within.&amp;nbsp; I created the data in a few minutes just to test the model.&lt;/P&gt;&lt;P&gt;Here is more detail on the model:&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FindMaxPnt_Image1.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41230i7FB815B2CBDC8812/image-size/large?v=v2&amp;amp;px=999" role="button" title="FindMaxPnt_Image1.png" alt="FindMaxPnt_Image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The code used in the first Select by Attribute tool (using "New Selection" as the Selection Type)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Value = (SELECT MAX(VALUE) FROM MaxTestPoints_SpatialJoin2 WHERE  MyTestValue = '%value%')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code of the second Select By attribute (Using "Remove from current selection" as the Selection Type)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;MyTestValue &amp;lt;&amp;gt; '%value%'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 14:18:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173330#M26312</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-12T14:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173362#M26313</link>
      <description>&lt;P&gt;Hello.&lt;/P&gt;&lt;P&gt;Your model RUNNNNNNN with your data!!!!!&lt;/P&gt;&lt;P&gt;Now I have my Feature Class with over 500,000 records.&lt;/P&gt;&lt;P&gt;How can generate values of the field MyTestValue in my Polygon Feature (over 500,000 of records) ?&lt;/P&gt;&lt;P&gt;Can I add the text "TestPoly" or another text to OBJECTID number or to a progressive number using the Field Calculator for my numerous records to obatin an unique ID ? Could you send me the scripts for the Field Calculator to generate this unique ID ?&lt;/P&gt;&lt;P&gt;Another simple solution could be:&lt;/P&gt;&lt;P&gt;copy the OBJECTID into field MyTestValue. Is a good idea ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks, Thanks Thanks my friend&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 15:18:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173362#M26313</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T15:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173404#M26314</link>
      <description>&lt;P&gt;Using the images of the model I created you can create your own model using Model Builder in ArcMap, but customized to user your own data.&amp;nbsp; The images were meant to provide a blue print and the model is not really "plug and play".&amp;nbsp;&lt;/P&gt;&lt;P&gt;You create a model in a tool box you create:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_2-1652370672503.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41246iB4EE61684073E82D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_2-1652370672503.png" alt="KimGarbade_2-1652370672503.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In that tool box you create a new model and edit it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_3-1652370783461.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41247iC9D611411EB0AD05/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_3-1652370783461.png" alt="KimGarbade_3-1652370783461.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_5-1652370875971.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41249i4C56B04524C2F9CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_5-1652370875971.png" alt="KimGarbade_5-1652370875971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The names of the tool in the model (for example "Select by Attribute") can be dragged into the model from the "Search" dialog:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_1-1652370573794.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41244i4D4F70A1387D6BBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_1-1652370573794.png" alt="KimGarbade_1-1652370573794.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The iterator can be added like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1652370363399.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41240iF32CBF4C93A6F85A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1652370363399.png" alt="KimGarbade_0-1652370363399.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The code I sent for the tools will have to be customized for your data.&lt;/P&gt;&lt;P&gt;There are some good model builder videos online.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 15:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173404#M26314</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-12T15:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173431#M26315</link>
      <description>&lt;P&gt;If I want generate the value for the field MyTestValue I would like to use&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PasqualeLanera_0-1652373194828.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41256iFDBE027EACCD5261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PasqualeLanera_0-1652373194828.png" alt="PasqualeLanera_0-1652373194828.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the Field Calculator from Table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PasqualeLanera_1-1652373306882.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41257iAF640E6A1732D86C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PasqualeLanera_1-1652373306882.png" alt="PasqualeLanera_1-1652373306882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can write a script that make a union of a text "TestPoly" and the value of ObjectID or progressive numeber ?&lt;/P&gt;&lt;P&gt;TestPoly4&lt;/P&gt;&lt;P&gt;TestPoly5&lt;/P&gt;&lt;P&gt;...............&lt;/P&gt;&lt;P&gt;TestPoly495054&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 16:38:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173431#M26315</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T16:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173455#M26316</link>
      <description>&lt;P&gt;If your Grid Cells do not already have a unique ID other than Object ID I would give them one.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Backup all of your feature classes first and work on copies of those.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then add a column to your Grid Cells polygon FC called something like GridID (String, 25 length).&amp;nbsp; This will be the equivalent to where I use "MyTestValue".&lt;/P&gt;&lt;P&gt;Use Field Calculator to calculate that field equal to the word "GRID-" with a cell number after it.&amp;nbsp; That will give them each an "unchangeable" ID.... ("Grid-1','Grid-2',.....'Grid-500000')&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1652376025947.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41264iFB68AB27A9626B9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1652376025947.png" alt="KimGarbade_0-1652376025947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You have to use the "Python" and "String" options (highlighted)&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"Grid-"+ '!OBJECTID!'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will give you a Grid cell feature class (I'm going to call it "GridCellPolys" here for reference) with a unique ID.&amp;nbsp; That maps to "PolygonTest" in my model.&lt;/P&gt;&lt;P&gt;Spatial join that polygon feature class to your Habitat points to get the equivalent of my MaxTestPoints_SpatialJoin2 feature class (call it something more appropriate like "HabitatPnts_SJ_GridPolys").&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mapping to the model:&lt;/P&gt;&lt;P&gt;PolygonTest = GridCellPolys&lt;/P&gt;&lt;P&gt;MaxTestPoints_SpatialJoin2 =&amp;nbsp;HabitatPnts_SJ_GridPolys&lt;/P&gt;&lt;P&gt;MyTestValue = GridID&lt;/P&gt;&lt;P&gt;Habitat = Habitat&lt;/P&gt;&lt;P&gt;Value = Area&lt;/P&gt;&lt;P&gt;NOTE: The model does not check for if no points fall within a cell.&amp;nbsp; This will likely cause it to fail.&amp;nbsp; Since I don't think Model Builder had an "If Then" condition in ArcMap 10.3 you'll have to do a select by attribute on you Grid Polygons that have at least one point in them and export that out as your new "PolygonTest" (in my model) feature class.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 17:38:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173455#M26316</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-12T17:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173473#M26317</link>
      <description>&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;P&gt;I have tested you model also with a polygon without point: no errrors, no fail.&lt;/P&gt;&lt;P&gt;So too work and process to create a point feature with only a point in a polygon: the point with max value and his habitat with ArcGIS 10.3 !!!&lt;/P&gt;&lt;P&gt;Are with ArcGIS PRO or with another platform more easy ?&lt;/P&gt;&lt;P&gt;Thanks very much for the support and excuse me for the time that you spent for me.&lt;/P&gt;&lt;P&gt;Good Bye&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 18:58:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173473#M26317</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-12T18:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173519#M26318</link>
      <description>&lt;P&gt;Your welcome.&amp;nbsp; If my suggestion helped to solve the problem, would you mind also accepting one of my responses as a solution?&amp;nbsp; Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 20:29:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173519#M26318</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-12T20:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173680#M26325</link>
      <description>&lt;P&gt;Hello Kim.&lt;/P&gt;&lt;P&gt;Can you expalin two things:&lt;/P&gt;&lt;P&gt;1) Select Layer by attribute and&amp;nbsp;&amp;nbsp;Select by attribute are the same ? If no why you use the first ?&lt;/P&gt;&lt;P&gt;2) In the query:&amp;nbsp;Value = (SELECT MAX(Value) FROM MaxTestPoints_SpatialJoin2 WHERE MyTestValue = '%Value%') why there is&amp;nbsp;'%Value%' and not only Value ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173680#M26325</guid>
      <dc:creator>PasqualeLanera</dc:creator>
      <dc:date>2022-05-13T13:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join. Is possible matching output fields ?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173883#M26326</link>
      <description>&lt;P&gt;1) Its a little confusing, but the the first select by attribute selects all points in the&amp;nbsp;&lt;SPAN&gt;HabitatPnts_SJ_GridPolys that have the same value for area as the highest value in the Grid cell you are processing.&amp;nbsp; For instance if the current Grid cell being processed is Grid-25 and the maximum habitat area with this cell is 50 hectares, the first query selects all records in the&amp;nbsp;&amp;nbsp;HabitatPnts_SJ_GridPolys feature class with an Area of 50.&amp;nbsp; That selection set includes the one (or more) points you are interested in returning, plus all other points with an Area of 50.&amp;nbsp; 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).&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It is confusing why you have to write two queries when SQL Server could so this no problem in just one, but I think the answer is that ArcMap is limited in its ability to do subqueries, so this was the only way I could get it to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) %Value% is a variable in the model.&amp;nbsp; It is set each time the iterator loops.&amp;nbsp; It is the unique identifier of the polygon you are processing this time through the iterator.&amp;nbsp; It is vital that this be set correctly as the "Field" property of the iterator.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KimGarbade_0-1652468810616.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41358i32832C186DA1172E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KimGarbade_0-1652468810616.png" alt="KimGarbade_0-1652468810616.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 19:09:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/spatial-join-is-possible-matching-output-fields/m-p/1173883#M26326</guid>
      <dc:creator>KimberlyGarbade</dc:creator>
      <dc:date>2022-05-13T19:09:13Z</dc:date>
    </item>
  </channel>
</rss>

