Export to ASCII - MapInfo_Pro_Advanced - 2023

MapInfo Pro Advanced Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
Language
English
Product name
MapInfo Pro Advanced
Title
MapInfo Pro Advanced Help
First publish date
2016
Last updated
2023-09-20
Published on
2023-09-20T15:00:50.875000

The Export to ASCII tool enables you to export an input raster into a delimited ASCII file so that it can be used for analysis with other software applications. The tool exports X, Y coordinates and the Z values for each cell to an ASCII text file. In addition, MapInfo Pro Advanced also writes its own standard header in the output ASCII file.

The following parameters can be set in the Export to ASCII dialog box:

  • Null Cell Value - Value to be written for null cells in the output text file.
  • Write XY Coordinates - Specifies whether the XY coordinates will be written in the output text file or not. When checked the output file will have XYZ values else only Z values.
  • Export Origin - Specifies the location of the first cell written to the file. The grid will be written sequentially from this point.
  • Cell Origin At - Specifies whether the XY coordinates refer to the cell center or lower-left corner of the cell.
  • Delimiter - Specifies how the values will be separated in the output ASCII file, for example, tab, space, semi colon, comma, or user-defined value.
  • Precision - Specifies the number of digits after decimal point that will be written in the output text file.

Instead of exporting the entire raster, you can also export a portion of the raster dataset.

  • More Options - If required, click More Options to open the Clip Extent options to specify the data extent that you wan to export.
    • Full Data Extent - This option denotes the complete extent of the input raster file. If you want to export the entire grid, select this option.
    • User Rectangle - Enter the rectangular bounds to define the area to export.
    • Map Extent - Use map extent from the input raster file to define the region to be exported.

Multi-Field and Band Support

For a multi-field and multi-band raster, you will see the field and band information for which the output file is generated, as shown below (in red):



For more details, see header information.

The format for the field and band information is defined as:

Field=Field_Number,Field_Name,Field_Type,No_Of_Bands,Band_01_Name,Band_01_DataType, Band_02_Name,Band_02_DataType,......,Band_N_Name,Band_N_DataType

For the example above, you can see that:

  • Field_Number is zero because a single field is selected. If more than one field is selected, the output file will show Field_Number as 1,2, etc.
  • Field_Name is the name of the field selected when generating the text file. In the input raster, the field selected is Field1.
  • Field_Type represents the type of the selected field in the input raster. The field types are below:
    1. Classified = 0
    2. Image = 1
    3. ImagePalette = 2
    4. Continuous = 3
  • No_Of_Bands is three since there are three bands in the selected field.
  • Band_01_Name is the name of the first band in the selected field. In the above example, the band selected is Band11.
  • Band_01_DataType is the data type of the band selected. In the example, 52 represents a floating point value of band data.

Similarly, for Band_02_Name and Band_02_DataType, and so on, you will see corresponding values if multiple bands are selected.

Also, if multiple fields are selected, you will see additional lines (depending on the number of selected fields) representing the field and band information.

The following table lists all data types for band values:

Value Data Type
0 Undefined data type.
1 Null data type.
2 Empty data type.
10 8-bit boolean data type.
11 32-bit boolean data type.
20 1-bit data type.
21 2-bit crumb data type.
22 4-bit nibble data type.
30 8-bit unsigned integer data type.
31 16-bit unsigned integer data type.
32 32-bit unsigned integer data type.
33 64-bit unsigned integer data type.
40 8-bit signed integer data type.
41 16-bit signed integer data type.
42 32-bit signed integer data type.
43 64-bit signed integer data type.
50 2-byte floating point data type.
51 4-byte floating point data type.
52 8-byte floating point data type.
53 8-byte long floating point data type.
60 16-bit signed integer complex data type.
61 32-bit signed integer complex data type.
62 4-byte real complex data type.
63 8-byte real complex data type.
70 Windows DATE, 8 byte real data type.
71 Standard time_t, 64-bit integer data type.
80 ASCII variable length data type.
81 ASCII fixed length data type.
82 Unicode variable length data type (std::string).
83 Unicode variable length data type (std::wstring).
84 Unicode variable length data type (std::u32string).
90 Variable length binary object data type.
91 Fixed length binary object data type.
100 8-bit red color data type.
101 8-bit green color data type.
102 8-bit blue color data type.
103 8-bit gray color data type.
104 8-bit alpha (color opacity) data type. 0 = transparent, 1 = opaque.
105 8-bit red and 8-bit alpha data type.
106 8-bit green and 8-bit alpha data type.
107 8-bit blue and 8-bit alpha data type.
108 8-bit gray and 8-bit alpha data type.
109 8-bit red, 8-bit green, and 8-bit blue color data type.
110 8-bit red, 8-bit green, 8-bit blue, and 8-bit alpha color data type.
111 8-bit blue, 8-bit green, and 8-bit red color data type.
112 8-bit blue, 8-bit green, 8-bit red, and 8-bit alpha color data type.