Contours to DEM Converter: Turn Contour Lines Into an Elevation Grid

Convert contours to DEM online: turn contour lines into a digital elevation model (DEM) in your browser. Upload a GeoJSON, KML, KMZ, zipped Shapefile or DXF file, check the settings and press Generate DEM: this free contours to DEM app builds the grid by TIN or IDW and shows it over a map, with layers you can turn on and off. You get the lowest and highest point, the relief, the mean slope, a height chart, GeoTIFF, ASCII grid and 16-bit PNG heightmap downloads and a PDF report. Your file is never uploaded.

Map:
GeoJSON, KML, KMZ, a zipped Shapefile (.zip) or DXF. The file stays in your browser.
or drop it hereUpload a contour file
Try a sample:
Upload a contour file or try a sample. Then check the settings and press Generate DEM.
Need assistance with your GIS project?Explore Our Services
GeoJSON, KML, Shapefile and DXF
Reads lines with their height from an attribute or from Z, in metres or feet. Shapefiles are moved to latitude and longitude with their .prj.
TIN or IDW, Your Cell Size
Delaunay triangles or distance weighting, an automatic or own cell size, and a hillshade preview with your lines on top.
GeoTIFF, ASCII Grid, PNG and PDF
A georeferenced 32-bit GeoTIFF, a plain ASCII grid, a 16-bit heightmap for 3D tools, and a PDF on the maplity.com letterhead.
Rate this tool:

Contours to DEM Converter: From Lines to a Surface

What a DEM Is

A digital elevation model (DEM) is a grid of heights. The land is cut into square cells, and each cell holds one height above sea level. Contour lines show the same land as lines of equal height, which is easy for people to read. A DEM is easier for computers: GIS programs need it to draw hillshade, measure slope and aspect, trace where water flows, check what can be seen from a point and build 3D views.

What This Contours to DEM Tool Does

This contours to digital elevation model online tool needs one thing from you: a file of contour lines, each with its height. It reads the lines, puts points along them, joins all points into triangles (TIN) or weighs the nearest points (IDW), and works out a height for every cell of a regular grid. It then shades the grid, works out the figures and makes the downloads. Nothing is built until you press Generate DEM; a “Creating DEM” wheel then shows for about 10 seconds while the grid is made in a background worker, and the DEM appears on the map.

Free and Private: Your File Stays in Your Browser

Contours to DEM is free here: there is no account, email or payment, and no upload. If you looked for a contours to digital elevation model online free download, there is nothing to install either, because the tool runs in your browser. The file is opened in your browser, the DEM is built there, and the GeoTIFF, ASCII grid, PNG and PDF are made on your own device. This matters for survey and client data that should not leave your computer.

How to Use the Contours to DEM Converter

Uploading a File or Trying a Sample

Press Choose file or drop a file on the dashed box. The tool reads GeoJSON, KML, KMZ, zipped Shapefiles and DXF (see the table of formats below). To try it first, press one of the Stone Mountain samples: 44 contour lines at 10 m around Stone Mountain in Georgia, made with our Contour Map Generator, once as GeoJSON in latitude and longitude and once as DXF in local metres.

The Height Field and the Units

Each contour line needs a height. The tool looks for it in the attributes (names such as elevation, elev, height, contour, level, z or value come first), in the Z value of the vertices and, for DXF, in the elevation of each polyline or a number in its layer name. Only sources with at least two different values are offered. Choose the right one under Height from, and set Heights in the file to metres or feet. For DXF, also set the map units of the drawing. The m and ft buttons at the top choose the units of the results and the downloads.

Method and Cell Size

TIN (triangles) is the default and fits contour data best: every cell takes its height from the triangle of line points around it. IDW (distance weighted) takes the weighted mean of the 12 nearest points. The cell size is set to about 500 cells across the data and rounded to a common value; type your own to change it, or press Auto to go back. The grid is kept under 4 million cells for TIN and 1.5 million for IDW, so a phone can handle it. When the settings are ready, press Generate DEM. If you change a setting afterwards, the DEM on screen stays until you press Generate DEM again, and a note reminds you that it was made with the old settings.

Reading the Preview, the Figures and the Chart

The DEM appears over the map, coloured from green (low) to brown (high) and shaded as if lit from the north-west, with your contour lines on top. The Layers box in the top-right corner of the map turns the basemap, the DEM colours, the hillshade and the contour lines on or off, so you can see the shading alone, the colours alone, or compare the grid with your lines. The yellow box gives the size of the grid and the height range; the cards give the lowest and highest point, the relief, the mean elevation, the grid, the area covered, the mean slope and the share of flat triangles (for IDW, the number of points used). The chart shows how much of the area lies at each height, and the Grid details table lists what a GIS user needs: cell size, extent, coordinate system and the no-data value (-9999).

Downloads and the PDF Report

The GeoTIFF button gives a contours to DEM GeoTIFF download: one band of 32-bit floating point heights with its position, ready for QGIS, ArcGIS, Global Mapper and GDAL. ASCII Grid saves the same grid as plain text (Esri .asc), which almost any GIS and many CAD and modelling programs open. PNG heightmap saves a 16-bit grayscale image where black is the lowest point and white the highest; the height range is in the file name. Download PDF report saves a report with the maplity.com letterhead, the figures, the height chart, the DEM image with the lines and the method.

How to Convert Contours to a DEM: Step by Step

1Upload your contour file, or try a sample

Press Choose file or drop a file on the box: GeoJSON, KML, KMZ, a zipped Shapefile (.zip with the .shp, .dbf and .prj) or DXF. The file is read in your browser and never uploaded. To see how it works first, press one of the Stone Mountain samples: the same contour lines as GeoJSON (latitude and longitude) and as DXF (local metres).

Upload your contour file, or try a sample
2Check the height field and the units

The tool finds the height of each line on its own: an attribute such as "elevation", "height" or "contour", or the Z value of the vertices. If the file has several numeric fields, pick the right one under Height from. Set whether the heights are in metres or feet, and for a DXF file whether the drawing units are metres or feet.

Check the height field and the units
3Choose the method and the cell size, then press Generate DEM

TIN joins the points on the lines into triangles and is the best choice for most contour data. IDW averages the nearest points and gives a softer surface. The cell size is set automatically to about 500 cells across the data; type a smaller value for more detail or a larger one for a lighter file. Then press Generate DEM: a Creating DEM wheel shows for about 10 seconds while the grid is made.

Choose the method and the cell size, then press Generate DEM
4Look at the DEM over the map

The DEM appears over the map in colour by height with hillshade, with your contour lines on top. Use the Layers box in the corner of the map to turn the basemap, the DEM colours, the hillshade and the contour lines on or off, and change the map style at the top. DXF and other files without a position on the Earth are shown on a plain grid instead of a world map.

Look at the DEM over the map
5Read the figures and the height chart

The yellow box gives the grid size, the cell size and the height range. The cards show the lowest and highest point, the relief, the mean elevation, the grid, the area covered, the mean slope and the share of flat triangles. The chart shows how much of the area lies at each height, and the table lists the grid details for GIS work.

Read the figures and the height chart
6Download the DEM or the PDF report

GeoTIFF saves the DEM as 32-bit floats with its position, for QGIS, ArcGIS and Global Mapper. ASCII Grid is a plain text grid that almost any GIS and many CAD programs read. PNG heightmap is a 16-bit grayscale image for Unity, Unreal and Blender. Download PDF report saves a report with the maplity.com letterhead, the figures, the chart and the DEM image.

Download the DEM or the PDF report

How Contour Lines Become a DEM

TIN: Triangles Between the Lines

A TIN (triangulated irregular network) joins all points on the lines into triangles. The tool uses a Delaunay triangulation, which makes the triangles as even as possible: no point lies inside the circle through the three corners of any triangle. Inside each triangle the ground is a flat, sloping plane through its three corners, so a cell between a 100 m line and a 110 m line gets a height that changes evenly between them. Before triangulating, the tool adds points along long straight parts of the lines, about one cell apart, so the triangles follow the lines and do not cut across them.

IDW: Weighing the Nearest Points

IDW (inverse distance weighting) gives each cell the weighted mean of the 12 nearest points on the lines, with a weight of one over the distance squared. Near points count much more than far ones. The surface is smooth and has no triangle edges, but because all points on one line have the same height, IDW tends to make small steps along each line and rounded, bulging shapes between them.

TIN or IDW: Which to Choose

For the best contours to digital elevation model online result from contour lines, keep TIN: in the round trip of 200 places further down, TIN was closer to the true ground in 200 of them. The table compares the two on the same data.

TIN and IDW compared on the contours of 200 places (1 km² each, contours at the Auto interval)
WhatTINIDW
Typical error (median RMSE, share of the contour interval)18%29%
Ground within half an interval of the truth (mean)95.4%90.6%
Places where it was the closer of the two2000
Shape of the surfaceFlat triangles, straight edgesSmooth, small steps along lines
Hilltops and valley floorsFlat inside the last lineSlightly rounded
Speed on large gridsFastSlower (grid limit 1.5 million cells)

Choosing a Cell Size

The cell size sets how fine the grid is. A common rule for DEMs made from maps is a cell of about 0.5 mm at the map’s scale: finer cells do not add real detail, because the contours hold no information between the lines. The table gives this rule for common scales, with the contour interval such maps usually have.

Suggested cell size by map scale (0.5 mm on the map), with the usual contour interval
Map scaleUsual contour intervalSuggested cell sizeTypical use
1:1,0000.5 m0.50 mBuilding plot, garden
1:2,5001 m1.25 mSite plan, small farm
1:5,0002 m2.50 mVillage, park, golf course
1:10,0005 m5 mTown, valley, large estate
1:25,00010 m12.50 mHiking map, district
1:50,00020 m25 mNational topographic map
1:100,00050 m50 mRegion, overview map

Halving the cell size makes the grid four times bigger. If your lines are far apart, a large cell gives the same surface in a much lighter file; if they are close together, as in a detailed site survey, a small cell keeps the shape of each line.

Known Artifacts and How to Spot Them

Flat triangles appear where all three corners of a triangle are on the same line: inside the last line around a hilltop, on valley floors and on wide terraces. The tool counts them and shows their share of the area. Straight edges run along triangle sides where the lines are far apart. Steps along the lines are typical of IDW. Near the outside of the data, triangles get long and thin, and cells beyond the outermost points are left empty. A spike or pit that stands out in the hillshade usually means one line has a wrong height.

Supported Files and What Is Read From Them

The file types the converter reads, the lines it takes and where the heights come from
FormatLines readHeight fromCoordinates
GeoJSON (.geojson, .json)LineString, MultiLineString, Polygon and MultiPolygon outlinesA numeric property, or the third coordinate (Z)Latitude and longitude; projected numbers are kept as local units
KML (.kml)LineString and polygon outlines in any folderAltitude of the coordinates, or a number in ExtendedDataLatitude and longitude
KMZ (.kmz)The KML inside the zipAs KMLLatitude and longitude
Shapefile (.zip)Polyline and polygon shapesA numeric field in the .dbf, or Z for PolylineZMoved to latitude and longitude with the .prj; kept as local units without it
DXF (.dxf)LWPOLYLINE, POLYLINE (2D and 3D) and LINEElevation or Z, or a number in the layer nameThe drawing’s own units (no position on the Earth)

Points, text, splines, arcs and blocks are skipped. Up to 400 thousand points are used for the triangles; denser files are thinned evenly. Lines without a value in the chosen height field are left out, and the DEM needs at least two different heights.

10 Use Cases of a Contours to DEM Converter

Turning lines into a grid opens contour data to every raster tool. These are the most common uses.

1. Digitised paper maps

Many places only have contours from old topographic maps or survey plans. Once the lines are digitised with their heights, this tool turns them into a DEM that modern GIS tools can use for slope, hillshade and 3D views.

2. From CAD survey drawings to GIS

Surveyors and engineers often deliver contours in DXF. Converting them to a GeoTIFF or ASCII grid lets planners, landscape architects and GIS teams use the same ground model without CAD software.

3. Site design and earthworks

A DEM of a plot is the starting point for volume work: compare it with a design surface to estimate cut and fill, check drainage falls, and plan platforms, roads and retaining walls.

4. Flood and drainage studies

Flow direction, flow accumulation and flood extent models need a grid, not lines. A DEM made from local contours often has more detail than global elevation data in small, flat areas.

5. Hillshade and relief maps

A hillshade made from the DEM makes the shape of the land easy to see under a map. Designers and cartographers use it for posters, guide maps and reports.

6. 3D models and printing

The contours to DEM PNG heightmap (16-bit) goes straight into Blender, Unity or Unreal as a displacement map or terrain, and the GeoTIFF into tools that make 3D prints of the land.

7. Game levels and simulations

Game designers and simulation teams build real terrain from contours of a real place, then export the heightmap at the size their engine needs.

8. Solar and wind site checks

Slope and aspect from the DEM show which parts of a site face the sun and how much grading the panel rows need, and where turbines would sit on exposed ground.

9. Teaching GIS and geography

Students see how a few lines become a full surface, compare TIN and IDW, and learn why the result has flat tops and straight edges. The sample files make a ready classroom example.

10. Checking contour data

Building a DEM is a quick quality check: spikes, holes and stepped surfaces show lines with a wrong height, a missing height or a duplicate line.

The 10 Most Useful Things to Check on a DEM From Contours

These quick checks catch most problems before the DEM goes into a project.

  1. Make sure the right field is the height. If the preview looks like random stripes, a field such as an ID or a length was used. Choose the field with the contour heights under Height from.
  2. Check metres or feet. A DEM in feet read as metres is three times too steep. Compare the highest point with what you know of the place.
  3. Look at the share of flat triangles. A few percent is normal at hilltops and valley floors; a large share means the contour interval is wide for the shape of the land.
  4. Compare TIN and IDW. Switch the method, press Generate DEM again and compare: where they differ, the data between the lines is thin and the DEM is least certain.
  5. Pick a sensible cell size. Start with Auto, then use a smaller cell only if the lines are close together. Halving the cell makes the file four times bigger.
  6. Find lines with a wrong height. A sharp spike or pit in the hillshade often marks one line with a typing error in its height.
  7. See where the data ends. Cells outside the area of the lines are empty (no data). Make sure the area you need lies inside it.
  8. Check the position on the map. For GeoJSON, KML and Shapefiles the DEM should sit on the right place over the basemap. If it does not, the .prj may be missing.
  9. Read the slope figure. The mean slope helps to check the result against the ground: flat towns are a few percent, hilly ground 10 to 30%, mountains more.
  10. Keep a record. The PDF holds the figures, the height chart and the DEM image with the lines, which is useful for reports and project files.

The Mathematics Behind the Conversion

1. From Latitude and Longitude to a Flat Plane

Distances must be in metres, so lines in latitude and longitude are first moved to a flat plane around the centre of the data (φ0, λ0):

x = R × cos φ0 × (λ - λ0) × π / 180    y = R × (φ - φ0) × π / 180    R = 6,371,009 m

Over a few tens of kilometres this is accurate to well under 0.1%. DXF and other local files are used in their own units.

2. Delaunay Triangles and Barycentric Weights

The Delaunay triangulation joins the points so that no point lies inside the circumcircle of any triangle. For a cell centre P in the triangle with corners A, B and C, the barycentric weights say how close P is to each corner, and the height is their weighted sum:

d = (yB - yC)(xA - xC) + (xC - xB)(yA - yC)
wA = ((yB - yC)(xP - xC) + (xC - xB)(yP - yC)) / d    wB = ((yC - yA)(xP - xC) + (xA - xC)(yP - yC)) / d    wC = 1 - wA - wB
z(P) = wA × zA + wB × zB + wC × zC    (P is inside when all weights are 0 or more)

3. Inverse Distance Weighting

IDW uses the 12 nearest points, found with a grid of buckets so not every point has to be tested:

z(P) = Σ wi × zi / Σ wi    wi = 1 / di^2    (di = distance from P to point i; if di = 0, z(P) = zi)

4. Hillshade and Slope

The preview uses Horn’s method on each 3 × 3 block of cells (a b c / d e f / g h i), with the sun at 315° and 45° above the horizon:

dz/dx = ((c + 2f + i) - (a + 2d + g)) / (8 × cell)    dz/dy = ((g + 2h + i) - (a + 2b + c)) / (8 × cell)
slope = atan(√(dz/dx² + dz/dy²))    aspect = atan2(dz/dy, -dz/dx)
shade = 255 × (cos(zenith) × cos(slope) + sin(zenith) × sin(slope) × cos(azimuth - aspect))

The mean slope in the cards uses central differences on the grid, in percent, averaged over all covered cells.

5. Placing the Grid on the Earth

The GeoTIFF stores the top-left corner and the cell size. For latitude and longitude input the cells are square on the ground, so in degrees they are wider than tall:

cell width (°) = cell / (R × cos φ0) × 180 / π    cell height (°) = cell / R × 180 / π

The ASCII grid writes the same corner with GDAL’s dx and dy lines when the cells are not square in degrees.

File Formats, Libraries and Limits

The Downloads in Detail

The GeoTIFF is a single-band, uncompressed TIFF of 32-bit floats with the GeoTIFF tags for the pixel size, the tie point and the coordinate system (EPSG:4326, or none for local data) and a GDAL no-data value of -9999. The contours to DEM ASCII grid (.asc) follows the Esri format with an NODATA_value line. The PNG heightmap is a 16-bit grayscale PNG, scaled from the lowest height (0) to the highest (65,535); empty cells are black. All three are written by Maplity’s own code in your browser.

Software Libraries

The triangulation uses Delaunator with robust-predicates for exact geometry tests. Shapefiles are read by shpjs, which also reprojects them with proj4 using the .prj; KML is converted by @tmcw/togeojson and KMZ is unzipped by JSZip. The DXF reader, the gridding, the IDW search, the hillshade and the file writers are Maplity’s own code. The map is Leaflet 1.9 with Esri, CARTO and OpenStreetMap basemaps, the PDF is made by jsPDF, and the page runs on Next.js and React.

Limits

A DEM from contours knows only the heights on the lines. Features smaller than the contour interval, such as banks, ditches, kerbs and small mounds, are missing, and the ground between two lines is assumed to slope evenly. Very large files are thinned to 400 thousand points and the grid is kept under 4 million cells, so for a whole country use a desktop GIS. For construction, legal boundaries and flood design, use a land survey or national lidar data.

How Accurate Is a DEM From Contours? A Test on 200 Famous Places

How the Test Was Made

We took the same 200 famous places as on our Contour Map Generator and Elevation Profile Viewer pages. For each place, the heights of the 1 km² square came from AWS Terrain Tiles (zoom 15, light smoothing), and the Contour Map Generator’s own engine drew contour lines at its automatic interval. This converter then rebuilt a DEM from those lines alone, by TIN and by IDW, with one cell per terrain pixel, and every cell was compared with the true height. RMSE is the root mean square error in metres; within ½ interval is the share of the ground that came back within half a contour interval of the truth.

Over the 200 places with enough lines (9,755 contour lines in all), the typical TIN error was 18% of the contour interval and 95.4% of the ground came back within half an interval; for IDW the figures were 29% and 90.6%. TIN was the closer of the two in 200 places. Relative to the interval, the weakest results were at places by the water, such as Elbphilharmonie, Waikiki Beach, Giant's Causeway: there the square holds flat water surfaces and sea-floor depths with only a few lines far apart, so much of the ground lies between lines. The best were on steep, even mountain sides such as Matterhorn summit, where many close lines describe the shape well. The error grows with the interval, so rough ground with a 50 m interval has errors of several metres, while gentle ground at 1 or 2 m comes back within a few decimetres.

DEM From Contours: Results for 100 Famous Places in Europe

Error of a DEM rebuilt from contour lines, by TIN and by IDW, in the 1 km² square around 100 famous places in Europe
#PlaceCity, countryReliefIntervalLinesTIN error (RMSE)TIN within ½ intervalIDW error (RMSE)IDW within ½ interval
1Big Ben (Elizabeth Tower)London, United Kingdom11 m1 m1850.32 m86.2%0.38 m77.6%
2Tower of LondonLondon, United Kingdom21 m1 m2360.30 m86.7%0.40 m77.0%
3Buckingham PalaceLondon, United Kingdom17 m1 m1910.25 m93.5%0.32 m87.6%
4StonehengeAmesbury, United Kingdom28 m2 m290.34 m96.3%0.58 m93.7%
5Edinburgh CastleEdinburgh, United Kingdom46 m5 m240.95 m96.5%1.45 m91.0%
6Ben Nevis summitFort William, United Kingdom508 m25 m281.71 m99.9%6.06 m97.6%
7Snowdon (Yr Wyddfa) summitLlanberis, United Kingdom441 m25 m293.09 m97.7%6.44 m96.7%
8Roman BathsBath, United Kingdom33 m2 m960.51 m93.0%0.69 m83.8%
9Giant's CausewayBushmills, United Kingdom83 m5 m662.47 m58.7%2.83 m55.0%
10Trinity College DublinDublin, Ireland22 m1 m540.25 m92.7%0.33 m89.3%
11Rock of CashelCashel, Ireland62 m5 m160.80 m98.1%1.57 m89.8%
12Carrauntoohil summitKillarney, Ireland479 m25 m292.55 m99.4%6.34 m96.4%
13Eiffel TowerParis, France44 m2 m800.43 m94.4%0.63 m88.8%
14Louvre MuseumParis, France33 m2 m1300.46 m94.9%0.59 m91.6%
15Notre-Dame de ParisParis, France35 m2 m1680.46 m95.1%0.58 m91.7%
16Sacré-Cœur Basilica, MontmartreParis, France67 m5 m200.54 m99.3%1.36 m95.4%
17Palace of VersaillesVersailles, France40 m2 m440.24 m99.3%0.49 m96.2%
18Mont-Saint-Michel AbbeyLe Mont-Saint-Michel, France61 m5 m460.46 m99.2%0.70 m97.7%
19Mont Blanc summitChamonix, France608 m50 m246.79 m97.7%14.03 m95.6%
20Aiguille du MidiChamonix, France817 m50 m194.77 m100.0%13.88 m95.2%
21Pont du GardVers-Pont-du-Gard, France87 m5 m320.89 m96.6%1.48 m90.8%
22Cité de CarcassonneCarcassonne, France58 m5 m161.06 m95.2%1.59 m89.1%
23Palais des PapesAvignon, France37 m2 m640.30 m98.0%0.53 m93.5%
24Puy de Dôme summitClermont-Ferrand, France385 m20 m252.45 m98.1%5.06 m96.1%
25Sagrada FamíliaBarcelona, Spain47 m5 m140.85 m98.1%1.64 m88.5%
26AlhambraGranada, Spain154 m10 m231.12 m99.5%2.57 m95.7%
27Royal Palace of MadridMadrid, Spain89 m5 m270.76 m97.5%1.36 m94.1%
28Seville Cathedral and GiraldaSeville, Spain26 m2 m530.41 m96.4%0.64 m88.6%
29Mosque-Cathedral of CórdobaCórdoba, Spain47 m5 m281.01 m94.8%1.67 m85.7%
30Guggenheim Museum BilbaoBilbao, Spain123 m10 m241.90 m95.7%3.17 m87.9%
31Santiago de Compostela CathedralSantiago de Compostela, Spain75 m5 m280.89 m96.2%1.40 m93.8%
32Mount Teide summitTenerife, Spain380 m20 m211.15 m99.8%4.64 m98.4%
33Montserrat MonasteryMonistrol de Montserrat, Spain648 m50 m205.07 m99.5%13.91 m95.7%
34Belém TowerLisbon, Portugal23 m2 m240.26 m99.7%0.51 m94.2%
35São Jorge CastleLisbon, Portugal90 m5 m350.61 m98.8%1.15 m96.5%
36Porto Cathedral (Sé do Porto)Porto, Portugal106 m5 m521.06 m94.6%1.47 m90.2%
37Pena PalaceSintra, Portugal180 m10 m431.14 m98.7%2.42 m96.8%
38ColosseumRome, Italy41 m2 m610.29 m97.8%0.48 m95.8%
39Trevi FountainRome, Italy42 m2 m530.36 m96.4%0.53 m93.8%
40Leaning Tower of PisaPisa, Italy11 m1 m400.20 m94.4%0.30 m90.6%
41Florence Cathedral (Duomo)Florence, Italy31 m2 m450.36 m96.4%0.55 m92.8%
42Piazzale MichelangeloFlorence, Italy93 m5 m281.11 m92.5%1.47 m90.3%
43St Mark's SquareVenice, Italy15 m1 m980.15 m97.8%0.22 m96.0%
44Milan Cathedral (Duomo di Milano)Milan, Italy36 m2 m470.42 m95.1%0.60 m90.4%
45Pompeii ForumPompei, Italy39 m2 m260.23 m99.4%0.52 m95.9%
46Mount Vesuvius crater rimNaples, Italy378 m20 m532.79 m98.2%4.85 m96.5%
47Mount Etna summit areaCatania, Italy264 m20 m263.57 m96.4%5.88 m92.4%
48Tre Cime di LavaredoAuronzo di Cadore, Italy557 m50 m165.83 m98.9%13.81 m95.6%
49St Peter's BasilicaVatican City, Vatican City55 m5 m240.84 m97.4%1.37 m93.7%
50Brandenburg GateBerlin, Germany19 m1 m660.18 m96.7%0.26 m95.2%
51Cologne CathedralCologne, Germany27 m2 m220.43 m95.9%0.68 m86.7%
52Neuschwanstein CastleSchwangau, Germany404 m20 m241.72 m99.6%5.02 m96.5%
53MarienplatzMunich, Germany15 m1 m820.16 m97.6%0.25 m94.8%
54Zugspitze summitGarmisch-Partenkirchen, Germany710 m50 m356.34 m98.8%13.11 m96.5%
55Heidelberg CastleHeidelberg, Germany312 m20 m152.10 m99.5%5.66 m95.1%
56FrauenkircheDresden, Germany23 m2 m340.51 m90.6%0.73 m84.2%
57ElbphilharmonieHamburg, Germany14 m1 m500.63 m56.8%0.64 m55.8%
58Brocken summitSchierke (Harz), Germany129 m10 m210.50 m100.0%2.68 m98.2%
59Matterhorn summitZermatt, Switzerland1,056 m50 m281.96 m100.0%11.55 m99.3%
60JungfraujochGrindelwald / Wengen, Switzerland635 m50 m189.68 m95.0%15.66 m90.3%
61Chapel Bridge (Kapellbrücke)Lucerne, Switzerland60 m5 m381.01 m95.0%1.37 m92.1%
62Pilatus KulmLucerne, Switzerland597 m50 m217.97 m97.0%14.88 m92.8%
63Château de ChillonVeytaux (Montreux), Switzerland318 m20 m161.96 m99.0%4.53 m98.8%
64Schönbrunn PalaceVienna, Austria53 m5 m271.11 m97.7%1.86 m78.7%
65St Stephen's CathedralVienna, Austria29 m2 m620.44 m96.5%0.67 m87.8%
66Hohensalzburg FortressSalzburg, Austria129 m10 m302.71 m91.7%4.16 m71.8%
67Hallstatt market squareHallstatt, Austria501 m25 m252.27 m99.4%5.25 m98.9%
68Grossglockner summitHeiligenblut, Austria771 m50 m255.00 m99.7%13.14 m95.8%
69RijksmuseumAmsterdam, Netherlands8 m1 m390.25 m91.9%0.33 m87.8%
70Kinderdijk windmillsKinderdijk, Netherlands6 m1 m200.38 m80.7%0.44 m76.0%
71Vaalserberg (Three-Country Point)Vaals, Netherlands80 m5 m390.63 m99.2%1.31 m96.0%
72Grand-PlaceBrussels, Belgium45 m5 m120.97 m96.0%1.71 m85.3%
73AtomiumBrussels, Belgium40 m2 m320.36 m95.6%0.57 m92.7%
74Belfry of BrugesBruges, Belgium8 m1 m270.19 m95.8%0.30 m91.6%
75Acropolis of Athens (Parthenon)Athens, Greece88 m5 m350.80 m97.4%1.33 m93.7%
76Mount Olympus (Mytikas)Litochoro, Greece537 m25 m412.47 m99.4%5.26 m98.4%
77Meteora (Great Meteoron Monastery)Kalambaka, Greece276 m20 m293.11 m97.4%5.55 m94.2%
78Oia villageSantorini, Greece149 m10 m311.09 m99.1%2.35 m96.0%
79Temple of Apollo, DelphiDelphi, Greece580 m50 m143.99 m100.0%14.41 m94.7%
80Prague CastlePrague, Czechia78 m5 m220.66 m99.1%1.35 m94.4%
81Český Krumlov CastleČeský Krumlov, Czechia70 m5 m371.11 m93.8%1.51 m89.9%
82Wawel Royal CastleKraków, Poland33 m2 m430.40 m95.7%0.59 m90.1%
83Old Town Market PlaceWarsaw, Poland39 m2 m270.37 m97.6%0.56 m92.6%
84Kasprowy WierchZakopane, Poland345 m20 m552.20 m98.6%4.98 m97.1%
85Hungarian Parliament BuildingBudapest, Hungary34 m2 m740.44 m97.0%0.59 m92.2%
86Fisherman's BastionBudapest, Hungary80 m5 m310.91 m96.2%1.46 m90.8%
87NyhavnCopenhagen, Denmark15 m1 m1110.20 m95.4%0.31 m91.5%
88Stockholm Royal PalaceStockholm, Sweden33 m2 m1440.37 m96.9%0.64 m91.3%
89Preikestolen (Pulpit Rock)Stavanger region, Norway701 m50 m349.23 m97.9%16.71 m85.4%
90Dubrovnik Old Town (Stradun)Dubrovnik, Croatia212 m10 m421.35 m98.0%2.42 m95.1%
91Plitvice Lakes (Veliki Slap)Plitvička Jezera, Croatia141 m10 m241.62 m97.4%2.99 m90.2%
92Bled CastleBled, Slovenia104 m5 m360.69 m98.1%1.07 m95.9%
93Hagia SophiaIstanbul, Türkiye58 m5 m260.72 m97.5%1.41 m92.7%
94Casino de Monte-CarloMonte Carlo, Monaco188 m10 m640.67 m100.0%2.07 m98.3%
95St John's Co-CathedralValletta, Malta74 m5 m610.65 m98.7%1.14 m96.3%
96Bran CastleBran, Romania203 m10 m351.80 m96.1%2.62 m93.8%
97Rila MonasteryRila, Bulgaria469 m25 m324.48 m95.3%7.15 m94.0%
98Kotor Old TownKotor, Montenegro298 m20 m431.91 m100.0%4.65 m94.4%
99Vaduz CastleVaduz, Liechtenstein408 m20 m211.60 m100.0%4.53 m98.4%
100Guaita TowerCity of San Marino, San Marino292 m20 m211.74 m99.4%5.15 m97.5%

DEM From Contours: Results for 100 Famous Places in the USA

Error of a DEM rebuilt from contour lines, by TIN and by IDW, in the 1 km² square around 100 famous places in the United States
#PlaceCity, countryReliefIntervalLinesTIN error (RMSE)TIN within ½ intervalIDW error (RMSE)IDW within ½ interval
1Statue of LibertyNew York, NY, United States7 m1 m190.24 m93.3%0.38 m83.9%
2Empire State BuildingNew York, NY, United States16 m1 m210.11 m99.4%0.27 m97.0%
3Belvedere Castle, Central ParkNew York, NY, United States28 m2 m400.47 m93.3%0.68 m84.2%
4One World Trade CenterNew York, NY, United States30 m2 m1650.54 m90.8%0.72 m83.7%
5Niagara Falls (Terrapin Point)Niagara Falls, NY, United States121 m10 m683.69 m79.4%4.08 m75.7%
6Mount Marcy summitKeene, NY, United States313 m20 m271.20 m100.0%4.97 m97.9%
7United States CapitolWashington, DC, United States33 m2 m880.48 m94.3%0.67 m87.9%
8Lincoln MemorialWashington, DC, United States29 m2 m900.68 m84.5%0.91 m72.5%
9The White HouseWashington, DC, United States21 m1 m1150.21 m95.7%0.31 m89.3%
10Arlington National CemeteryArlington, VA, United States58 m5 m310.94 m96.8%1.56 m90.3%
11Mount VernonMount Vernon, VA, United States17 m1 m1630.24 m94.1%0.30 m89.0%
12Fort McHenryBaltimore, MD, United States12 m1 m450.38 m76.6%0.46 m71.9%
13Independence HallPhiladelphia, PA, United States13 m1 m1490.25 m93.2%0.33 m86.3%
14Little Round Top, GettysburgGettysburg, PA, United States68 m5 m370.79 m98.8%1.38 m93.2%
15FallingwaterMill Run, PA, United States182 m10 m311.80 m95.9%2.83 m93.1%
16Boston CommonBoston, MA, United States28 m2 m200.52 m87.5%0.68 m84.5%
17Fenway ParkBoston, MA, United States9 m1 m320.18 m98.5%0.28 m95.2%
18Cadillac Mountain summitBar Harbor, ME, United States221 m20 m212.40 m99.7%5.79 m93.0%
19Mount Washington summitSargent’s Purchase, NH, United States312 m20 m222.12 m98.8%5.42 m96.0%
20Mount Mitchell summitBurnsville, NC, United States282 m20 m332.35 m98.4%4.93 m97.6%
21Biltmore EstateAsheville, NC, United States115 m10 m252.10 m94.6%2.93 m91.0%
22Wright Brothers National MemorialKill Devil Hills, NC, United States26 m2 m600.49 m96.1%0.70 m83.4%
23Clingmans DomeGreat Smoky Mountains, TN, United States380 m20 m382.13 m99.0%4.66 m97.7%
24GracelandMemphis, TN, United States17 m1 m1260.19 m97.2%0.29 m90.3%
25The Parthenon, Centennial ParkNashville, TN, United States49 m5 m240.90 m98.2%1.66 m86.9%
26Stone Mountain summitStone Mountain, GA, United States248 m20 m212.32 m98.6%5.06 m96.8%
27Centennial Olympic ParkAtlanta, GA, United States43 m2 m700.38 m96.5%0.59 m91.8%
28Forsyth ParkSavannah, GA, United States23 m2 m500.49 m93.3%0.71 m83.6%
29Vehicle Assembly Building, Kennedy Space CenterMerritt Island, FL, United States15 m1 m1590.33 m84.2%0.37 m80.0%
30Cinderella Castle, Magic KingdomBay Lake, FL, United States3 m1 m20.23 m94.6%0.29 m93.8%
31Shark Valley, Everglades National ParkMiami-Dade County, FL, United States3 m1 m90.19 m96.8%0.31 m84.3%
32South Beach (Ocean Drive)Miami Beach, FL, United States4 m1 m1330.23 m97.7%0.27 m94.3%
33Southernmost Point BuoyKey West, FL, United States22 m1 m930.20 m95.8%0.29 m91.2%
34Castillo de San MarcosSt. Augustine, FL, United States4 m1 m1010.36 m83.6%0.44 m77.5%
35U.S. Space & Rocket CenterHuntsville, AL, United States65 m5 m161.30 m91.3%1.77 m84.8%
36Jackson Square, French QuarterNew Orleans, LA, United States6 m1 m870.30 m86.6%0.40 m76.3%
37Bathhouse Row, Hot SpringsHot Springs, AR, United States123 m10 m292.36 m92.8%2.94 m90.6%
38Churchill DownsLouisville, KY, United States8 m1 m1200.26 m93.5%0.33 m86.1%
39Mammoth Cave Visitor CenterMammoth Cave, KY, United States99 m5 m641.01 m95.2%1.37 m91.5%
40Rock and Roll Hall of FameCleveland, OH, United States26 m2 m800.65 m89.2%0.85 m79.0%
41Renaissance CenterDetroit, MI, United States11 m1 m1140.27 m91.5%0.37 m82.5%
42Indianapolis Motor SpeedwaySpeedway, IN, United States7 m1 m1620.30 m89.3%0.40 m77.8%
43Willis TowerChicago, IL, United States8 m1 m280.27 m89.9%0.33 m86.6%
44Cloud Gate, Millennium ParkChicago, IL, United States9 m1 m380.32 m85.6%0.37 m82.5%
45Wisconsin State CapitolMadison, WI, United States26 m2 m620.38 m96.1%0.59 m91.1%
46Minnehaha FallsMinneapolis, MN, United States43 m2 m730.54 m91.8%0.74 m82.6%
47Gateway ArchSt. Louis, MO, United States30 m2 m710.86 m69.6%0.96 m64.6%
48Mount RushmoreKeystone, SD, United States246 m20 m424.38 m94.8%5.92 m91.1%
49Devils TowerCrook County, WY, United States379 m20 m312.51 m99.8%5.73 m93.0%
50Old Faithful, YellowstoneYellowstone National Park, WY, United States102 m5 m390.75 m99.6%1.31 m96.3%
51Grand Teton summitJackson, WY, United States994 m50 m497.01 m98.7%12.96 m95.5%
52Chimney RockBayard, NE, United States129 m10 m251.38 m98.9%2.85 m93.3%
53Colorado State CapitolDenver, CO, United States25 m2 m640.47 m95.2%0.71 m84.0%
54Red Rocks AmphitheatreMorrison, CO, United States276 m20 m473.34 m98.2%5.65 m92.5%
55Pikes Peak summitColorado Springs, CO, United States453 m25 m342.70 m99.5%6.34 m95.8%
56Mount Elbert summitLeadville, CO, United States478 m25 m302.48 m98.8%6.18 m98.2%
57Garden of the GodsColorado Springs, CO, United States78 m5 m310.63 m99.1%1.40 m93.2%
58Cliff Palace, Mesa VerdeMontezuma County, CO, United States153 m10 m292.80 m89.7%3.80 m77.3%
59Delicate Arch, Arches National ParkMoab, UT, United States168 m10 m681.96 m96.9%2.83 m92.2%
60Angels Landing, Zion National ParkSpringdale, UT, United States486 m25 m665.98 m93.1%7.93 m89.1%
61Sunset Point, Bryce CanyonBryce Canyon City, UT, United States212 m10 m741.97 m96.0%2.82 m91.1%
62Temple SquareSalt Lake City, UT, United States68 m5 m370.83 m98.5%1.55 m89.8%
63Mather Point, Grand Canyon South RimGrand Canyon Village, AZ, United States920 m50 m2212.20 m99.5%15.46 m95.5%
64Horseshoe Bend overlookPage, AZ, United States393 m20 m243.42 m97.1%6.18 m88.9%
65Cathedral RockSedona, AZ, United States309 m20 m282.87 m99.1%5.28 m94.5%
66Monument Valley (The Mittens view)Oljato-Monument Valley, AZ, United States112 m10 m171.92 m96.4%3.31 m86.1%
67Meteor Crater rimWinslow, AZ, United States187 m10 m501.96 m94.4%2.58 m92.2%
68Hoover DamBoulder City, NV, United States294 m20 m365.23 m87.7%6.68 m82.2%
69Bellagio Fountains, Las Vegas StripParadise, NV, United States17 m1 m350.11 m99.7%0.26 m97.2%
70Carlsbad Caverns Visitor CenterCarlsbad, NM, United States95 m5 m681.26 m90.6%1.52 m88.6%
71White Sands dune fieldAlamogordo, NM, United States10 m1 m100.05 m100.0%0.29 m96.2%
72Santa Fe PlazaSanta Fe, NM, United States52 m5 m120.52 m99.4%1.40 m95.0%
73Taos PuebloTaos, NM, United States26 m2 m150.15 m99.9%0.56 m96.4%
74The AlamoSan Antonio, TX, United States19 m1 m980.25 m93.1%0.35 m85.0%
75Texas State CapitolAustin, TX, United States29 m2 m400.33 m96.6%0.53 m94.4%
76Space Center HoustonHouston, TX, United States10 m1 m1810.31 m88.3%0.37 m82.3%
77Guadalupe Peak summitCulberson County, TX, United States763 m50 m296.33 m98.8%13.49 m96.4%
78Chisos Basin, Big BendBig Bend National Park, TX, United States239 m20 m223.46 m97.8%6.09 m90.4%
79Badwater Basin, Death ValleyInyo County, CA, United States325 m20 m432.34 m99.2%4.51 m95.7%
80Mount Whitney summitLone Pine, CA, United States647 m50 m196.62 m99.2%12.83 m96.1%
81Half Dome summit, YosemiteYosemite National Park, CA, United States986 m50 m316.98 m97.5%13.68 m94.9%
82Tunnel View, YosemiteYosemite National Park, CA, United States510 m25 m282.48 m100.0%6.32 m96.9%
83Golden Gate Bridge (south end)San Francisco, CA, United States125 m10 m231.50 m99.5%3.15 m89.2%
84Alcatraz IslandSan Francisco, CA, United States84 m5 m410.96 m96.7%1.48 m91.1%
85Hollywood SignLos Angeles, CA, United States278 m20 m383.13 m97.9%4.84 m96.1%
86Santa Monica PierSanta Monica, CA, United States24 m2 m510.45 m94.4%0.72 m86.9%
87Balboa ParkSan Diego, CA, United States54 m5 m421.20 m93.6%1.61 m85.6%
88Emerald Bay, Lake TahoeSouth Lake Tahoe, CA, United States443 m25 m263.47 m98.5%6.83 m93.4%
89General Sherman Tree, SequoiaSequoia National Park, CA, United States268 m20 m191.95 m99.5%5.53 m95.8%
90Rim Village, Crater LakeCrater Lake National Park, OR, United States477 m25 m294.90 m95.3%7.21 m91.8%
91Mount Hood summitGovernment Camp, OR, United States682 m50 m285.81 m99.3%13.42 m96.5%
92Multnomah FallsColumbia River Gorge, OR, United States539 m25 m283.76 m97.8%6.16 m96.1%
93Space NeedleSeattle, WA, United States43 m2 m690.38 m96.4%0.63 m89.4%
94Mount Rainier summitPierce County, WA, United States313 m20 m351.97 m99.7%5.25 m96.6%
95Johnston Ridge, Mount St. HelensSkamania County, WA, United States311 m20 m382.83 m98.5%5.38 m94.0%
96Logan Pass, Glacier National ParkGlacier National Park, MT, United States541 m25 m321.88 m99.8%6.30 m98.2%
97Mauna Kea summitHawaiʻi Island, HI, United States258 m20 m233.16 m97.3%5.29 m95.4%
98Diamond Head crater (Lēʻahi)Honolulu, HI, United States170 m10 m641.34 m98.6%1.62 m98.2%
99Waikiki BeachHonolulu, HI, United States19 m1 m800.50 m75.3%0.69 m72.8%
100Haleakalā summitMaui, HI, United States168 m10 m421.06 m98.9%2.35 m97.1%

10 Most Asked Questions About Contours to DEM

What is a DEM?

A DEM (digital elevation model) is a grid of heights: the land is cut into square cells, and each cell holds one height above sea level. GIS programs use a DEM to draw hillshade, work out slope and aspect, find where water flows, check what can be seen from a point and make 3D views. A contour map shows the same land with lines; a DEM stores it as numbers that a program can compute with.

How do I convert contour lines to a DEM?

Upload the contour file, check that the right field is used for the height, and press Generate DEM. After about 10 seconds the DEM appears over the map. Keep the TIN method and the automatic cell size for a first try, look at the preview and the flat-triangle share, then download the GeoTIFF for GIS, the ASCII grid for other programs or the PNG heightmap for 3D and game tools.

Which file formats can I upload?

GeoJSON (.geojson or .json), KML and KMZ (from Google Earth), zipped Shapefiles (.zip with at least the .shp and .dbf; with the .prj the lines are moved to latitude and longitude) and DXF from CAD (LWPOLYLINE, POLYLINE and LINE, with the height as elevation or Z). Lines and polygon outlines are read; points, text and splines are skipped.

Should I use TIN or IDW?

For contour lines, TIN is usually better. In the round trip of the 200 places on this page, TIN was closer to the true ground in 200 of 200 places, with a typical error of 18% of the contour interval against 29% for IDW. IDW gives a softer surface and avoids the straight edges of triangles, but it adds small steps along the lines and is slower on large grids.

What cell size should I choose?

A good start is the automatic value, about 500 cells across the data. For a map, a common rule is a cell of about 0.5 mm at the map scale: 0.5 m for 1:1,000, 5 m for 1:10,000, 12.5 m for 1:25,000. Cells much smaller than the spacing of the lines do not add detail, because the data between the lines does not exist; they only make the file bigger.

Why are hilltops and valley floors flat in my DEM?

Inside the last closed contour around a hilltop, all points on the edge have the same height, so the triangles there are flat. The same happens on valley floors and along wide terraces. The tool shows the share of the area in such flat triangles. To reduce it, add spot heights for the tops if you have them, use a smaller contour interval, or try IDW, which rounds the shape a little.

Is my file uploaded to a server?

No. The file is read in your browser, the DEM is built in your browser (in a background worker so the page stays responsive), and the downloads are made on your device. Nothing about the file or the DEM is sent to Maplity or anyone else.

What coordinate system does the GeoTIFF use?

Files in latitude and longitude, and Shapefiles with a .prj, give a GeoTIFF in WGS 84 (EPSG:4326), with cells that are square on the ground. DXF files and other data without a coordinate system give a GeoTIFF in the file's own units, with no coordinate system set; assign it in QGIS or ArcGIS if you know it.

How accurate is a DEM made from contours?

It can only be as good as the contours. In our test of 200 places, 95.4% of the ground came back within half a contour interval with TIN. Between the lines the tool assumes the slope is even, so banks, ditches, small knolls and dips that fall between two lines are missing from the DEM.

Is the Contours to DEM Converter free?

Yes. The tool, all the downloads and the PDF report are free and need no account or sign-up. There is no limit on the number of files you convert.
Contours to DEM Online: Free GeoTIFF, ASCII Grid and PNG