我如何通过Cesium读取自定义DataSource(* .json)

时间:2016-10-22 04:34:44

标签: json cesium

我有一个grb2文件,我使用grib2json将它转换为.json,这里是json代码:

[
{
    "header":{
        "discipline":0,
        "disciplineName":"Meteorological products",
        "gribEdition":2,
        "gribLength":455039,
        "center":7,
        "centerName":"US National Weather Service - NCEP(WMC)",
        "subcenter":0,
        "refTime":"2016-10-05T12:00:00.000Z",
        "significanceOfRT":1,
        "significanceOfRTName":"Start of forecast",
        "productStatus":0,
        "productStatusName":"Operational products",
        "productType":1,
        "productTypeName":"Forecast products",
        "productDefinitionTemplate":0,
        "productDefinitionTemplateName":"Analysis/forecast at horizontal level/layer at a point in time",
        "parameterCategory":2,
        "parameterCategoryName":"Momentum",
        "parameterNumber":3,
        "parameterNumberName":"V-component_of_wind",
        "parameterUnit":"m.s-1",
        "genProcessType":2,
        "genProcessTypeName":"Forecast",
        "forecastTime":0,
        "surface1Type":103,
        "surface1TypeName":"Specified height level above ground",
        "surface1Value":10.0,
        "surface2Type":255,
        "surface2TypeName":"Missing",
        "surface2Value":0.0,
        "gridDefinitionTemplate":0,
        "gridDefinitionTemplateName":"Latitude_Longitude",
        "numberPoints":259920,
        "shape":6,
        "shapeName":"Earth spherical with radius of 6,371,229.0 m",
        "gridUnits":"degrees",
        "resolution":48,
        "winds":"true",
        "scanMode":0,
        "nx":720,
        "ny":361,
        "basicAngle":0,
        "subDivisions":0,
        "lo1":0.0,
        "la1":90.0,
        "lo2":359.5,
        "la2":-90.0,
        "dx":0.5,
        "dy":0.5
    },
    "data":[
        3.92,
        3.89,
        ......
        -3.06,
        -3.07
    ]
}

当我使用Cesium1.26来读取json文件时,它可以工作,但是我无法获得标题和数据,任何人都可以帮我解决这个问题吗?

0 个答案:

没有答案