<?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 - Largest Overlap - ArcGIS Pro in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1047081#M39726</link>
    <description>&lt;P&gt;Hi Drew, I have another problem with this tool. I just tried running it using both Keep All Features checked and unchecked:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "E:\Library\GIS DATA\SCRIPTS\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 85, in &amp;lt;module&amp;gt;&lt;BR /&gt;SpatialJoinLargestOverlap(target_features, join_features, out_fc, keep_all, spatial_rel)&lt;BR /&gt;File "E:\Library\GIS DATA\SCRIPTS\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 41, in SpatialJoinLargestOverlap&lt;BR /&gt;for row in scur:&lt;BR /&gt;RuntimeError: An invalid SQL statement was used.&lt;BR /&gt;Failed to execute (SpatialJoinLargestOverlap).&lt;/P&gt;&lt;P&gt;What could be causing this problem?&amp;nbsp; I thought it could be the dataset (I was using one that had over 200,000 records, but I created a subset of that that's only 2100 items, and it still fails to run).&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 23:00:18 GMT</pubDate>
    <dc:creator>dgray</dc:creator>
    <dc:date>2021-04-14T23:00:18Z</dc:date>
    <item>
      <title>Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497751#M21835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know if there's a way to perform a spatial join in ArcGIS Pro (or using Python) between Polygon A and B (B being the target) where the Polygon A that shares the largest overlap in area with the target is the one that gets joined. I saw that there is a tool for ArcMap, but if I'm using ArcGIS Pro, how do I accomplish this?&amp;nbsp; My issue is if I'm joining polygons with different shapes and centre points, many other join type criteria just don't do a correct match.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intersect sometimes selects an adjacent polygon whose boundary intersects the target rather than the one that overlaps the target the most. Have Their Center In won't work if the join polygon has a completely different centre point than the target.&amp;nbsp; I am having trouble making correct join matches in this situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 21:35:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497751#M21835</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2019-11-05T21:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497752#M21836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you try the tool in Pro?&lt;/P&gt;&lt;P&gt;I imported the toolbox:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/473010_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;The tool opens...&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/473011_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Nov 2019 14:29:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497752#M21836</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2019-11-09T14:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497753#M21837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh nice, I didn't actually know the tool even worked in Pro since it was developed for ArcMap.&amp;nbsp; I tested it and it doesn't appear to complete because of syntax errors. See message below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/473327_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess the script needs some kind of adjusting for Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:49:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497753#M21837</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2019-11-13T16:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497754#M21838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh, that would be good if that's the only change that needs to be made (that'll be a Python 2 to Python 3 thing).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/473325_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Try adding the parentheses and saving:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/473326_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;I'm not entirely sure if you would need to close Pro and re-open, but give that a go.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 16:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497754#M21838</guid>
      <dc:creator>KoryKramer</dc:creator>
      <dc:date>2019-11-13T16:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497755#M21839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/382216"&gt;Dianne Gray&lt;/A&gt;‌ &lt;A href="https://community.esri.com/migrated-users/45316"&gt;Kory Kramer&lt;/A&gt;‌ The Spatial Join - Largest Overlap download has been updated to remove that ridiculous print at the end.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2019 18:43:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/497755#M21839</guid>
      <dc:creator>DrewFlater</dc:creator>
      <dc:date>2019-11-13T18:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1047081#M39726</link>
      <description>&lt;P&gt;Hi Drew, I have another problem with this tool. I just tried running it using both Keep All Features checked and unchecked:&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "E:\Library\GIS DATA\SCRIPTS\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 85, in &amp;lt;module&amp;gt;&lt;BR /&gt;SpatialJoinLargestOverlap(target_features, join_features, out_fc, keep_all, spatial_rel)&lt;BR /&gt;File "E:\Library\GIS DATA\SCRIPTS\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 41, in SpatialJoinLargestOverlap&lt;BR /&gt;for row in scur:&lt;BR /&gt;RuntimeError: An invalid SQL statement was used.&lt;BR /&gt;Failed to execute (SpatialJoinLargestOverlap).&lt;/P&gt;&lt;P&gt;What could be causing this problem?&amp;nbsp; I thought it could be the dataset (I was using one that had over 200,000 records, but I created a subset of that that's only 2100 items, and it still fails to run).&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 23:00:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1047081#M39726</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-04-14T23:00:18Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1067219#M41888</link>
      <description>&lt;P&gt;Maybe I have the same case&amp;nbsp;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;File "D:\GIS Studio\Spatial-Join_Largest-Overlap\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 85, in &amp;lt;module&amp;gt;&lt;BR /&gt;SpatialJoinLargestOverlap(target_features, join_features, out_fc, keep_all, spatial_rel)&lt;BR /&gt;File "D:\GIS Studio\Spatial-Join_Largest-Overlap\SpatialJoinLargestOverlap\Scripts\SpatialJoinLargestOverlap.py", line 73, in SpatialJoinLargestOverlap&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;arcpy.management.JoinField(out_fc, "JOIN_FID", join_features, arcpy.Describe(join_features).OIDFieldName, joinfields)&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 8015, in JoinField&lt;BR /&gt;raise e&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\management.py", line 8012, in JoinField&lt;BR /&gt;retval = convertArcObjectToPythonObject(gp.JoinField_management(*gp_fixargs((in_data, in_field, join_table, join_field, fields), True)))&lt;BR /&gt;File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 512, in &amp;lt;lambda&amp;gt;&lt;BR /&gt;return lambda *args: val(*gp_fixargs(args, True))&lt;BR /&gt;arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000308: Invalid field type&lt;BR /&gt;Failed to execute (JoinField).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfiyanMustaqim_0-1623384772740.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15721i96C6D42BBE08B312/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfiyanMustaqim_0-1623384772740.png" alt="AlfiyanMustaqim_0-1623384772740.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I used 106.000 records&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 04:13:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1067219#M41888</guid>
      <dc:creator>AlfiyanMustaqim</dc:creator>
      <dc:date>2021-06-11T04:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1067380#M41908</link>
      <description>&lt;P&gt;Hi&amp;nbsp;AlfiyanMustaqim,&lt;/P&gt;&lt;DIV class="lia-message-author-with-avatar"&gt;&lt;DIV class="username-wrapper"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;I had found a solution to essentially perform a Select by Location using Largest Overlap.&amp;nbsp; Please see&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-questions/select-by-location-largest-overlap/m-p/1054383#M61026" target="_blank"&gt;https://community.esri.com/t5/python-questions/select-by-location-largest-overlap/m-p/1054383#M61026&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you accomplish what you set out to do.&lt;/P&gt;</description>
      <pubDate>Fri, 11 Jun 2021 15:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1067380#M41908</guid>
      <dc:creator>dgray</dc:creator>
      <dc:date>2021-06-11T15:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial Join - Largest Overlap - ArcGIS Pro</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1653616#M99248</link>
      <description>&lt;P&gt;As of recent years, you can use Spatial Join in Pro with the method Largest Overlap. The script referenced in this forum is no longer supported due to the built-in Pro functionality. When doing the spatial join, make sure both layers have the same projection or the join assignment will be off. In my experience and others, if the projections weren't exactly the same, the join was occurring with a neighboring feature or smallest overlapping feature instead of largest.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Sep 2025 20:01:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/spatial-join-largest-overlap-arcgis-pro/m-p/1653616#M99248</guid>
      <dc:creator>RileyAnderson</dc:creator>
      <dc:date>2025-09-26T20:01:52Z</dc:date>
    </item>
  </channel>
</rss>

