# Add single contour line to relief map [duplicate]

I have generated a relief map according to a method shown in Mathematica documentation, viz:

upperleft = GeoPosition[{36.843626, 13.916897}]

lowerright = GeoPosition[{35.710239, 15.37673}]

demdata =
Reverse[QuantityMagnitude[GeoElevationData[{upperleft, lowerright}]]]

ListPlot3D[demdata, AspectRatio -> (Divide @@ Dimensions[demdata]),
Boxed -> False, Mesh -> None, Axes -> False, Background -> Black,
ColorFunction -> ColorData["HypsometricTints"],
ColorFunctionScaling -> False]

I would like to add one or two particular contours at specific depths in the ocean areas, like at -150 feet and -300 feet. Is there a way to do that?

• Replace the Mesh -> None with MeshFunctions -> {#3 &}, Mesh -> {{-150, -300}}.
– user484
Nov 18, 2015 at 22:23
• @Rahul, looks like an answer to me. :) Nov 19, 2015 at 1:05
• This is about adding SPECIFIC contour lines not contour lines in general. Nov 19, 2015 at 5:27

@Rahul's comment nails it...

But what if you wanted a giant red slice raising from the water?

Your code, assigning the graph to variable: a:

upperleft = GeoPosition[{36.843626, 13.916897}];

lowerright = GeoPosition[{35.710239, 15.37673}];

demdata =
Reverse[QuantityMagnitude[GeoElevationData[{upperleftlowerright}]]];

a = ListPlot3D[demdata,
AspectRatio -> (Divide @@ Dimensions[demdata]), Boxed -> False,
Mesh -> None, Axes -> False, Background -> Black,
ColorFunction -> ColorData["HypsometricTints"],
ColorFunctionScaling -> False];

Now we generate a red slice inside of your graph a at varied depths:

g = ParallelTable[Show[a, ContourPlot3D[y == depth,
{p, 1, Dimensions[demdata][[1]]},
{s, 1, Dimensions[demdata][[2]]}, {y, -2000, 0},
ContourStyle -> Opacity[.4, Lighter@Red]]], {depth, -2000, 0, 100}];

Export to Gif: