<?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 sdf spatial reference is empty [] in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-reference-is-empty/m-p/1383578#M9663</link>
    <description>&lt;P&gt;We're doing a simple query of 2 portal feature layers and performing a spatial join on the 2 sdf representations.&amp;nbsp; It looks like the error complains&amp;nbsp; "&lt;SPAN&gt;Difference&amp;nbsp;Spatial&amp;nbsp;References,&amp;nbsp;aborting&amp;nbsp;operation" when a Left/Right join is attempted, so I checked each sr for each sdf and sure enough one of them is []!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This issue appears to only occur on 1 of our enterprise portals (we have a test and prod version of each site).&amp;nbsp; When I check the item properties it does show the correct spatref so I'm not sure where to check next!&lt;/P&gt;&lt;P&gt;Code executed on it's comparable items across both portals produces what we expect:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{'wkid':&amp;nbsp;2881,&amp;nbsp;'latestWkid':&amp;nbsp;2881}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other portal produces:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;targetFSet = scratchLayer.query(where=qryStr,out_sr=2881)
targetDF = targetFSet.sdf
df1SR = targetDF.spatial.sr
print(df1SR)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Feb 2024 19:23:38 GMT</pubDate>
    <dc:creator>JamesCrandall</dc:creator>
    <dc:date>2024-02-16T19:23:38Z</dc:date>
    <item>
      <title>sdf spatial reference is empty []</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-reference-is-empty/m-p/1383578#M9663</link>
      <description>&lt;P&gt;We're doing a simple query of 2 portal feature layers and performing a spatial join on the 2 sdf representations.&amp;nbsp; It looks like the error complains&amp;nbsp; "&lt;SPAN&gt;Difference&amp;nbsp;Spatial&amp;nbsp;References,&amp;nbsp;aborting&amp;nbsp;operation" when a Left/Right join is attempted, so I checked each sr for each sdf and sure enough one of them is []!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This issue appears to only occur on 1 of our enterprise portals (we have a test and prod version of each site).&amp;nbsp; When I check the item properties it does show the correct spatref so I'm not sure where to check next!&lt;/P&gt;&lt;P&gt;Code executed on it's comparable items across both portals produces what we expect:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;{'wkid':&amp;nbsp;2881,&amp;nbsp;'latestWkid':&amp;nbsp;2881}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The other portal produces:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;targetFSet = scratchLayer.query(where=qryStr,out_sr=2881)
targetDF = targetFSet.sdf
df1SR = targetDF.spatial.sr
print(df1SR)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 19:23:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-reference-is-empty/m-p/1383578#M9663</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2024-02-16T19:23:38Z</dc:date>
    </item>
    <item>
      <title>Re: sdf spatial reference is empty []</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-reference-is-empty/m-p/1383597#M9664</link>
      <description>&lt;P&gt;If nothing evaluates from the query and the result is [] sdf then there is no spatial reference and nothing to join.&amp;nbsp; It must be that I get a result from 1 of the portal items and the other i&amp;nbsp; do not!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Feb 2024 19:46:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/sdf-spatial-reference-is-empty/m-p/1383597#M9664</guid>
      <dc:creator>JamesCrandall</dc:creator>
      <dc:date>2024-02-16T19:46:14Z</dc:date>
    </item>
  </channel>
</rss>

