# How to extract breaklines from a given DEM?

Breaklines are very useful for describing a terrain - for example to build an exact TIN.

My question is, how to extract these breaklines from a given DEM?

I calculated the curvature (vertical) - raster (using arcgis 10), where you can see the breaklines (min/max-curvature), but I did not figure out how to extract them to get polylines in the end.

What is the workflow to get these breaklines from a DEM?

Does anyone have an idea of a workflow, or a "tool", or skript, which can help?

I think I am not the first/last man who wants to perform this task:)

...in the meanwhile i have found a paper on this topic that seems to be a good solution, but the big question remains: how to reduce that to practice?

Or has anyone a different (easier?) approach with some software?

• As far as I can remember, QuikGrid can detect breaklines very well, although it mostly works with mass points. Jan 15 '14 at 22:16
• What kind of breaklines are you interested in extracting? The most common would be hydro-flattening but breaklines can be used for roads.I don't understand the question as the breaklines are needed prior to creating the DEM. Can you clarify? Feb 24 '14 at 20:30

I would try it this way: search for a critical value in the curvature raster file. Above this value you will expect a breakline.

Then I would use conditional statements in the raster calculator to use "1" for pixels above the critical and 0 below the critical value. Use this binary raster for raster to polygon conversion in the toolbox. you will find an answer on how to get the polygon to line here

after all you can build up a model from these steps.

• might have to use nibble or some thinning function based on what comes out, but I think @butcher's answer is on the mark. Jul 30 '13 at 22:49

Conrec does this. It was originally written in fortran though, so it has been ported around a few times.

A library I have been working on in node.js, turf, uses this algorithm to create these contours based of point vector data. The script to do this is pretty simple and would basically be:

``````var t = require('turf')
var fs = require('fs')
var z = 'elevation'
var resolution = 15
var breaks = [.1, 22, 45, 55, 65, 85,  95, 105, 120, 180]

t.contour(points, z, resolution, breaks, function(err, contours){
if(err) throw err
fs.writeFileSync('.path/to/output.geojson', contours)
})
})
``````

You can also generate jenks natural breaks if you do not have specific breaks in mind:

``````var t = require('turf')
var propertyName = 'elevation'
var num = 10