0

I am using ArcGIS 10.5 and have a shapefile containing contour lines. I would like to get the height values at equidistant positions. In other words, I would like to interpolate and sample the contour lines. The result should be a table containing height values for the range of x-y values of the shapefile, depending on the sampling distance.

The goal is to export the data as a simple CSV file to use it in programs such as MATLAB or Python.

Unfortunately, I am stuck finding the correct tool or process in ArcGIS for this.

In the ArcToolbox I found Conversion Tools -> To Raster, but this seems to raster the contour lines themself.

Also, I found the help describing how to export a complete XY coordinate values to a text file from ArcMap, but here the XY coordinates are not equidistant and I am unable to export to TXT as the menu only allows exporting to a file with an extension of .dbf.

2

Assuming you have access to the Spatial Analyst Extension, you could try the following:

In the Spatial Analyst Toolbar, choose Interpolation and Topo To Raster. Choose the contours and the height fields as the inputs. You can also define the cell size, try the spacing that you want your X and Y coordinate table.

Once you have the raster, use the Conversion Toolbox and select to "From Raster" and then "Raster to Point", using the interpolated raster as the input.

The output is a point file containing points at the cell size interval of the raster and the cell value at that point. In this point file add two new fields, X and Y. Use the Calculate Geometry Tool (right click the field name) and calculate the X and Y (Long or Lat) of the point.

You can then export this out as a text file to use where ever you need it.

If the "equal spaced points" arent meant to be the cell size, rather a series of "sample locations". You can use the "Fishnet" tool to create the point file at the spacing you want. Create the raster as per the first step using an appropriate cell size. Create the fishnet at the interval you want.

In Spatial Analyst choose the "Extraction" tool and then "Extract Multi-Values to Points" using the Raster and Fishnet Point file as the inputs. Then create the X and Y fields again in the Fishnet derived point file to export to a CSV or text file.

  • Topo to Raster worked fine for now. Thank you for your response, it helped me a great deal! – Elnora Martin Oct 4 '18 at 12:27

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.