WFS - Get Collection Definition

使用取得集合的詳細數據模型。

Get Collection Definition API 是 HTTP GET 要求,可提供指定集合的詳細數據模型。

WFS API 遵循 Open Geospatial Consortium API standard for Features to query Datasets

數據集是由多個功能集合所組成。 功能集合是以通用架構為基礎的類似類型特徵集合。

###Submit 取得集合定義要求

GET https://{geography}.atlas.microsoft.com/wfs/datasets/{datasetId}/collections/{collectionId}/definition?api-version=2.0

URI 參數

名稱 位於 必要 類型 Description
collectionId
path True

string

特定集合的標識碼 (名稱)

datasetId
path True

string

要從中查詢之數據集的標識碼。

geography
path True

string

此參數會指定 Azure 地圖服務 Creator 資源所在的位置。 有效值為us和 eu。

api-version
query True

string

Azure 地圖服務 API 的版本號碼。

要求標頭

名稱 必要 類型 Description
x-ms-client-id

string

指定哪個帳戶與 Microsoft Entra ID 安全性模型搭配使用。 它代表 Azure 地圖服務 帳戶的唯一標識符,而且可以從 Azure 地圖服務 管理平面帳戶 API 擷取。 若要在 Azure 地圖服務 中使用 Microsoft Entra ID 安全性,請參閱下列文章以取得指引。

回應

名稱 類型 Description
200 OK

CollectionDefinition

確定

Other Status Codes

ErrorResponse

發生意外錯誤。

安全性

AADToken

這些是 Microsoft Entra OAuth 2.0 流程。 與 Azure 角色型存取控制配對時,可用來控制對 #DB389AA15034B49779F208580DD3CD5A6 REST API 的存取。 Azure 角色型訪問控制可用來指定一或多個 Azure 地圖服務 資源帳戶或子資源的存取權。 任何使用者、群組或服務主體都可以透過內建角色或由一或多個許可權組成的自定義角色來授與存取權,以 Azure 地圖服務 REST API。

若要實作案例,建議您檢視 驗證概念。 總而言之,此安全性定義會透過能夠針對特定 API 和範圍進行訪問控制的物件,提供將應用程式模型化 () 的解決方案。

備註

  • 此安全性定義需要使用x-ms-client-id 標頭來指出應用程式要求存取權 Azure 地圖服務 資源。 這可以從 地圖管理 API 取得。

Authorization URL專屬於 Azure 公用雲端實例。 主權雲端具有唯一的授權 URL 和 Microsoft Entra ID 設定。 * 透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 Azure 管理平面設定 Azure 角色型存取控制。 * Azure 地圖服務 Web SDK 的使用方式允許針對多個使用案例設定應用程式設定。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名稱 Description
https://atlas.microsoft.com/.default https://atlas.microsoft.com/.default

subscription-key

這是在 Azure 入口網站 或使用PowerShell、CLI、Azure SDK 或 REST API 建立 Azure 地圖服務 帳戶時所佈建的共用密鑰。

使用此金鑰,任何應用程式都可以存取所有 REST API。 換句話說,此金鑰可作為發行所在帳戶中的主要金鑰。

對於公開的應用程式,我們建議使用機密用戶端應用程式方法來存取 Azure 地圖服務 REST API,以便安全地儲存您的密鑰。

Type: apiKey
In: query

SAS Token

這是透過 Azure 入口網站、PowerShell、CLI、Azure SDK 或 REST API,從 Azure 地圖服務 資源上的列出 SAS 作業建立的共用存取簽章令牌。

使用此令牌時,任何應用程式都有權使用 Azure 角色型訪問控制進行存取,並更精細地控制到期、速率和區域 (特定令牌的使用) 。 換句話說,SAS 令牌可用來允許應用程式以比共用密鑰更安全的方式來控制存取。

對於公開的應用程式,我們建議在 地圖帳戶資源 上設定允許的來源特定清單,以限制轉譯濫用,並定期更新 SAS 令牌。

Type: apiKey
In: header

範例

GetCollectionDefinition

Sample Request

GET https://us.atlas.microsoft.com/wfs/datasets/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/definition?api-version=2.0

Sample Response

{
  "idPrefix": "UNIT",
  "name": "unit",
  "description": "A physical and non-overlapping area which might be occupied and traversed by a navigating agent. Can be a hallway, a room, a courtyard, etc. It is surrounded by physical obstruction (wall), unless the isOpenArea attribute is equal to true, and one must add openings where the obstruction shouldn't be there. If isOpenArea attribute is equal to true, all the sides are assumed open to the surroundings and walls are to be added where needed. Walls for open areas are represented as a lineElement or areaElement with isObstruction equal to true.",
  "ontology": "Facility-2.0",
  "geometryType": "Polygon",
  "featureTypes": [],
  "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": "navigableBy",
      "required": false,
      "type": {
        "array": {
          "enum": [
            "pedestrian",
            "wheelchair",
            "machine",
            "bicycle",
            "automobile",
            "hiredAuto",
            "bus",
            "railcar",
            "emergency",
            "ferry",
            "boat"
          ]
        }
      }
    },
    {
      "name": "isRoutable",
      "required": false,
      "type": "boolean"
    },
    {
      "name": "routeThroughBehavior",
      "required": false,
      "type": {
        "enum": [
          "disallowed",
          "allowed",
          "preferred"
        ]
      }
    },
    {
      "name": "nonPublic",
      "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/wfs/dataset/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/definition?api-version=2.0",
      "rel": "self",
      "title": "Metadata catalogue for unit"
    },
    {
      "href": "https://us.atlas.microsoft.com/wfs/dataset/218fda98-e638-0edf-5ef7-28491ff3bed4/collections/unit/items?api-version=2.0",
      "rel": "data",
      "title": "unit"
    }
  ]
}

定義

名稱 Description
CollectionDefinition

GeoJSON 功能的集合

DefinitionProperty
ErrorAdditionalInfo

資源管理錯誤其他資訊。

ErrorDetail

錯誤詳細數據。

ErrorResponse

錯誤回應

GeoJsonGeometryType

傳回的幾何類型

WFSEndpointLink

其他 WFS 端點的連結

CollectionDefinition

GeoJSON 功能的集合

名稱 類型 Description
description

string

描述集合

featureTypes

string[]

傳回的功能類型

geometryType

GeoJsonGeometryType

傳回的幾何類型

idPrefix

string

使用的集合前置詞

links

WFSEndpointLink[]

其他 WFS 端點的連結。

name

string

例如,URI 中所使用的集合標識符

ontology

string

此數據集的本體版本。

properties

DefinitionProperty[]

所使用集合的屬性

title

string

集合的標題

DefinitionProperty

名稱 類型 Description
name

string

屬性的名稱

required

boolean

是必要屬性

type

object

屬性的類型

ErrorAdditionalInfo

資源管理錯誤其他資訊。

名稱 類型 Description
info

object

其他資訊。

type

string

其他信息類型。

ErrorDetail

錯誤詳細數據。

名稱 類型 Description
additionalInfo

ErrorAdditionalInfo[]

錯誤其他資訊。

code

string

錯誤碼。

details

ErrorDetail[]

錯誤詳細資料。

message

string

錯誤訊息。

target

string

錯誤目標。

ErrorResponse

錯誤回應

名稱 類型 Description
error

ErrorDetail

錯誤物件。

GeoJsonGeometryType

傳回的幾何類型

名稱 類型 Description
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 幾何。

其他 WFS 端點的連結

名稱 類型 Description
href

string

鏈接目標。

hreflang

string

指出取值連結結果語言的提示。

rel

string

關聯類型。

title

string

用來標記連結的目的地,使其可作為人類可讀取的標識碼 (例如,如果存在) ,則以 Content-Language 標頭欄位所指示的語言) 菜單項 (。

type

string

提示,指出取值連結結果的媒體類型應該是什麼。