Customer Service | Training | Contact Us
Welcome!
Login
Search Options   products areas display

Which products should be considered?

All Products

ArcCAD
ArcEditor
ArcExplorer
ArcGIS Engine
ArcGIS Explorer
ArcGIS Image Server
ArcGIS Mobile
ArcGIS Server
ArcIMS
ArcInfo Desktop
ArcInfo Workstation
ArcLogistics Route
ArcPad
ArcPad Application Builder
ArcReader
ArcSDE
ArcView
ArcView 3.x
ArcWeb Services APIs
ArcWeb Toolbar for ArcGIS
Atlas GIS
BusinessMap
BusinessMap Pro
GIS Portal Toolkit
Job Tracking for ArcGIS
MapIt
Maplex
MapObjects -- Java
MapObjects -- Windows
MapObjects IMS
MapObjects LT
MapStudio
Military Overlay Editor
NetEngine
PC ARC/INFO & DAK
PLTS
RouteMap
RouteMap IMS
SDE
Tracking Server

    Remember these settings for each visit More info
You are here:

Technical Article   Problem:  Float values from text files are truncated to whole numbers in ArcMap

Article ID: 24611
Bug Id: N/A
Software:  ArcGIS - ArcEditor 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3 ArcGIS - ArcInfo 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3 ArcGIS - ArcView 8.1, 8.1.2, 8.2, 8.3, 9.0, 9.1, 9.2, 9.3
Platforms: N/A

Description

When viewing an ASCII CSV, TXT, or TAB file in an application other than ArcGIS, the file displays values such as:

X,Y

-124,34
-123.45,32.789





When opened in ArcGIS, the values displayed in these items are truncated to:

X,Y

-124,34
-123,32


Cause

Tools that access ASCII files in ArcGIS, such as the 'Add XY Data' command, use a Microsoft driver to read text files. By default, this driver only scans the first 75 records of the text file to determine the data type of each field. If the first 75 records are all integers, then the entire field will be assumed to be integer, even though subsequent records may be float or double.

Solution or Workaround

Modify the schema.ini file, which gets created in the same directory as the text file and defines how the Microsoft driver interprets the text file.

Instructions for modifying this file are available in the ArcGIS Online Help under Contents tab > ArcCatalog > Exploring the values in a table > About tabular data sources > Accessing delimited text file data. A link is provided to a Microsoft Web site where a search can be done on 'schema.ini' to access more detailed information.

  • The following example of schema.ini shows how to force the Microsoft text file driver to read the first 500 lines of a text file called MYDATA.TXT.

    [myData.txt]
    
    Format=CSVDelimited
    ColNameHeader=True
    MaxScanRows=500


Created: 3/1/2003
Last Modified: 9/16/2008

This website's graphical display is now viewable only with W3C standards-compliant browsers, but the content is accessible to all browsers and Internet devices. View our supported browser matrix for more information on our website display.