How to stop variable from being rounded when converting to shapefile

5321
15
Jump to solution
06-01-2015 11:02 AM
MichelConn
New Contributor II

I am trying to add X and Y data from a previously geocoded data set (excel file). The process is a success but the problem I am facing is for some reason ArcGIS is rounding to the tenth place a very important identifying variable. I am converting the original results to a shapefile because I need to run a spatial join with the data. It appears that when converting the original results to a shapefile ArcGIS is rounding the variable of interest. Is there any workaround or way to stop ArcGIS from rounding my data?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
SepheFox
Frequent Contributor

I think, that since you've identified the shapfile as the step where your values change, you should create a geodatabase in ArcCatalog, and then after you create your data, export into the GDB as a feature class.

View solution in original post

0 Kudos
15 Replies
SepheFox
Frequent Contributor

Are you certain the data is being rounded, or is the field only displaying two decimal places? A quick test would be to create a new field with type float or double, and then calculate the field equal to your existing field.

ChrisDonohue__GISP
MVP Alum

To elaborate on one of Sephe's comments, in ArcGIS, check whether the field is fully displaying, as often it truncates or rounds the display of the data though the data itself is actually untouched.

To do this, go into the field properties and check on the display properties.  I don't have ArcGIS in front of me at the moment, but if I remember correctly one has to click on the ellipsis (...) to open part of the display settings, which is not so obvious.  You can then increase the amount of digits displayed.

Chris Donohue, GISP

MichelConn
New Contributor II

Yeah I am pretty sure. After the spatial join I exported the data to an excel file so I can use the data with SAS. I found this issue while messing with the data in SAS and found out most of my data was incorrect. And sorry I misspoke in the original post the ones place is being rounded (ex 506 to 510)

0 Kudos
SepheFox
Frequent Contributor

That shouldn't be happening at all. What is the variable that is being changed? I'm assuming you have looked at all the steps and correctly identified the conversion to shapefile step as the one that changes your data. How exactly are you going about the conversion? How are you importing the xy data from excel?

0 Kudos
MichelConn
New Contributor II

Yeah I double checked the the conversion is causing the issue. The original data is correct and after adding the X and Y data the variable of interest appears correct. I used the identify feature and examined a few random points before conversion. Before the conversion there is a only a handful of observations that end in 0. After the conversion every variable of interest ends in 0. A specific example I found was the variable being converted from 1093776734 (X and Y data before conversion) to 1093776730 (Shapefile after conversion).

0 Kudos
SepheFox
Frequent Contributor

Can you make a FGDB to export your data into a feature class instead of a shapefile?

0 Kudos
MichelConn
New Contributor II

I tried this but the usual method I use for converting a file is to right click the file -> data -> export data. The issue I run into is ArcGIS won't let me save the file as any other type besides a shapefile. I get the error message "An error occured trying to save the object name "export_output2"." Is there another way to convert file?

0 Kudos
SepheFox
Frequent Contributor

You can only export a feature class into a geodatabase, otherwise you will get this error. Did you create a file geodatabase to export the data into first?

0 Kudos
MichelConn
New Contributor II

My current process for getting X and Y data is to add the excel data right click then select add X and Y data. So up until I convert the file to a shapefile I am still working with the excel format. Should I be using a different format then excel. Maybe I should try converting the excel data table to a .gdb format then getting the X and Y data?

0 Kudos