//产品枚举映射
export function productTypeMap(pdtype) {
    const pdtypeMap = {
        45: "正射产品",
        46: "高程产品",
        51: "后向散射系数产品",
        52: "大气延迟校正产品",
        53: "干涉测量形变产品",
        39: "地表覆盖类型产品",
        38: "土壤水分产品",
        49: "土壤盐碱度产品",
        50: "地表粗糙度产品",
        48: "植被高度产品",
        43: "叶面积指数产品",
        47: "植被物候产品"
    };
    if (pdtype == null) return null;
    else return pdtypeMap[pdtype];
}

//产品--样本类型映射
export function productTypeSplMap(pdtype) {
    const pdtypeMap = {
        45: "正射样本",
        46: "高程样本",
        51: "后向散射系数样本",
        52: "大气延迟校正样本",
        53: "干涉测量形变样本",
        39: "地表覆盖类型样本",
        38: "土壤水分样本",
        49: "土壤盐碱度样本",
        50: "地表粗糙度样本",
        48: "植被高度样本",
        43: "叶面积指数样本",
        47: "植被物候样本"
    };
    if (pdtype == null) return null;
    else return pdtypeMap[pdtype];
}

//真实性检验方法映射
export function truthFunctionsMap(truthFun) {
    const truthFunMap = {
        4: "平均误差",
        9: "平均绝对误差",
        5: "相对误差",
        8: "平均相对误差",
        24: "平均绝对相对误差",
        6: "均方根误差",
        23: "平面中误差",
        7: "相关系数",
        12: "误差矩阵",
        14: "总体分类精度",
        13: "Kappa系数",
        11: "产品真值",
        112: "正射误差列表"
    };
    if (truthFun == null) return null;
    else return truthFunMap[truthFun];
}

// 抽样方法枚举转换
export function transformSlp(sampleFun) {
    const sampleFunMap = {
        "1": "随机抽样",
        "2": "分层抽样",
        "3": "等距抽样"
    };
    if (sampleFun == null) return null;
    else return sampleFunMap[sampleFun];
}
// 像元级方法枚举转换
export function transformPcMethod(pixelDealFun) {
    const pixelDealFunMap = {
        "1": "均值法",
        "6": "最邻近法",
        "7": "克里格法",
        "9": "块克里格法",
        "10": "MSN法"
    };
    if (pixelDealFun == null) return null;
    else return pixelDealFunMap[pixelDealFun];
}

export const PIXELDEALFUNOPTION = [
    {
        value: "1",
        label: "均值法"
    },
    {
        value: "6",
        label: "最邻近法"
    },
    {
        value: "7",
        label: "克里格法"
    },
    {
        value: "9",
        label: "块克里格法"
    },
    {
        value: "10",
        label: "MSN法"
    }
];
