Table of Contents

Class FlatElevationSampler

Default IElevationSampler: ground is 0 everywhere.

public sealed class FlatElevationSampler : IElevationSampler
Inheritance
object
FlatElevationSampler
Implements

Remarks

Stateless and side-effect free, so a single shared instance (Instance) is always safe to reuse instead of allocating a new one per caller.

Fields

Instance

Shared stateless instance.

public static readonly FlatElevationSampler Instance

Field Value

FlatElevationSampler

Methods

GetElevationMeters(LatLon)

Ground height at the given coordinate, in meters. Never NaN or infinite - implementations return their best estimate (0 for unknown terrain) rather than a sentinel a caller must check for.

public double GetElevationMeters(LatLon at)

Parameters

at LatLon

Returns

double