I have around twenty 2 GB DEMs (xyz) in .asc format.

The header has 13 lines of metadata, and then the basic data in three columns

# The DTM grid had lower left (southwest) corner coords:
#     X or easting  = xxxxxxx.xx meters
#     Y or northing = xxxxxxxx.xx meters
# and grid intervals:
#     X (east)  grid interval = 2.0000  meters
#     Y (north) grid interval = 2.0000  meters
# For a total of 10001 x 2506 = 25062506 points.
# CE/LE = -9999.0000 /-9999.0000 
# There may be less points in this file because those
# grid points that were outside of the polygon that
# defined the DTM boundary are not included in this file.

100000.0000 1000000.0000 500.0000 
100002.0000 1000000.0000 500.0000 
100004.0000 1000000.0000 500.0000 
100006.0000 1000000.0000 500.0000 
100008.0000 1000000.0000 500.0000 
...and so on

I tried to open this file as grid in SAGA GIS and in ArcGIS, but with little success. Eventually I circled around this by converting the files to .txt then with lasTools to .las and furthermore to .tif, when I'm finally able to view the DEM. However, this seems a little bit too complicated. Are there any fast workarounds for correctly reading the file in to SAGA or ArcMap OR is there a fast way to manually edit the headers, e.g. to the format ESRI requires? My file size prevents me from editing them manually in notepad/wordpad or in other basic programs.

  • Is the "Gt" meant to be GB (GigaBytes)? Feb 11, 2015 at 15:17
  • 1
    I'd suggest text editing; Apparently there are text editors for larger files: stackoverflow.com/questions/102829/… Feb 11, 2015 at 15:20
  • Note: Gb is gigabits. GB is Gigabytes. A byte contains 8 bits. So 2Gb is actually just ~250MB. Case is important. :-) Feb 12, 2015 at 9:19

1 Answer 1


This file should not have the extension *.asc as this would be very miss-leading. The *.asc extension is used for the simple (and very slow) ASCII grid format. The file contents you show above are what is typically referred to as an XYZ grid. It is a very verbose way of expressing a grid but can therefore also be read as a simple point cloud. As all of the points are on a grid their x and y coordinates are to a certain degree implicit. I suggest batch renaming such files to either *.xyz or *.txt which can be done from the Windows command line with ...

rename *.asc *.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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