Appearance
平面房间结果获取
接口地址
http
GET /result/building_cv/planRoom请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| id | String | 是 | 建筑构件识别任务的 taskId |
请求示例
bash
curl -G "https://openapi.bangtu-ai.com/openApi/result/building_cv/planRoom" \
-H "apiKey: YOUR_API_KEY" \
--data-urlencode "id=BUILDING_TASK_ID"返回结果
data 为平面子图框数组,对应 List<BaseSubFrame>。object 为房间数组。
json
{
"code": 200,
"message": "success",
"data": [
{
"objId": "subframe-plan-001",
"subFrameName": "首层平面图",
"wcsLoc": {
"left": 100.0,
"top": 1800.0,
"right": 2400.0,
"bottom": 100.0
},
"subFrameType": "PLAN",
"object": [
{
"objId": "room-101",
"wcsPoly": [
{ "x": 320.0, "y": 1460.0 },
{ "x": 820.0, "y": 1460.0 },
{ "x": 820.0, "y": 980.0 },
{ "x": 320.0, "y": 980.0 }
],
"roomArea": 24.0,
"doorIds": ["door-101"],
"windowIds": ["window-101", "window-102"]
}
]
}
],
"timestamp": 1784538400000
}字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
| objId | String | 子图框对象 ID |
| subFrameName | String | 子图框名称 |
| wcsLoc | Object | 子图框 WCS 范围,包含 left、top、right、bottom |
| subFrameType | String | 子图框类型,平面图为 PLAN |
| object | Array | 房间数组 |
| object[].objId | String | 房间对象 ID |
| object[].wcsPoly | Array | 房间轮廓点数组 |
| object[].roomArea | Number | 房间面积 |
| object[].doorIds | String[] | 房间内门对象 ID 数组 |
| object[].windowIds | String[] | 房间内窗对象 ID 数组 |
仅返回 spaceId 不为 0、1 且不属于电梯空间的房间。
响应码
| code | 说明 |
|---|---|
| 200 | 请求成功 |
| 500 | 请求失败 |