In the Esri world an
.asc file usually refers to the output created by the GRIDASCII command (ArcInfo Workstation) or Raster to ASCII tool (ArcGIS for Desktop). In practice it can mean just about any format, usually plain text, meaning one can't assume from the
.asc extension what it looks like inside.
It's an interchange format, meaning it's not (normally) used as input for analysis or primary storage, but for exchange with other programs.
The Esri ASCII Raster format can use either integer or floating point numbers for the Z (cell) value. These are both valid:
43 2 45 7 3 56 2 5 23 65 34 6 32 54 57 34
35 45 65 34 2 6 78 4 2 6 89 3 2 7 45 23 5 ...
43.245 7.356 2.523 6.534 6.325 57.34
35.456 34.267 4.268 32.745 23.5 ...
The Esri GRID format, also called Arcinfo Binary Grid, is comprised of multiple files in a single directory (
.adf,...) and whose contents are opaque (looks like gobbledygook in a text editor). The grid specification is unpublished, but has been very successfully reverse engineered. Binary Grid is the default raster format for ArcInfo Workstation (actually comes from its GRID program) and is used as primary storage and analysis input.
You didn't ask about this, but for completeness: there is also the Esri floating point grid interchange file format. It is not used for primary storage or analysis.
Floating point grids are created from the GRIDFLOAT (ArcInfo Workstation) command or Raster to Float (ArcGIS for Desktop) tool and typically has a
.flt extension for the raw values (binary encoded), and side car
.hdr file describing the format. The .hdr is plain text and resembles the beginning of an .asc file:
In practice, if you have a file of unknown format that you think might be a raster, show it to gdalinfo from gdal and it will usually be able to uncover what it is:
D:\> gdalinfo strange_file.raw
Driver: AAIGrid/Arc/Info ASCII Grid
Size is 382, 425
Coordinate System is `'
Origin = (217996.296875000000000,836484.155139103760000)
Pixel Size = (300.074188562596990,-300.074188562596990)
Upper Left ( 217996.297, 836484.155)
Lower Left ( 217996.297, 708952.625)
Upper Right ( 332624.637, 836484.155)
Lower Right ( 332624.637, 708952.625)
Center ( 275310.467, 772718.390)
Band 1 Block=382x1 Type=Int32, ColorInterp=Undefined
Driver: EHdr/ESRI .hdr Labelled
Size is 382, 425
Band 1 Block=382x1 Type=Float32, ColorInterp=Undefined
...and then use gdal_translate to convert it something useful if you don't have ArcGIS for Desktop handy.