Raster to ASCII

Function Description: Converts a raster dataset into an ASCII text file that represents the raster data.

Data Description

  • The input raster dataset can be any valid raster dataset.

  • The structure of the ASCII file consists of a header with a series of keywords, followed by pixel values arranged in row-major order.

    The format of the file generally is:

    ncols xxx
    nrows     xxx
    xllcorner xxx
    yllcorner xxx
    cellsize xxx
    NODATA_value xxx
    row 1
    row 2
    .
    .
    row n
    

    The definitions of the keywords are as follows:

    • ncols and nrows: The number of columns and rows in the raster as defined by the ASCII file.
    • xllcorner and yllcorner: The coordinates of the lower-left corner of the raster cell.
    • cellsize: The size of each raster cell.
    • NODATA_value: The value used to represent NoData cells.
    • In the pixel value data stream, the first row of data is at the top of the raster, the second row is directly below the first row, and so on.
  • Here is an example of an ASCII raster file:

    ncols 480
    nrows     360
    xllcorner 398722
    yllcorner 4152341
    cellsize 25
    NODATA_value -9999
    9 18.150000 16.850000 16.790001 16.700001 16.540001 15.800000 17.870001 22.780001 17.049999 11.960000 9.460000 9.510000 9.600000 10.520000 11.810000 12.310000 12.500000 12.970000 13.100000 13.390000 13.910000 14.700000 15.190000 ...
    
  • NODATA_VALUE: The value used in the ASCII file to represent NoData cells in the input raster. This value is typically reserved for pixels where the "true" value is unknown.

  • In the file, each line of raster data ends with a carriage return.

  • Both integer and floating-point rasters can be converted to ASCII raster files.
  • This tool writes the lower-left corner of the lower-left pixel as the origin.

Steps

  1. Locate the Raster to ASCII tool under Raster Tools in the toolbox, and double-click to open the tool's window.
Picture

Raster to ASCII

Parameter Description:

  • Input Raster: The input raster dataset, which can be either integer or floating-point data.
  • Output ASCII Raster File: The output ASCII raster file.

results matching ""

    No results matching ""