文档

标注信息管理

更新时间:

本文介绍如何对标注数据的操作。

以下调用示例中lyjClient的初始化见:初始化

获取原始标注数据

 // 子场景ID
 String subSceneId = "hjyuioweopeou****";

 GetOriginLayoutDataRequest request = new GetOriginLayoutDataRequest();
 request.setSubSceneId(subSceneId);
 GetOriginLayoutDataResponse getOriginLayoutDataResponse = lyjClient.getOriginLayoutData(request);
 GetOriginLayoutDataResponseBody response = getOriginLayoutDataResponse.getBody();

获取最新标注数据

 // 子场景ID
 String subSceneId = "hjyuioweopeou****";

 GetLayoutDataRequest request = new GetLayoutDataRequest();
 request.setSubSceneId(subSceneId);
 GetLayoutDataResponse layoutData = lyjClient.getLayoutData(request);
 GetLayoutDataResponseBody response = layoutData.getBody();

更新标注数据

 // 子场景ID
 String subSceneId = "hjyuioweopeou****";
 // 标注数据后,传参时转成字符串
 String layoutData = "{}";

 UpdateLayoutDataRequest request = new UpdateLayoutDataRequest();
 request.setSubSceneId(subSceneId);
 request.setLayoutData(layoutData);
 UpdateLayoutDataResponse updateLayoutData = lyjClient.updateLayoutData(request);
 UpdateLayoutDataResponseBody response = updateLayoutData.getBody();

layoutData数据格式说明:

  {
    "wallHeight": 2.700922225537948, // 墙高
    "camHeight": 1.6, // 相机高度,控制底线y坐标
    // 门坐标数据
    "doors": [
      {
        // 三维坐标,顺序:左上、右上、右下、左下
        "3DData": [
          [-1.3177009590601516, 0.9483160019718286, 0.5658519199339009],
          [-1.3206207154160838, 0.9483160019718286, -0.321184341382172],
          [-1.3206207154160838, -1.6, -0.321184341382172],
          [-1.3177009590601516, -1.6, 0.5658519199339009]
        ],
        // 二维坐标,坐标顺序:左上、右上、右下、左下
        "data": [
          [0.18544492138030266, 0.31402270004426674],
          [0.28797042285859353, 0.3060822844935388],
          [0.28797042285859353, 0.7758546102727832],
          [0.18544492138030266, 0.7673919507684849]
        ],
        "wallPlaneId": "wallPlane_0", // 关联的墙面id
        "isVirtual": false, // 是否为虚拟墙
        "id": "5723#832192174826209280#94AV-76843", // 门id
        "name": "94AV-76843" // 门name
      },
      // 虚拟墙关联的门坐标数据
      {
        "data": [
          [0.6011182396644409, 0.36520429141951144],
          [0.8214046005643011, 0.31003754161901353],
          [0.8214046005643011, 0.7481417022418769],
          [0.6011182396644409, 0.6844277185761212]
        ],
        "3DData": [
          [1.4511971473693848, 1.1022230386734009, -1.9681713581085205],
          [1.458586573600769, 1.0998505353927612, 0.7021476626396179],
          [1.458586573600769, -1.6, 0.7021476626396179],
          [1.4511971473693848, -1.6, -1.9681713581085205]
        ],
        "wallPlaneId": "wallPlane_2",
        "id": "#8b1a-74326",
        "name": "8b1a-74326",
        "isVirtual": true // 虚拟墙
      }
    ],
    // 玻璃坐标数据
    "glasses": [
      {
        // 三维坐标,顺序:左上、右上、右下、左下
        "3DData": [
          [-1.3228912714314087, 0.4751431712989289, -1.0109903640149713],
          [-1.3247844290444415, 0.4751431712989289, -1.5861409061945726],
          [-1.3247844290444415, -0.26156921842654457, -1.5861409061945726],
          [-1.3228912714314087, -0.26156921842654457, -1.0109903640149713]
        ],
        // 二维坐标,坐标顺序:左上、右上、右下、左下
        "data": [
          [0.3538557506699558, 0.4115141752262914],
          [0.389251461335856, 0.42806627084299625],
          [0.389251461335856, 0.5400750506383182],
          [0.3538557506699558, 0.5496013738281795]
        ],
        "wallPlaneId": "wallPlane_0", // 关联的墙面id
        "id": "#832192174826209280#936d-88477", // 玻璃id
        "name": "936d-88477" // 玻璃name
      }
    ],
    // 凹凸墙坐标数据
    "ccbs": [
      {
        // 三维坐标
        "3DData": [
          // 贴墙的面,顺序:左上、右上、右下、左下
          [-0.9267534816655556, 0.6816616518035907, -1.9607346388957219],
          [0.06904156124921382, 0.6816616518035907, -1.963848853310955],
          [0.06904156124921382, -0.12274055333193454, -1.963848853310955],
          [-0.9267534816655556, -0.12274055333193454, -1.9607346388957219],
          // 墙外的面,顺序:左上、右上、右下、左下
          [-0.9277855070193239, 0.6816616518035907, -2.2907330251397595],
          [0.06800953589544548, 0.6816616518035907, -2.2938472395549927],
          [0.06800953589544548, -0.12274055333193454, -2.2938472395549927],
          [-0.9277855070193239, -0.12274055333193454, -2.2907330251397595]
        ],
        // 二维坐标
        "data": [
          // 贴墙的面,顺序:左上、右上、右下、左下
          [0.4297276319352479, 0.40306269192386507],
          [0.5055929874871974, 0.39371565793798047],
          [0.5055929874871974, 0.5198562891140266],
          [0.4297276319352479, 0.5179958098332148],
          // 墙外的面,顺序:左上、右上、右下、左下
          [0.4387533956660499, 0.4143366013725067],
          [0.5047173515714549, 0.40809179763911135],
          [0.5047173515714549, 0.5170086288250939],
          [0.4387533956660499, 0.5157951356841399]
        ],
        "wallPlaneId": "wallPlane_1", // 关联的墙面id
        "id": "#832192174826209280#7e9c-40420", // 凹凸墙id
        "name": "7e9c-40420" // 凹凸墙name
      }
    ],
    // 墙线坐标
    "wallLines": [
      {
        // 三维坐标,顺序:上点、下点
        "3DData": [
          [-1.3172242641448975, 1.0996774435043335, 0.7106741666793823],
          [-1.3172242641448975, -1.600000023841858, 0.7106741666793823]
        ],
        // 二维坐标,顺序:上点、下点
        "data": [
          [0.17125575244426727, 0.2983008027076721],
          [0.17125575244426727, 0.7606133222579956]
        ],
        "id": "wallLine_0", // 墙线 id,墙线id为固定格式,暂不支持更改
        "wallPlaneIds": ["wallPlane_3", "wallPlane_0"] // 所关联的墙面id,[左墙面, 右墙面]
      }
    ],
    // 墙面数据
    "wallPlanes": [
      {
        "id": "wallPlane_0", // 墙面id,墙面id为固定格式,暂不支持更改
        "wallLineIds": ["wallLine_0", "wallLine_1"], // 组成该墙面的墙线id,[左墙线、右墙线]
        "doorIds": ["5723#832192174826209280#94AV-76843"], // 属于该墙面的门id
        "glassIds": ["#832192174826209280#936d-88477"], // 属于该墙面的玻璃id
        "ccbIds": [], // 属于该墙面的凹凸墙id
        "isVirtual": false // 是否为虚拟墙
      },
      // 虚拟墙,本质为一个跟墙面大小相同的门
      {
        "id": "wallPlane_2",
        "wallLineIds": ["wallLine_2", "wallLine_3"],
        "doorIds": ["#8b1a-74326"], // 虚拟墙关联的门id
        "glassIds": [],
        "ccbIds": [],
        "featureIds": [],
        "isVirtual": true // 虚拟墙
      },
    ]
  }
  • 本页导读 (0)
文档反馈