Can anyone help me convert .xyz file to a contours? I have recieved some .xyz files from the local council and am hoping to turn them into a terrain for 3d modelling. I have tried the ASCII to feature class but the points do not appear on my map (geolocated and all).

I have emailed the council and am waiting to hear back whether or not they have .dem files but would rather work out how to do it myself.

I have attached the .xyz file so someone may be able see if the data is in the correct format for importing.


  • That's not quite a gridded XYZ file, there are ways to bring it in but I need to know if you have Esri extensions. Feb 25 '15 at 22:35
  • Yes I have all extensions Feb 25 '15 at 22:40
  • That appears to be a simple csv text list of coordinates and elevations. If you know the coordinate system, you just have to set your dataframe to that and create an xy event layer. You'll get points with an elevation value (that need to be exported to be made permanent), and from there you can interpolate contours. There may be a couple of gotchas if you want 3D contours vs just 2D.
    – Chris W
    Feb 25 '15 at 23:10

Simple method:

Rename the file(s) to csv or asc to see the tables (you may need to edit each one and add a header line), create a feature class from XY table (or make XY event layer) then perform a Point to Raster (your cellsize is 15 metres), this will give you a DEM. With the DEM run GDAL_Contour or Esri contour:

gdal_contour -i 10 D:\some_path\XYBQ30_04_01_2000_PointToRas1.img D:\some_path\XYBQ30_04_01_2000_Contour.shp

Better method (with extensions):

From the points created from the XY table create a Terrain and do your contours in Esri using Surface Contour (3d Analyst).

You can smooth out contours by resampling your data from 15m to say 5m using a bilinear method.

If you have a few to do you might be best to set your Snap Raster and Cell Size environments, this will ensure the cells line up. It is best to mosaic tiles together then clip out slightly more than you need as contours will end halfway through the last cell.

This is what I got from the tile: enter image description here

  • I have managed to extract 15m and 5m contours, thanks a lot for your help, youve saved me a lot of time! One more question - I tried to produced 1m contours through the same method (resampling then converting to contours) how ever these are very undefined. Is 5m the most accurate I can get or is there a trick to increasing definition of data? Feb 25 '15 at 23:31
  • You can resample the data to 2.5 metre cell and you should be able to get 1m contours; I regularly create .25 contours from 1m cell (LiDAR data). Be sure to use Bilinear as the method. If this doesn't work you might have to create a terrain to get finer contours. Feb 25 '15 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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