# How to Clip a DEM and retain DEM format?

I have a DEM file that I downloaded from the internet. I am trying to clip it to reduce the file size. So far I have tried two different methods, but neither of them produces a clipped file in DEM format (which I need to pass on to an AutoCAD user in DEM format).

1. I have tried the Clip Tool under Data Management -> Raster -> Raster Processing. I used another image file for my Output Extent. The problem is that if I use DEM as the extension under "Output Raster Dataset" it will not run the tool. I am able to run this tool if I choose TIF, but I need it as a DEM.

2. I have also tried right-clicking the DEM and choosing Data -> Export Data. I drew a graphic rectangle that I wanted to clip to, and used Selected Graphics (Clipping) for my extent. With this method, DEM is not an option in the Format drop down menu. I can use this method to export to a TIF, but again I am looking for a DEM.

My question is similar to this one, but the answers here don't address how to keep the DEM format:
Clipping raster using vector polygon in ArcGIS Desktop without having Spatial Analyst?

Is DEM a proprietary format (like SID) that I can't export without a special license or program? Or am I missing something else?

• DEM is simply a "Digital Elevation Model" in floating point format. Commonly these are in .tif format. A DEM can be a grid, .tif, .img etc. What is stopping you from writing the clipped results to 32bit floating point .tif format? – Aaron Oct 10 '14 at 18:57
• @Aaron I'm not sure what you mean by "writing the clipped results to 32bit floating point format." How would I do that? – Sara Barnes Oct 10 '14 at 19:00
• When you clip the input DEM to your area of interest, the default output will likely be 32-bit floating point format. In other words, if you export to a .tif, it is still a DEM just in .tif format – Aaron Oct 10 '14 at 19:03
• Ok, that makes sense. Essentially that's what ended up working - I exported to a TIF and the AutoCAD user was able to bring it in in a similar way as he did the original DEM. I was partially curious if it was possible to export to DEM and the answers below answered that for me. Thanks. – Sara Barnes Oct 10 '14 at 19:05

It is an open format See Link but not one typically used as an Output. I believe GRID is a far more commonly used format for DEM data but that may just be a personal preference. I did find a reference for converting "TO" that format but it is an old solution (written in Avenue ... the old language used with ArcView 3.X).

A link I found indicated that it may be possible to do this using GDAL (go figure). http://www.gdal.org/frmt_usgsdem.html If you really need to do it this way, that may be your best bet.

• I'm not familiar with GDAL so it sounds like I have some reading to do. It sounds like the AutoCAD user was able to bring in a GeoTIFF, so the problem is solved in the short term, but I was still curious if this was possible. Sounds like the answer is - maybe possible, but not commonly done. – Sara Barnes Oct 10 '14 at 18:59

The USGS DEM format is a default GDAL input and output format. See this link for more information.

This means you can "clip" is using the -a_ullr command in gdal_translate or use gdal_warp using the -cl and -crop commands.

Here is some code to get you moving

gdalwarp -of DEM -cutline C:\temp\area_of_interest.shp -crop_to_cutline C:\temp\input.dem C:\temp\output.dem


This will allow you to clip to a vector polygon (shp) without using Spatial Analyst.

• Thanks for the link about GDAL. I'd like to get more familiar with it, since I'd never heard of it until these answers. I do not have Spatial Analyst, so thanks for including that work around. – Sara Barnes Oct 10 '14 at 18:59
• I think Spatial Analyst is the workaround.... – If you do not know- just GIS Oct 10 '14 at 19:11
• Ok thanks. I don't have much experience with code or GDAL so the snippet you provided should get me in the right direction. – Sara Barnes Oct 10 '14 at 19:16
• It should be easy enough. if you are using windows install this version of gdal through OSGEO4W trac.osgeo.org/osgeo4w – If you do not know- just GIS Oct 10 '14 at 19:17