We're doing a simple query of 2 portal feature layers and performing a spatial join on the 2 sdf representations. It looks like the error complains "Difference Spatial References, aborting operation" when a Left/Right join is attempted, so I checked each sr for each sdf and sure enough one of them is []!
This issue appears to only occur on 1 of our enterprise portals (we have a test and prod version of each site). When I check the item properties it does show the correct spatref so I'm not sure where to check next!
Code executed on it's comparable items across both portals produces what we expect:
{'wkid': 2881, 'latestWkid': 2881}
The other portal produces:
[]
targetFSet = scratchLayer.query(where=qryStr,out_sr=2881)
targetDF = targetFSet.sdf
df1SR = targetDF.spatial.sr
print(df1SR)
Solved! Go to Solution.
If nothing evaluates from the query and the result is [] sdf then there is no spatial reference and nothing to join. It must be that I get a result from 1 of the portal items and the other i do not!
If nothing evaluates from the query and the result is [] sdf then there is no spatial reference and nothing to join. It must be that I get a result from 1 of the portal items and the other i do not!