-
ASCIIIMG: Importing ASCII raster files to MiraMon raster files
Access this help text as a web page: ASCIIIMG
Presentation and options
This application converts raster files from several ASCII formats to MiraMon (IMG format). Supported ASCII formats may have header records (lines). These lines normally refer to some characteristics of the file, such as the number of columns and rows, etc. Depending on the treatment of these header lines, ASCIIIMG has three options:
ASCIIIMG ESRI:
This option interprets the header of the ESRI ASCII format to transform the file.
ASCIIIMG NO ENV:
In this option neither the scope nor the reference system is indicated. The number of columns, rows and number of lines that contains the ASCII file must be write manually, as well as the number of header lines to skip.
ASCIIIMG ENV:
In this option the scope and the reference system is indicated. The number of columns, rows and number of lines that contains the ASCII file must be write manually, as well as the number of header lines to skip.
Thereby, ASCIIIMG supports four main types of ASCII files:
Supported output data types are: bit, byte, integer, uinteger, long and real, with RLE compression or without compression.
ASCIIIMG supports carriage returns in DOS/Windows-style (0x0D 0x0A) and in UNIX-style (0x0D).
A flag value (or 'NoData') can be indicated. This value will be used both when logging explicit values (such as those given in some ESRI header files) and when the conversion is out of range.
The application documents a minimal set of metadata, which can be enriched with GeM+ later if desired. Documented metadata are:
data type :
file type :
columns :
rows :
min. value :
max. value :
flag value :
If more arguments are provided in command line, it also documents:
ref. system :
ref. units :
min. X :
max. X :
min. Y :
max. Y :
resolution :
If this is not indicated, by default this metadata will be documented as:
ref. system : plane
ref. units : pixels
min. X : 0
max. X : nfil
min. Y : 0
max. Y : ncol
resolution : 1
The rest will be documented as:
file title :
unit dist. : 1.0
pos'n error : unknown
value units : unspecified
value error : unknown
flag def'n : background
legend cats : 0
The application controls whether the input image is complete or not (truncated). In the last case, if the deficit of cells or pixels is less than a 70%, the application fills the rest of the image with the last read value. This way, the imported image can be visualized or clipped to keep only the valid cells.
Dialog box of the application
Syntax
Syntax:
- ASCIIIMG reg FOri FDest DataType [RefSys] [RefUnit]
- ASCIIIMG reg FOri FDest ncol nfil nlin DataType FlagValue FlagDef
- ASCIIIMG reg FOri FDest ncol nfil nlin DataType FlagValue FlagDef minx maxx miny maxy RefSys RefUnit
Parameters:
- reg
(Record size or delimiter -
Input parameter): Indicates the treatment for the three main types of ASCII file:
- -1 (and less than 6 parameters) for an ESRI ASCII raster format.
- 0 when values are separated by a delimiter
- n The cell width (in characters) for Fixed Record format.
- -n (and 6 o more parameters) when it is an n columns structured ASCII file, the n indicates the number of column to import.
- FOri
(Input file -
Input parameter): Input ASCII file.
- FDest
(IMG file -
Output parameter): IMG output file.
- DataType
(Data Type -
Input parameter): Output data type:
- bit (integer [0,1], 1 bit/cell)
- byte (integer [0,255], 1 byte/cell)
- integer (integer [-32768, 32767], 2 bytes/cell)
- uinteger (integer [0, 65535], 2 bytes/cell)
- long (integer [-2147483648, 2147483647], 4 bytes/cell)
- real (floating point numbers ±3.4E±32, 4 bytes/cell)
- RefSys
(Reference System -
Input parameter): Name of the spatial reference system (projection, datum, etc). If not indicated it will be plane by default.
- RefUnit
(Reference Unit -
Input parameter): Units of the spatial reference system. When indicated, they must be those corresponding to the SisRef (typically "m" for conventional projections, or degrees (°) for longitude-latitude systems). If the parameter is not specified it will be pixel by default.
- ncol
(Number of columns -
Input parameter): Number of columns of the ASCII file.
- nfil
(Number of rows -
Input parameter): Number of rows of the ASCII file.
- nlin
(Number of lines to skip -
Input parameter): The header of the ASCII file can be skiped by indicating the number of lines that it contains; zero (0) must be indicated for files without header.
- FlagValue
(Flag Value -
Input parameter): Value corresponding to the image NoData or "none" if not required.
- FlagDef
(Flag Definition -
Input parameter): Image NoData value definition or "none" if there is no flag value.
- minx
(X minimum -
Input parameter): X minimum of the image bounding box.
- maxx
(X mmaximum -
Input parameter): X maximum of the image bounding box.
- miny
(Y minimum -
Input parameter): Y minimum of the image bounding box.
- maxy
(Y maximum -
Input parameter): Y maximum of the image bounding box.
Modifiers: