Dbf LON & LAT Field formats changing during XY event Tool Processing....

337
3
09-06-2017 12:21 PM
BrianWade
Occasional Contributor

In ARCGIS 10.5.1 or ARCPRO 2.0.1, Why when I use a dbf with a NUM Field LON 11.6 and a NUM Field LAT 10.6 into a Make event Layer tool the resulting shape file has converted them Both FLOAT 19.11?

Can I prevent this from Happening?

Typically, after converted to a shape file, have to change the LON & LAT back using FOXPRO or whatever

database editing program I have.

I understand that possibly there’s a schema issue maybe involved, but I don’t understand how they work in relation to Tool use.

And also, when converting an Excel file into ARCGIS as a table, then exporting, it also loses all previous field length formats, how do I maintain the input file field lengths and format Types?

Any help would be appreciated.

 

Thanks

Brian

Tags (1)
0 Kudos
3 Replies
curtvprice
MVP Esteemed Contributor

This is a known issue. Dbf is an old primitive format that saves numbers text strings (for example, 19 scale, 11 precision "12345678.12345678901"). In contrast numbers in the gdb are stored much more efficiently as binary 4 bytes Float (7-8 sig figs) or 8 bytes Double (15-16 sig figs). Since data formats are handled as generically as possible in ArcGIS, these defaults (19,11) were a design decision by the developers. This default is set up to (as much as possible) avoid destroying data precision by truncation. 

You may be able to control the format of the output dbf using Feature Class To Feature Class with a field map to copy data to shapefile format, specifying Precision and Scale in the field map. The Table To Table tool also supports a field map.

#BUG-000095512 Precision and Scale Tables Issue Desktop 10.4

Geoprocessing considerations for shapefile output—Appendices | ArcGIS Desktop 

Using the field mapping control—Help | ArcGIS for Desktop 

Excel does not store precision very well and makes assumptions about numerical precision (and data type), though it does display things nicely. This is a big reason Excel is a great analysis tool, but a crappy database!

0 Kudos
BrianWade
Occasional Contributor

Thanks Curtis, however our input data is in a "primitive" dbf format so I think Im stuck. I did try to put my dbf into a geodatabase, thinking that it would then maintain my LAT & LON formats but no joy.

Whats strange is that when you look at the output field properties, it does have the correct field formats listed, but after the tool runs it goes back to per 13., scale11.

Do you know of a way to set a option to force the tool to maintain formats? our data for the near future will always be in a dbf format.

Is there another format I could pre-convert the dbf to, that Arc will maintain formats.

Thanks

Brian

0 Kudos
curtvprice
MVP Esteemed Contributor

The only way I can think to preserve your format would be convert them to string and handle them that way (like one does with datetimes to keep them unmodified across multiple formats). The precision and scale field properties in the geodatabase are really just metadata, they don't affect data storage at all. The only other suggestion I have is to try to reformat the data on output using the field map properties, which I think is worth a try.

0 Kudos