class TerrainUtil {

    public double getElevationInMeters(MapContext<DynamicViewer> mapContext, GeographicPosition position)
    {
        double elevation = 0.;
        Projection proj = mapContext.getRawProjection();

        if (proj.getElevationManager() != null)
        {
            elevation = proj.getElevationManager().getElevationM(position, true);
            elevation = Math.max(0., elevation);
        }

        return elevation;
    }

    private  TerrainUtil();

}