Google Sheets loses latitude-longitude precision compared to direct upload of feature

548
4
05-02-2023 06:17 AM
KarenEdelstein
New Contributor II

I'm having an issue with ArcGIS Online losing decimal places when I import a .csv file into an AGOL project. When I export features directly from ArcGIS, I can maintain the position of  the centroids that drop directly into my grid. But when the same dataset is uploaded to AGOL via .csv in Google Sheets, the data are shifted from their true centroid location. How do I remedy this? I need to have the data coming into the project via .csv from Google in order to automate map updates from an external client. 

The process works fine when the same data are exported from the desktop environment to a feature in ArcGIS online. The shift in the points is minor, but we must maintain the centroid position and therefore get Google Sheets to accurately place the data it has been given. The shift is only by 3 feet, but these point features are critical for locating a feature in the field.

Black circles show centroid from desktop export. Red circles are what happens through the .csv import.

KarenEdelstein_0-1683033384854.png

 

0 Kudos
4 Replies
BernSzukalski
Esri Frequent Contributor

Since I had some sample cases from an earlier blog I had written, I went through the paces comparing a local CSV that I used to create a feature layer with a Google Drive CSV that I used to create a feature layer. Both are exactly the same, with no differences or offset. I also looked at the coordinates stored in the feature layer tables and they are exactly the same, preserving precision throughout the import workflows.

I did this comparison by importing a CSV into ArcGIS Online from a local file source on my drive. I repeated by taking that same file and adding it to Google Drive, then importing and publishing the feature layer from Google.

It seems you are comparing publishing from ArcGIS Desktop to Online, then from Google to Online. I would suggest trying a few rows of that file as I have described above - that might help isolate where things differ. And also checking the coordinates you see in the Google Drive file vs. the local CSV.

A Google search also uncovered some commentary about precision and rounding when using Google sheets, that might be worth considering as well.

 

0 Kudos
KarenEdelstein
New Contributor II

Hi Bern, Thanks for weighing in on this. I've done exactly as you described, and have been repeating the same pattern, over and over again. I have tried copying and pasting the attribute data into an Excel .csv on my local drive, which uploads to the AGOL map correctly. When the exact same data are either uploaded as a file to Google Drive and then imported as a .csv from the web, or pasted into a new empty Google Sheet as a new file and brought in, the shift happens. I have tried this keeping the latitude and longitude as a number, and also as a text field, and get the same issue.

When I took the correct coordinates from the original point (to 5 or more decimal places) and put them into the search function in the AGOL map, the location was similarly shifted. 

Here's the feature class uploaded, with freshly-recalculated x,y, and when I put these coordinates into the search function, I get the off-set in the same place the Google Sheet .csv lands.

KarenEdelstein_2-1683061562146.png

 

KarenEdelstein_1-1683061443054.png

Interestingly, I have also had the same issue when bringing in the same .csv stored on Google Drive into a Google Maps project. 

I hope there might be some "smoking guns" here that can aid in getting to the bottom of this. Is the difference between taking the decimal degree out from 6 to 8 places a culprit?

0 Kudos
BernSzukalski
Esri Frequent Contributor

Send me a few rows from your CSV if you can, and I'll test it out on my end. You can copy/paste here or send as attachment to bszukalski@esri.com

You are using ArcGIS Online, correct? But it looks like you are viewing things in Map Viewer Classic?

 

0 Kudos
BernSzukalski
Esri Frequent Contributor

To close out this thread, the root cause of the issue was discovered, which is not with Google Drive files or the workflow to create feature layers from Google. If Google Drive is part of your workflow, feature layer creation works just fine.

0 Kudos