Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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. However, I'm not sure if this is the best approach to obtain the data in xyz format. If anyone could provide some ideas about how I would go about handling this conversion I would appreciate it.

Thanks, Michael

share|improve this question
add comment

1 Answer

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
share|improve this answer
    
Thanks for the help. GDAL proved to be a great tool. –  Michael U Oct 2 '12 at 5:36
    
I have downloaded gebco bathymetry data. but when I ran the command in GDAL its returning an error. ":dem_bnds is a netCDF file, but dem_bnds is not a variable" –  Devils Dream Feb 10 '13 at 9:42
    
@DevilsDream What was the output from gdalinfo? If you can, could you please post it online somewhere, for example pastebin? –  om_henners Feb 10 '13 at 22:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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