Contour lines

An elevation model can show its shape the way a topographic map does. Turn on Contour lines for a DEM layer and lines of equal height are drawn over it, with every fifth line thicker and labelled with its height. A map can also draw contour lines from its terrain, so even a map with no elevation file of its own can have a topographic look.

Nothing is reprocessed. The viewer makes the lines from the same height tiles it already loads for the layer, so they appear as soon as you save.

Contours on an elevation layer

Contours work on a raster with one band of measured values, which is what an uploaded DEM (a GeoTIFF of heights) becomes. Imagery and multi-band rasters do not have contours.

Open the map in the builder, expand the elevation layer and open Contour lines:

  1. Tick Draw contour lines. The preview shows lines every 20 m straight away.
  2. Set Every to the height between lines, and choose metres or feet. In feet the lines fall on whole feet and are labelled in feet.
  3. Thicker line every sets how often a line is drawn heavier and labelled: 5 gives a heavier line every 100 m with 20 m lines. Use 0 for no heavier lines; then every line is labelled.
  4. Pick a colour, and untick Label the thicker lines if you want the lines alone.

Lines stay readable as you zoom out. When 20 m lines would crowd together, the viewer draws every fifth one instead (the heavier lines become the regular ones), and so on, so a whole mountain range shows a few clear lines rather than a solid smear.

Heights are read in metres. If your file says its heights are in feet, Sarkoa converts them; if it says nothing, it uses the unit set in the map's Terrain section.

Contours from the terrain

The Terrain section of the builder has Contour lines from the terrain with the same settings. These lines follow the ground of the map: your terrain layer where it has data, and the global terrain everywhere else. They show on the flat map and in 3D, and they are a quick way to give a basemap some relief.

In 3D, prints and the legend

In 3D the lines lie on the ground and follow it over ridges and valleys. They print with the map, and the legend adds a row such as "Contours every 20 m" under the layer.

Visitors see a Contour lines row under the layer in the Layers panel. Its eye button hides or shows the lines for them alone; the map is not changed. Hiding the layer hides its lines too.

In a map document

Agents and the API set the same thing in the map document. On a layer:

{ "layerId": "dem", "assetId": "…", "contours": { "interval": 20, "majorEvery": 5 } }

The block takes interval (required, in unit), unit (m or ft), majorEvery (0, or 2 to 50; default 5), color, width, majorWidth, opacity and labels. Saving it on a layer that is not a single-band elevation raster fails with style_block_wrong_kind. The same block at spec.terrain.contours draws contours from the terrain. See Map documents.