你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Features - Get Collection Definition

使用 获取指定特征集合的详细数据模型。

功能 API 是 Creator 的一部分,它允许使用 Azure Maps API 和 SDK 基于专用室内地图数据开发应用程序。 功能 GET API 遵循开放地理空间联盟 API - 功能 - 第 1 部分:查询数据集的核心更正标准。 数据集由多个特征集合组成,这些功能集合是通用架构定义的 特征 分组。

提交获取集合定义请求

API Get Collection Definition 是一个 HTTP GET 请求,它返回由提供的 collectionId定义的特征集合的详细数据模型。

GET https://{geography}.atlas.microsoft.com/features/datasets/{datasetId}/collections/{collectionId}/definition?api-version=2023-03-01-preview

URI 参数

名称 必需 类型 说明
collectionId
path True

string

标识符 (特定集合的名称) 。

datasetId
path True

string

要从中查询的数据集的标识符。

geography
path True

string

此参数指定 Azure Maps Creator 资源所在的位置。 有效值为 us 和 eu。

api-version
query True

string

Azure Maps API 的版本号。

请求头

名称 必需 类型 说明
x-ms-client-id

string

指定要与Microsoft Entra ID安全模型结合使用的帐户。 它表示Azure Maps帐户的唯一 ID,可从Azure Maps管理平面帐户 API 检索。 若要在 Azure Maps 中使用Microsoft Entra ID安全性,请参阅以下文章以获取指导。

响应

名称 类型 说明
200 OK

CollectionDefinitionResult

正常

Other Status Codes

ErrorResponse

发生了意外错误。

安全性

AADToken

这些是 Azure Active Directory OAuth2 流。 与 Azure 基于角色的访问控制配对时,它可用于控制对Azure Maps REST API 的访问。 Azure 基于角色的访问控制用于指定对一个或多个Azure Maps资源帐户或子资源的访问权限。 可以通过内置角色或由一个或多个权限组成的自定义角色授予任何用户、组或服务主体的访问权限,以Azure Maps REST API。

若要实现方案,建议查看 身份验证概念。 总之,此安全定义提供了一种解决方案,用于通过能够对特定 API 和作用域进行访问控制的对象对应用程序 () 建模。

备注

  • 此安全定义需要使用x-ms-client-id 标头来指示应用程序请求访问的Azure Maps资源。 这可以从 地图管理 API 获取。

Authorization URL特定于 Azure 公有云实例。 主权云具有唯一的授权 URL 和 Azure Active Directory 配置。 * Azure 基于角色的访问控制是通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 从 Azure 管理平面配置的。 * 使用 Azure Maps Web SDK 允许针对多个用例对应用程序进行基于配置的设置。

  • 目前,Azure Active Directory v1.0 或 v2.0 支持工作、学校和来宾,但不支持个人帐户。

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

这是在通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API 通过 Azure 管理平面创建Azure Maps资源时预配的共享密钥。

使用此密钥,任何应用程序都有权访问所有 REST API。 换而言之,这些密钥当前可被视为为其颁发帐户的主密钥。

对于公开的应用程序,我们建议使用服务器到服务器访问Azure Maps REST API,可在其中安全存储此密钥。

类型: apiKey
在: query

SAS Token

这是一个共享访问签名令牌,通过 Azure 门户、PowerShell、CLI、Azure SDK 或 REST API,通过 Azure 管理平面在Azure Maps资源上列出 SAS 操作创建。

使用此令牌,任何应用程序都有权使用 Azure 基于角色的访问控制进行访问,并精细控制特定令牌的过期、速率和区域 () 。 换句话说,SAS 令牌可用于允许应用程序以比共享密钥更安全的方式控制访问。

对于公开的应用程序,我们建议在 Map 帐户资源 上配置允许的来源的特定列表,以限制呈现滥用,并定期续订 SAS 令牌。

类型: apiKey
在: header

示例

GetCollectionDefinition

示例请求

GET https://us.atlas.microsoft.com/features/datasets/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/definition?api-version=2023-03-01-preview

示例响应

{
  "id": "unit",
  "title": "Unit",
  "description": "The unit feature class defines a physical and non-overlapping area that can be occupied and traversed by a navigating agent. A unit can be a hallway, a room, a courtyard, and so on.",
  "ontology": "Facility-2.0",
  "geometryType": "Polygon",
  "properties": [
    {
      "name": "externalId",
      "required": false,
      "type": "text"
    },
    {
      "name": "originalId",
      "required": false,
      "type": "text"
    },
    {
      "name": "categoryId",
      "required": true,
      "type": {
        "featureId": "category"
      }
    },
    {
      "name": "isOpenArea",
      "required": false,
      "type": "boolean"
    },
    {
      "name": "isRoutable",
      "required": false,
      "type": "boolean"
    },
    {
      "name": "levelId",
      "required": true,
      "type": {
        "featureId": "level"
      }
    },
    {
      "name": "occupants",
      "required": false,
      "type": {
        "array": {
          "featureId": "directoryInfo"
        }
      }
    },
    {
      "name": "addressId",
      "required": false,
      "type": {
        "featureId": "directoryInfo"
      }
    },
    {
      "name": "addressRoomNumber",
      "required": false,
      "type": "text"
    },
    {
      "name": "name",
      "required": false,
      "type": "text"
    },
    {
      "name": "nameSubtitle",
      "required": false,
      "type": "text"
    },
    {
      "name": "nameAlt",
      "required": false,
      "type": "text"
    },
    {
      "name": "anchorPoint",
      "required": false,
      "type": {
        "geometry": [
          "Point"
        ],
        "isFragmented": false,
        "srid": 4326
      }
    }
  ],
  "links": [
    {
      "href": "https://us.atlas.microsoft.com/features/datasets/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/definition",
      "rel": "self",
      "title": "Metadata catalogue for unit"
    },
    {
      "href": "https://us.atlas.microsoft.com/features/datasets/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/items",
      "rel": "items",
      "title": "Unit"
    }
  ]
}

定义

名称 说明
CollectionDefinitionResult

成功请求读取集合的定义后响应。

DefinitionProperty

集合中属性的定义。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

FeaturesEndpointLink

指向其他功能终结点的链接。 有关链接关系的更多详细信息,请访问 OGC API - 功能 - 第 1 部分 标准。

GeoJsonGeometryType

返回的几何图形的类型。

CollectionDefinitionResult

成功请求读取集合的定义后响应。

名称 类型 说明
description

string

描述集合。

geometryType

GeoJsonGeometryType

返回的几何图形的类型。

id

string

使用的集合的标识符,例如在 URI 中。

itemType

string

集合中项的类型。

links

FeaturesEndpointLink[]

指向其他功能终结点的链接。

ontology

string

此数据集的本体版本。

properties

DefinitionProperty[]

所用集合的属性。

title

string

集合的标题。

DefinitionProperty

集合中属性的定义。

名称 类型 说明
name

string

属性的名称。

required

boolean

属性是必需的。

type

object

属性的类型。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

指向其他功能终结点的链接。 有关链接关系的更多详细信息,请访问 OGC API - 功能 - 第 1 部分 标准。

名称 类型 说明
href

string

链接目标。

rel

string

关系类型。

title

string

用于标记链接的目标,以便它可以用作用户可读标识符 (例如,菜单项) 内容语言标头字段指示的语言 ((如果存在) )。

GeoJsonGeometryType

返回的几何图形的类型。

名称 类型 说明
GeometryCollection

string

GeoJSON GeometryCollection 几何。

LineString

string

GeoJSON LineString 几何。

MultiLineString

string

GeoJSON MultiLineString 几何。

MultiPoint

string

GeoJSON MultiPoint 几何。

MultiPolygon

string

GeoJSON MultiPolygon 几何。

Point

string

GeoJSON Point 几何。

Polygon

string

GeoJSON Polygon 几何。