3

I need to extract a DEM of a waterbody from a netCDF file so I can ultimately convert the DEM into xyz format. I'm not sure how to go about doing this, and so far, I have tried to create raster layers of the DEM in ArcGIS Desktop (ArcMap). However, I'm not sure if this is the best approach to obtain the data in xyz format.

How could I go about handling this conversion?

2 Answers 2

3

You can use GDAL to transform driectly from NetCDF to ASCII XYZ with the gdal_translate command. Start with gdalinfo to get the name of the band to extract (it will look something like NETCDF:"filename.nc":dem_bnds) to pass as the dataset, for example:

gdal_translate -of XYZ NETCDF:"filename.nc":dem_bnds dem.xyz
0
0

I'm doing the same thing, converting the GEBCO 2019.nc to an xyz for further processing. I'm using gdal via qgis tools, gdal2xyz. The interface is a little more intuitive vice command line. The conversion (elevation layer for z conversion) is Band 1. (default on my instance). The resulting .csv can be processed in any number of downstream tools

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.