<?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 Exported spatial join python command does gives different results as in ArcMap! in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20113#M1603</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am currently trying to join two shapefiles (polylines) that have "intersecting" features using the "spatial join" tool. In my example i additionally want to add one field from the attribute table of the join features to the target features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is:&lt;BR /&gt;This works in ArcMap (10.4.1.5686) but not when using a Python 2.7 script. For me it seems that there has to be a bug involved. To make this clear (and hopefully get some helpful answers) i have made some screenshots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first a screenshot of the spatial join window showing all the settings i was using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot of the working Spatial Join tool settings in ArcMap" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390539_screen1_arcmap_spatial_join_working.png" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next is a screenshot of the attribute table of the output shapefile, as you can see the last column shows all the correct values:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="output attribute table after the Spatial Join" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390540_screen2_arcmap_spatial_join_result.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this was just for testing, for my actual project i need to run this in a python script, so i tried to reproduce the results by copying the python command from the ArcMap results window. This is what i got:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialJoin_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;target_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_noDTV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_DTV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_feature_class&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"D:/arcgis/output/temp.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
join_operation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"JOIN_ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"KEEP_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
field_mapping&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"t_FID "&lt;/SPAN&gt;t_FID" true true false &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; Long &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,temp_noDTV,t_FID,-1,-1""",&lt;/SPAN&gt;
match_option&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"INTERSECT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; search_radius&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance_field_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P&gt;to make this work i have to adjust the paths a bit, here is my final python script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\.."&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialJoin_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;target_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_noDTV.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_DTV.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_feature_class&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
join_operation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"JOIN_ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"KEEP_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
field_mapping&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"t_FID "&lt;/SPAN&gt;t_FID" true true false &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; Long &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,temp_noDTV,t_FID,-1,-1""",&lt;/SPAN&gt;
match_option&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"INTERSECT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; search_radius&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance_field_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script basically works, which means i get the same output features (the features of the TARGET that intersect with the JOIN features) but the important t_FID field/column in the output table contains only zeros!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there was or is a bug with spatial join when the target contains features that does not INTERSECT with the join features but there is a working workaround by selecting the intersecting features first and then to the spatial join OR just do the spatial join on the output again (as you can see the output has indeed the correct features). But i also tested this and got the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i have just made a stupid mistake and someone smart can point out my mistake, because i need this to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:48:11 GMT</pubDate>
    <dc:creator>OliverGötze</dc:creator>
    <dc:date>2021-12-10T20:48:11Z</dc:date>
    <item>
      <title>Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20113#M1603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i am currently trying to join two shapefiles (polylines) that have "intersecting" features using the "spatial join" tool. In my example i additionally want to add one field from the attribute table of the join features to the target features.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is:&lt;BR /&gt;This works in ArcMap (10.4.1.5686) but not when using a Python 2.7 script. For me it seems that there has to be a bug involved. To make this clear (and hopefully get some helpful answers) i have made some screenshots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At first a screenshot of the spatial join window showing all the settings i was using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Screenshot of the working Spatial Join tool settings in ArcMap" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390539_screen1_arcmap_spatial_join_working.png" style="width: 620px; height: 473px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next is a screenshot of the attribute table of the output shapefile, as you can see the last column shows all the correct values:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="output attribute table after the Spatial Join" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/390540_screen2_arcmap_spatial_join_result.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this was just for testing, for my actual project i need to run this in a python script, so i tried to reproduce the results by copying the python command from the ArcMap results window. This is what i got:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialJoin_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;target_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_noDTV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_DTV"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_feature_class&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"D:/arcgis/output/temp.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
join_operation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"JOIN_ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"KEEP_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
field_mapping&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"t_FID "&lt;/SPAN&gt;t_FID" true true false &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; Long &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,temp_noDTV,t_FID,-1,-1""",&lt;/SPAN&gt;
match_option&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"INTERSECT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; search_radius&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance_field_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P style="text-align: justify;"&gt;&lt;/P&gt;&lt;P&gt;to make this work i have to adjust the paths a bit, here is my final python script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\.."&lt;/SPAN&gt;

arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SpatialJoin_analysis&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;target_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_noDTV.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_features&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp_DTV.shp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_feature_class&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"temp"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
join_operation&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"JOIN_ONE_TO_ONE"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; join_type&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"KEEP_COMMON"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
field_mapping&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"t_FID "&lt;/SPAN&gt;t_FID" true true false &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; Long &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;First&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;#,temp_noDTV,t_FID,-1,-1""",&lt;/SPAN&gt;
match_option&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"INTERSECT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; search_radius&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; distance_field_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This script basically works, which means i get the same output features (the features of the TARGET that intersect with the JOIN features) but the important t_FID field/column in the output table contains only zeros!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know there was or is a bug with spatial join when the target contains features that does not INTERSECT with the join features but there is a working workaround by selecting the intersecting features first and then to the spatial join OR just do the spatial join on the output again (as you can see the output has indeed the correct features). But i also tested this and got the same result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope i have just made a stupid mistake and someone smart can point out my mistake, because i need this to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:48:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20113#M1603</guid>
      <dc:creator>OliverGötze</dc:creator>
      <dc:date>2021-12-10T20:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20114#M1604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I always get suspicious when I see 'true' when it might be 'True' especially if python is involved and booleans are needed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 10:00:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20114#M1604</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-12T10:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20115#M1605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer but that was not the problem. But after rereading the post i had an idea and luckily found the solution &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;As i said, to make the ArcMap results command work i had to adjust the paths a bit, this included adding ".shp" to the TARGET and JOIN features names or i get an error when running the script. But there was another place where i "forgot" to add the ".shp" and got no errors from the python interpreter and that was the "field_mapping" attribute. I just had to replace "temp_noDTV" with "temp_noDTV.shp" to make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 10:20:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20115#M1605</guid>
      <dc:creator>OliverGötze</dc:creator>
      <dc:date>2017-12-12T10:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20116#M1606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was going to be my backup answer&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 10:45:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20116#M1606</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-12T10:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20117#M1607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you called Spatial Join using the GUI, you weren't selecting data sets for target and join features but layers.&amp;nbsp; When the tool runs against layers, it looks at the selection against the layers and then reaches back to the data sets the layers point to.&amp;nbsp; When you used the exact same code in a stand-alone script, there were no layers or data sets with those names, the the tool returns an error.&amp;nbsp; If you wanted the GUI-derived code to work as-is, you would need to run Make Feature Layer on the target and join features first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2017 15:12:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20117#M1607</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-12-12T15:12:58Z</dc:date>
    </item>
    <item>
      <title>Re: Exported spatial join python command does gives different results as in ArcMap!</title>
      <link>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20118#M1608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, after the initial try of the spatial join command given by the ArcMap i got those error messages and a came to the conclusion you described. But the actual problem i had, was due to the missing file ending in the field_mapping attribute of the arcpy.SpatialJoin_analysis function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2017 07:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/exported-spatial-join-python-command-does-gives/m-p/20118#M1608</guid>
      <dc:creator>OliverGötze</dc:creator>
      <dc:date>2017-12-13T07:15:03Z</dc:date>
    </item>
  </channel>
</rss>

