<?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 and fieldmappings in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90040#M6996</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;interesting. I will try that. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Dec 2013 17:02:11 GMT</pubDate>
    <dc:creator>BryceGardner1</dc:creator>
    <dc:date>2013-12-12T17:02:11Z</dc:date>
    <item>
      <title>Spatial join and fieldmappings</title>
      <link>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90038#M6994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have two feature classes that I am attempting to join. One is a point feature at the intersection of streets, the other is the streets line feature. I am using spatial join to create a new point feature that has the names of the streets as an attribute for the points. I know how to do this through the tool within ArcMap, but the code is a different matter. I have explored all the help through spatial join and fieldmappings, but it just doesn't make sense to me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the tool I create a new field, 'NAMES' and assign the streets names that intersect each point to that field, separating separate streets with a '&amp;amp;', using the windows in the tool. The tool makes simple work of this, however the code to make this happen is much more complex. Here is what I have so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;#4. spatial join &amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings = FieldMappings() &amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.removeAll() &amp;nbsp;&amp;nbsp;&amp;nbsp; fieldmappings.addFieldMap('NAMES') &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SpatialJoin_analysis(dissolve_int, dissolve, spatial_join, 'JOIN_ONE_TO_ONE', '', fieldmappings, 'INTERSECT', '5 FEET')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't seem to figure out how to tell the program to assign the street names from the streets line feature to this new field and separate them with a '&amp;amp;'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know this is more advanced, but any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bryce&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 16:44:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90038#M6994</guid>
      <dc:creator>BryceGardner1</dc:creator>
      <dc:date>2013-12-12T16:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial join and fieldmappings</title>
      <link>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90039#M6995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Bryce,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In ArcMap, run the spatial join tool with all parameters set and then open your Results window (Geoprocessing menu &amp;gt; Results).&amp;nbsp; Right-click on the completed tool &amp;gt; Copy as Python snippet.&amp;nbsp; You can then paste this into your IDE and see the correct syntax.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:00:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90039#M6995</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2013-12-12T17:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: Spatial join and fieldmappings</title>
      <link>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90040#M6996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;interesting. I will try that. Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 17:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/spatial-join-and-fieldmappings/m-p/90040#M6996</guid>
      <dc:creator>BryceGardner1</dc:creator>
      <dc:date>2013-12-12T17:02:11Z</dc:date>
    </item>
  </channel>
</rss>

