I have a *.txt file which is a matrix, and I add the heading info.

The tool called ASCII To Raster was used but the generated raster is not in *.tiff.

How to solve this problem?

closed as unclear what you're asking by PolyGeo Jan 13 '15 at 6:49

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


There are many files called ASCII or GRID, it can be very confusing to work out which is which. A good text editor like Notepad++ or TextPad is invaluable in determining what you actually have.

An Esri ASCII Grid will look like this:

ncols        1000
nrows        1000
xllcorner    489000.000000000000
yllcorner    6679000.000000000000
cellsize     1.000000000000
NODATA_value  -9999
117.62999725341797 117.62000274658203 117.61000061035156 117.65000152587891 117.61000061035156 ......

Another common format is Gridded XYZ, which reads like this:

489000.5 6679999.5 117.62999725341797
489001.5 6679999.5 117.62000274658203
489002.5 6679999.5 117.61000061035156
489003.5 6679999.5 117.65000152587891
489004.5 6679999.5 117.61000061035156
489005.5 6679999.5 117.62714385986328
489006.5 6679999.5 117.61000061035156
489007.5 6679999.5 117.61000061035156
489008.5 6679999.5 117.66999816894531
489009.5 6679999.5 117.62000274658203
489010.5 6679999.5 117.62000274658203
489011.5 6679999.5 117.62999725341797
489012.5 6679999.5 117.62999725341797
489013.5 6679999.5 117.62000274658203
489014.5 6679999.5 117.62000274658203
489015.5 6679999.5 117.62000274658203
489016.5 6679999.5 117.61000061035156

It is a wasteful format (many times the size of a Tiff) and is commonly used by CAD software. If you change the file extension to .asc ArcGis will read it (albeit slowly) without the header line, if you want to use it this way then remove the header line.

GDAL_Translate will read either format (use correct extension .asc for Esri ASCII GRID, .xyz for Gridded XYZ); if you're not comfortable with command line then QGIS has a GUI that does the same thing.

If you can convince ArcGis to read the files then you can use CopyRaster to convert to tiff; the converted file will read much faster.

Not the answer you're looking for? Browse other questions tagged or ask your own question.