MCPcopy
hub / github.com/golang/geo / ExampleLengthFromLatLngs

Function ExampleLengthFromLatLngs

earth/earth_example_test.go:50–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50func ExampleLengthFromLatLngs() {
51 chukchi := s2.LatLngFromDegrees(66.025893, -169.699684)
52 seward := s2.LatLngFromDegrees(65.609727, -168.093694)
53 length := earth.LengthFromLatLngs(chukchi, seward)
54 fmt.Printf("Bering Strait is %.0f feet", length.Feet())
55 // Output: Bering Strait is 283979 feet
56}
57
58func ExampleAreaFromSteradians() {
59 bermuda := s2.PointFromLatLng(s2.LatLngFromDegrees(32.361457, -64.663495))

Callers

nothing calls this directly

Calls 2

LatLngFromDegreesFunction · 0.92
LengthFromLatLngsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…