Jump to content

 
Photo

XYZ .txt File to DEM

- - - - -

  • Please log in to reply
4 replies to this topic

#1
SMD84

SMD84

    Newbie

  • New Member
  • Pip
  • 3 posts
  • Ireland

Hi,

I have recently acquired a large .txt file containing xyz data which I would like to use to create a DEM. Can anyone offer me advice on how to go about doing this? I have access to the following software

ArcEditor
MapInfo Professional
Erdas Imagine
Global Mapper
Surfer

Thanks,

Sean.

#2
Hans van der Maarel

Hans van der Maarel

    CartoTalk Editor-in-Chief

  • Admin
  • PipPipPipPipPipPipPip
  • 3,835 posts
  • Gender:Male
  • Location:The Netherlands
  • Interests:Cartography, GIS, history, popular science, music.
  • Netherlands

I have recently acquired a large .txt file containing xyz data which I would like to use to create a DEM. Can anyone offer me advice on how to go about doing this? I have access to the following software

ArcEditor
MapInfo Professional
Erdas Imagine
Global Mapper
Surfer


In Global Mapper:
- File -> Open Generic ASCII text file, set import type to elevation grid, the rest of the specific settings you have to make in the import options depend on the structure of your XYZ file)
- Set projection
- Once the data is imported you can export a DEM via File -> Export Elevation Grid Format

Hope this helps.
Hans van der Maarel - Cartotalk Editor
Red Geographics
Email: hans@redgeographics.com / Twitter: @redgeographics

#3
Charles Syrett

Charles Syrett

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 536 posts
  • Canada

Presumably you're asking for this because your points are irregularly spaced. Different applications offer different ways of creating a grid of regularly spaced points, which is basically all a DEM is. How each application interpolates elevations for the points depends on what algorithm it uses.

Global Mapper uses a TIN (triangulated irregular network) approach, as do many others. Manifold offers DEST, a specialized TIN that works very nicely when importing contour points.

Surfer offers a wide range of interpolation methods, as well as precise controls, and the differences can be surprising. However, it just generates its own grid format (.grd), and it doesn't export to a variety of other grid formats the way Global does. But if you have both Global and Surfer, Global can open the .grd file and then export to DEM.

If you want to try Surfer's interpolators, here's what you do:

- in Surfer, File>New Plot; Grid>Data>all types, open xyz file
- check data columns to ensure Z data is in correct column
- choose gridding method (Kriging, or whatever)
- set Grid Line Geometry so it matches original, or to suit (for resolution)
- this will create a Surfer .grd file
- to preview, Map>New Contour Map (or Shaded Relief Map); select grid file
- to create DEM, open .grd in Global Mapper and then export

You can try this using different interpolators and then choose the one that works best for you.

Charles Syrett
Map Graphics
http://www.mapgraphics.com

#4
kay

kay

    Key Contributor

  • Validated Member
  • PipPipPip
  • 65 posts
  • Canada

Is the txt file like a point dataset? or the txt file has a value for every cell as a raster dataset?

If that is a txt file like a point dataset, you might want to run some spatial interpolation using a GIS software. For example, if you have ArcGIS...

1) import/open the txt file as a point data: Tools > Add XY Data
Now the txt file is shown with points.

2) Use Spatial Analyst tool to create a raster image from the XYZ data:
Spatial Analyst > Interpolate to Raster > then select one of the methods to perform spatial interpolation (Inverse Distance Weighted | Spline | Kriging)

3) now you have a DEM image.

I hope this helps.

- kay

#5
SMD84

SMD84

    Newbie

  • New Member
  • Pip
  • 3 posts
  • Ireland

Hi Guys,

Problem solved. Thanks to all who replied to my query. You were a big help.

Sean.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->