1
$\begingroup$

I want to calculate mean depth of Goose lake (mean depth=4.6 m), I use bellow command for this operation, But this command is not automatic and we have to create the coordinates manually, and on the other hand, error is high. Can anyone help me improve the command or calculate the depth in another way?

GeoGraphics[GeoRange -> {{42.11, 41.72}, {-120.68, -120.04}}, 
 GeoRangePadding -> Scaled[0.1], GeoBackground -> "Satellite"]

enter image description here

Get the coordinates manually

lakeContour = {{42.06139018896673, -120.33366857142863`}, \
{42.01901951557524, -120.32489142857145`}, {41.979883050316275`, \
-120.32269714285715`}, {41.94643492712383, -120.34244571428573`}, \
{41.91786775950185, -120.36658285714289`}, {41.86232926116004, \
-120.37755428571428`}, {41.822278941450364`, -120.4126628571429}, \
{41.79856388323117, -120.42692571428573`}, {41.792020253207994`, \
-120.45764571428573`}, {41.825549294948054`, -120.47739428571433`}, \
{41.85334055520192, -120.47849142857147`}, {41.884387091923635`, \
-120.50372571428575`}, {41.912152790705946`, -120.52237714285718`}, \
{41.9350095953905, -120.50811428571433`}, {41.96356908621639, \
-120.49824000000005`}, {41.99048488629956, -120.48617142857148`}, \
{42.01086807025052, -120.48507428571435`}, {42.0459118723763, \
-120.46752000000002`}, {42.06546280322868, -120.4368}, \
{42.078493413349285`, -120.41924571428575`}, {42.08337920245882, \
-120.36877714285716`}};


gcarc = GeoPath[Table[i, {i, lakeContour}], "Geodesic"];
gcarcDistance = 
  GeoDistance[Table[i, {i, lakeContour}], UnitSystem -> "Metric"];
profile = 
  GeoElevationData[gcarc, Automatic, "GeoPosition", GeoZoomLevel -> 4];
pts = profile[[1]][[1]];
depths = #[[1]] & /@ pts;
distances = 
  QuantityMagnitude[
     GeoDistance[{pts[[1]][[1 ;; 2]], #[[1 ;; 2]]}, 
      UnitSystem -> "Metric"]] & /@ pts;
avgDepth = UnitConvert[Quantity[Mean[depths], "Meters"]]

out put: 42.0557m

$\endgroup$
1
  • 1
    $\begingroup$ I don't think GeoElevationData has the granularity to find the depth of the lake. I looked at elevation values in the lake's interior and all along its border using its Polygon. GeoElevationData returned the same value for every location, with only a few exceptions. $\endgroup$
    – Greg Hurst
    Commented Sep 28, 2023 at 0:25

2 Answers 2

3
$\begingroup$

We can use a combination of GeoNearest and Entity:

I use the center of your map:

pos = GeoPosition[Mean /@ {{42.11, 41.72}, {-120.68, -120.04}}];

Find the lake:

lake = GeoNearest["Lake", pos][[1]]
Entity["Lake", "GooseLake::y6htr"]

Look up its depth:

lake["MaximumDepth"]
Quantity[2.*10^1, "Feet"]

Note that GeoEntities can find the lake too:

GeoEntities[GeoBoundsRegion[{{42.11, 41.72}, {-120.68, -120.04}}], "Lake"]
 {Entity["Lake", "GooseLake::y6htr"]}
$\endgroup$
1
  • $\begingroup$ While this is a good way to utilise inbuilt features - the data is inaccurate. $\endgroup$
    – Navvye
    Commented Sep 28, 2023 at 19:39
0
$\begingroup$

I answered something similar on the Wolfram Community - and I've found a way to counteract the problem faced by GeoElevationData.

Firstly, your code has a bug. The depths data should be

depths = #[[3]] & /@ pts;

instead of

depths = #[[1]] & /@ pts;

Also, I've realised that you can just do

Mean[GeoElevationData /@ GeoPosition /@ lakeContour]

Now, since GeoElevationData takes the average elevation - not the average depth. So in order to combat this, pick a random point very close to the lake and subtract the average height of the lake from it. This should give you the desired result.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.