IMGASCII: Export to ASCII format from MiraMon
raster
This module generates an ASCII text file from a MiraMon raster
format file: img+i.rel in version 4 or img+doc in previous
versions.
The format of the file produced by this program may be:
- the sequence of values corresponding to each pixel in the input
raster, written from the pixels read from left to right and from top to
bottom.
- the sequence: X_coordinate Y_coordinate value carriage_return
corresponding to each pixel centre in the input raster. The order is the
same as for the previous case.
It is also possible to define at the start of the file a small header
with the extent and the pixel size or a header with all the information
contained in the documentation file i.rel or doc.
When the raster contains real values it is possible to specify the number
of decimal places to be written using the parameter /N_DEC_VAL=. For the
case where the coordinates are to be exported it is also possible to define,
using the parameter /N_DEC_POS=, the number of decimal places to be used
when writing the coordinates. If necessary, when these parameters are not
defined, the program will use the number of decimal places defined by the
DigitsDecimals= key of the [MiraMon] section of the
MiraMon.par configuration file.
Note: If you wish to import the ASCII format generated as a
sequence of values (option 1), this can be done with the module ASCIIImg. On the other hand to import the format that
includes the coordinates (option 2), it is necessary to use the module
BdPnt which will produce a points file which then
has to be rasterised with the module TiraVec.
Syntax:
IMGASCII Option InputFile OutputFile [Optional Parameters]
- Option indicates the format of the ASCII file to be generated
- 1: [Values ...]
- 2: [X_Coordinate Y_Coordinate Raster_value ...]
- InputFile is the img file that is to be exported.
- OutputFile is the resulting ASCII file. If an extension is desired
this must be specified.
Optional Parameters:
- /N_DEC_VAL= defines the number of decimal places for the
raster values when these are real data. The default value is defined by
the DigitsDecimals= key of the [MiraMon] section of the
MiraMon.par configuration file.
- /N_DEC_POS= defines the number of decimal places for the
coordinates when this needs to be defined. The default value is defined
by the DigitsDecimals= key of the [MiraMon] section of the
MiraMon.par configuration file.
- /CAPCALERA=1 If the user wishes to export the extents
(envelope and pixel side) of the input file to a header in the output
file.
- /CAPCALERA=2 If the user wishes to export all the information
in the documentation file of the input raster to a header in the output
file.
- /CAPCALERA=3 It allows you to export IMG rasters to ASCII
format, suitable for ArcView, ArcCatalog y ArcMap.