GetCapabilities
説明
GetCapabilities サービスにより、展開済みのルーティング エンジンに関するメタデータを取得できます。メタデータを使用して、サービスとその機能を確認することで、ルーティング サービスを使用する際のエクスペリエンスを最適化できます。
この機能は、REST サービスでのみ使用できます。
HTTP GET URL 形式
HTTP GET 要求には次の形式を使用します。
http://<server>:<port>/rest/Spatial/erm/v1/capabilities.json
クエリ パラメータ
次の表に、GetCapabilities のクエリ パラメータを示します。
パラメータ | 必須 | 説明 |
---|---|---|
acceptVersions | オプション | プレースホルダー (機能しません) を指定します。 |
sections | オプション 省略した場合は、すべてのセクションに関する情報を返します。 |
サービス メタデータ ドキュメントで返す対象にするセクションの名前が 0 個以上含まれる、カンマ区切りの順不同リストを指定します。セクション値の大文字と小文字は区別されません。使用可能なセクション値は次のとおりです。
|
応答
OGC GetCapabilities と同じ応答が返ります。JSON 形式で、次のセクションがあります。
- serviceIdentification
- serviceProvider
- operationsMetadata
- データベース
serviceIdentification
このセクションには、この特定のサーバーに関する基本メタデータが含まれます。その内容の例を以下に示します。
"serviceIdentification":
{
"title": "PBS Routing Service",
"abstract": "Routing service maintained by PBS",
"keywords":
{
"keyword":
[
]
},
"serviceType": "Routing",
"serviceTypeVersion": "v1",
"fees": "none",
"accessConstraints": "none"
}
この情報は、getCapabilities.json 設定ファイルで得られるものと同じです。
また、このファイルは SpectrumDirectory\server\modules\routing から入手できます。変更内容を有効にするには、サーバーを再起動する必要があります。管理者は、JSON ファイル内のエントリで、ユーザが、表示、変更、削除を行える情報を決定できます。JSON ファイルのフィールドは、すべて省略可能です。
serviceProvider
このセクションには、このサーバーを運用する組織に関するメタデータが含まれます。その内容の例を以下に示します。
"serviceProvider":
{
"providerName": "Routing Service Provider",
"providerSite":
{
"href": "http://www.yourcompany.com/",
"type": "simple"
},
"serviceContact":
{
"contactInfo":
{
"address":
{
"administrativeArea": "Province",
"city": "City",
"country": "Country",
"deliveryPoint": "Mail Delivery Location",
"electronicMailaddress":"mailto://support@yourcompany.com",
"postalCode": "PostCode"
},
"contactInstructions": "Contact Instructions",
"hoursOfservice": "24 Hours",
"phone":
{
"facsimile": "1.800.000.0000",
"voice": "1.800.000.0000"
}
},
"individualName": "Contact Person",
"positionName": "Contact Person's Title",
"role": "Contact Person's Role"
}
}
このセクションも、上記の getCapabilities.json 設定ファイルを用いて設定されます。
operationsMetadataこのセクションには、操作を要求するための URL など、このサーバーによって実装されている操作に関するメタデータが含まれます。あらかじめ定められている次の操作またはサービスが、このセクションに記述されます。
- GetRoute: ポイント間サービス
- GetRouteCostMatrix: ポイント処理サービスのマトリクス
- GetTravelBoundary : 自動車または徒歩による移動時間、または距離の限界を生成します。
- DescribeDatasets: 設定済みデータセットに関する情報を提供
- DescribeDatabases: 設定済みのすべてのデータベースに関する情報を提供します。
- GetSegmentDataForPoint: ポイントのセグメント情報を返します。
- GetSegmentDataForSegment: セグメント ID のセグメント情報を返します。
- ListPersistentUpdates: サーバーに存在するすべての Persistent Update をリスト表示します。
- DeletePersistentUpdates: サーバーに存在する、すべての Persistent Update を削除します。
- SetPersistentUpdatesAtPoint: サーバーにある、指定したポイントの Persistent Update を保存します。
- SetPersistentUpdatesForSegment: サーバーにある、指定したセグメント ID の Persistent Update を保存します。
- SetPersistentUpdatesForRoadType: サーバーにある、指定した道路タイプの Persistent Update を保存します。
その内容の例を以下に示します。
{"operationsMetadata": [{
"name": "GetRoute",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=route&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=route&version=2"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetRouteCostMatrix",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=routeCostMatrix&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=routeCostMatrix&version=2"
}
},"parameter": {
"name": "OutputFormat",
"value": "text/json"}
},
{
"name": "GetTravelBoundary",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=travelBoundary&version=2",
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>.json?q=travelBoundary&version=2"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DescribeDatasets",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/v1/datasets.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DescribeDatabases",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/v1/databases.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetSegmentDataForPoint",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/segments.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "GetSegmentDataForSegment",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/segments/<segmentID>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "ListPersistentUpdates",
"DCP": {
"HTTP": {
"GET": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "DeletePersistentUpdates",
"DCP": {
"HTTP": {
"DELETE": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesAtPoint",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates.jason"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesForSegment",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates/segments/<segmentID>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
},
{
"name": "SetPersistentUpdatesForRoadType",
"DCP": {
"HTTP": {
"POST": "<schema>://<server>:<port>/rest/Spatial/erm/databases/<DB_NAME>/persistentUpdates/roadTypes/<roadtype>.json"
}
},
"parameter": {
"name": "OutputFormat",
"value": "text/json"
}
}
]
}
データベース
このセクションには、サーバーで設定済みのデータベースの名前のリストが含まれます。
例:
{
"databases":
[
"US_NE",
"US"
]}
データベースがサーバー上に設定されていない場合は、以下のものが返されます。
{
"databases":[
]
}