sdf spatial reference is empty []

374
1
Jump to solution
02-16-2024 11:23 AM
Labels (2)
JamesCrandall
MVP Frequent Contributor

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)

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
JamesCrandall
MVP Frequent Contributor

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!

View solution in original post

0 Kudos
1 Reply
JamesCrandall
MVP Frequent Contributor

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!

0 Kudos