Spatial Join Error

1813
7
04-21-2022 10:52 AM
Labels (2)
CourtneyCrawford
New Contributor II

I am having an issue with a Spatial Join that I am hoping you can help me with. I am running ArcMap 10.8.2 that I just installed a few days ago, and this is the first thing I’ve tried to do with this install.

I have two files I’m working from. One is the ACS Poverty Status Variables file that I downloaded and opened directly from ESRI.

The other is a dataset that I downloaded from our Salesforce server It contains a unique identifier, a few variables related to how good the geocoding match was, and a latitude and longitude variable for the addresses of some of our clients.

I have been adding that as a data layer to the Poverty Status Variables map. From there, I have been exporting the data to assign ObjectIDs, and then using “Display XY Data …” For this, I’ve been using the GC_NAD_1983_NSRS2007 system, because that seems to display the points correctly. The shapefiles from ESRI are in WGS_1984_Web_Mercator_Auxiliary_Sphere.

From there, I have been trying to spatial join the points from the client data to the polygons for tracts from the ACS Poverty Status shapefile. Here are the things I’ve tried while troubleshooting this issue:

  • Running the spatial join via the Joins and Relates --> Join … tool from the Table of Contents. This crashes ArcMap every time.
  • Running the Spatial Join (Analysis) tool from the Geoprocessing toolbox. This fails with the error message “ERROR: code400, Cannot perform query. Invalid query parameters. Unable to perform query. Please check your parameters. Bad syntax in request.
  • Splitting the client data file into four sets of roughly 4,000 clients to see if it’s a filesize issue. Tried both methods 1 and 2. Same results.
  • Using the Project tool to change the coordinate system of the client file to match the coordinate system of the poverty variable shape file. Tried both methods 1 and 2 with this new file. Same results.
  • Tried renaming variables to see if it was a variable name issue somehow. Tried methods 1 and 2 with this new file. Same results.
  • Tried clicking the New File Geodatabase button from the Add Data menu and trying all over again with a totally new batch of files in a new file location on my drives. Same results on all the methods above.

I’m kind of at a loss and tearing my hair out, and to make matters worse I also seem to be having technical difficulties where it will not allow me to open a case ticket or open a live chat to get technical support. It says I either can’t do that within my agency, or that I am not assigned to an agency even though the agency is right there in the dropdown above the message saying I’m not assigned. I would really prefer not to spend time waiting on the phone for technical support if possible. Is this user error where I’m doing something wrong, or is there something wrong with my ArcMap software?

0 Kudos
7 Replies
RobertBorchert
Frequent Contributor III

I would give strong consideration to going with the Web Mercator for everything. 

Get everything in the same projection.

 

 

CourtneyCrawford
New Contributor II

That was my fourth iteration during troubleshooting. I put the client file in Web Mercator as well, and got the same issues. A crash using the Joins & Relates-->Join and the Error 400 using the Geoprocessing Spatial Join tool. I think it's definitely good practice but didn't fix my problem, unfortunately. 😞

0 Kudos
RhettZufelt
MVP Frequent Contributor

I see where you used “Display XY Data …” , but don't see where you exported that to a feature class.

Not sure if this has anything to do with it, but adding by Display XY creates an "Event Layer" and doesn't have all the functionality of  FeatureClass data (like, no OID field).  I've found many tools that this doesn't work with and have to export to actual FC first.

R_

 

CourtneyCrawford
New Contributor II

When I first put the client data file into ArcMap I have been using export data to change it to a dBASE table, which assigns it an ObjectID. Then I run the Display XY Data ... 

Is that what you're referring to? 

 

Thanks for trying to help, it did put me onto a new round of ideas for problem solving, though none of them have yielded anything yet. 😞

0 Kudos
RobertBorchert
Frequent Contributor III

At this point I would suspect there may be something wrong with the data itself.

Try creating  a double field for each feature class and populating it with a Geometry Calculation of the X or Y 

Have you also tried it with a brand new MXD.  Meaning, if your using an old one it could be hung up on the original projection.

0 Kudos
CourtneyCrawford
New Contributor II

I've tried redownloading the data from ESRI four or five times in the process with no luck, unfortunately. I've hit on a new issue now where I found something that fixes the Join error, but gives me a whole new problem. Going to put that as a main reply.

0 Kudos
CourtneyCrawford
New Contributor II

In the process of doing a bunch more troubleshooting, I found a way to fix the join problem, and immediately encountered another issue that has me back at square one.

I noticed that the shapefile I'm trying to join to is showing under my Table of Contents as being from services.arcgis.com. So I tried exporting the shapefile onto my personal drive so that the shapefile and the point file would be in the same place.

That fixed the join. However, then I realized that it didn't export the FULL shapefile. I am now discovering that I cannot export a shapefile fully, seemingly regardless of size. I have tried using "Select by Attribute" and then "Create Layer from Selected Features" to divide the shapefile into a few smaller pieces, and those won't fully download either. It'll show a progress bar, and then somewhere between 9% and 39% it will act like it's finished and ask me if I want to add it to my map. I am getting between 2,000 and 16,000 rows each time I do this, so even that isn't consistent.

0 Kudos