ASCII rasters display as INTEGER instead of FLOAT

3701
3
02-01-2013 03:56 AM
jancor
by
New Contributor
Hi,
I have a lot of rasters in ESRI ASCII raster format (text files). These can be  added to ArcMap by simply dragging them from ArcCatalog.
I use ArcGIS desktop 9.3.1 SP2.

The problem is: These rasters contain FLOAT data, but when directly opened in ArcMap they are displayed as INTEGER grids.
Here is an example of a header + first line w/ nodata values:
ncols         2410
nrows         1220
xllcorner     21000
yllcorner     128000
cellsize      100
NODATA_value  -9999
-9999 -9999 -9999 -9999 -9999 -9999 -9999 -9999 etc.

I've noticed that the rasters will only display data with real values, instead of integer, if:
1) the decimal separator is a point (instead of a comma)
2) the first value in the raster after the header includes a decimal point e.g. -9999.0 instead of -9999

Almost all of my rasters start with a nodata value of -9999, so I'd have to put '.0' behind every first value in the ASCII files or I'd have to import all the ASCII files to rasters using e.g. RasterToASCII_conversion.

Is there another way to visualise these rasters directly and correctly without the need to change all my ascii files as described above?
Is there another text file format for rasters that could perform better than the ESRI ASCII format?


thanks!
0 Kudos
3 Replies
jonahsullivan
New Contributor II
I have found the same problem. I can't seem to find a solution aside from editing the first raster cell value with the required precision (changing -9999 to -9999.00)
0 Kudos
jonahsullivan
New Contributor II
This KB article isn't very helpful:
http://support.esri.com/en/knowledgebase/techarticles/detail/24611

It points to a help file, which says to search the MSDN for how the schema.ini file works and the fact that it can be edited to change text behaviour, but that is all too hard.

I found I could use the ascii to raster tool (conversion --> to raster) to specify that the output raster should be "float".

I used that tool as a batch to convert from *.asc to *.img.

A silly work-around that shouldn't be needed, but it works.
0 Kudos
jancor
by
New Contributor
Hi, thanks for the reply. I also worked around it by programming the batch conversion in python and converting all the ASCII files to esri grids using ASCIIToRaster_conversion()
0 Kudos