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?
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.
The issue you are running into is that the precision (number of digits) that is saved in an output dbf defaults to 12 when copying data out.
The best way to copy the data is instead of right click/export the layer, use the Merge tool with your point layer as a single input. In the field map, specify the output field properties to have precision 15. If you do this, your data value will not be rounded in the shapefile. Here are the details on how to tweak the field map:
Using the field mapping control—Help | ArcGIS for Desktop
Dbf is pretty primitive -- what is stored are the ascii number characters (and the "."!):
1 0 9 3 7 7 6 7 3 4 . 0
1|2|3|4|5|6|7|8|9|0|1|2
This is a limitation of the dBase-III+ format utilized by shapefiles. It's not clear which application is causing the issue, but there are two possible encodings for large floating-point values, one of which uses scientific notation, in a format like "sN.NNNNNNNNesNNN". If you were to inspect the contents of the .dbf file, you would find values like "+1.09377673e+009", which is why the least significant digit is lost.
You can find an example of a similar situation from the old Forums, ported to Geonet.
- V
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
ensure that the field was explicitly formatted in excel and that it does not contain blanks or other data types or an attempt will be made to find a 'common' data type and not necessarily the one you want
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?
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?
Can you make a FGDB to export your data into a feature class instead of a shapefile?
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).
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?
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)
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.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.