CityGMLファイルのURLリストを取得
const url = 'https://api.plateauview.mlit.go.jp/datacatalog/citygml/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.plateauview.mlit.go.jp/datacatalog/citygml/example指定した範囲に含まれるCityGMLファイルのURLリストを取得します。
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”地理的なエリアや都市の情報をフィルタリングするための条件。詳細はドキュメント参照。
使用例: m:533945, s:spatialID, r:135.5,35.0, g:locationName
Query Parameters
Section titled “Query Parameters ”取得する地物型をカンマ区切りで指定。指定しない場合は全ての地物型を取得する。
主な地物型:
bldg: 建築物モデルtran: 交通(道路)モデルluse: 土地利用モデルdem: 地形モデルfld: 洪水浸水想定区域モデルlsld: 土砂災害警戒区域モデルurf: 都市計画決定情報モデル
使用例: types=bldg,tran
:conditionsパラメータは以下の条件タイプに対応している。
-
メッシュコード (
m)-
概要: カンマ区切りで複数のメッシュコードに基づいてエリアを指定。2次メッシュ(6桁)・3次メッシュ(8桁)・1/2メッシュ(9桁)・1/4メッシュ(10桁)に対応する。メッシュコードはハイフンで区切らず数値だけで表すこと。
-
形式:
m:<メッシュコード> -
例:
m:533944,533945https://api.plateauview.mlit.go.jp/datacatalog/citygml/m:533935
-
-
メッシュコード厳密検索 (
mm)-
概要: 1とほぼ同じだが、1と比べ、メッシュコードの桁数が完全に一致するCityGMLのみを取得する。2次メッシュの場合は2次メッシュのデータセットのみが、3次メッシュの場合は3次メッシュのCityGMLのみがヒットする。
-
形式:
mm:<メッシュコード> -
例:
mm:533944,533945https://api.plateauview.mlit.go.jp/datacatalog/citygml/mm:533935
-
-
空間ID (
s)-
概要: カンマ区切りで複数の空間IDを使用してエリアを指定。
-
形式:
s:<空間ID>,<空間ID>,...- 空間IDは、
z/x/y、z/f/x/y、/z/x/y、/z/f/x/y、およびタイルハッシュの表記に対応。
- 空間IDは、
-
例
(
z/f/x/y)
-
-
座標範囲 (
r)-
概要: 座標範囲を指定してエリアを指定。
-
形式:
-
2要素(
lng,lat)で中心点を指定する場合:r:lng,lat -
4要素(
lng1,lat1,lng2,lat2)で範囲を指定する場合:r:lng1,lat1,lng2,lat2注意:
lng1<lng2,lat1<lat2となるように指定する必要がある。
-
-
例:
-
中心点の指定:
r:139.7375,35.65833333333333https://api.plateauview.mlit.go.jp/datacatalog/citygml/r:139.7385,35.65933333333333
-
範囲の指定:
r:139.7375,35.65833333333333,139.74,35.66https://api.plateauview.mlit.go.jp/datacatalog/citygml/r:139.7375,35.65833333333333,139.74,35.66
-
-
-
ジオコーディング (
g)-
概要: ジオコーディングAPIを用いてエリアを指定する。
-
形式:
g:<ロケーション名> -
例:
g:千代田区https://api.plateauview.mlit.go.jp/datacatalog/citygml/g:千代田区
-
-
自治体コード
-
概要: カンマ区切りで複数の自治体コードを指定する。
-
形式:
cityId1,cityId2,... -
例:
13999https://api.plateauview.mlit.go.jp/datacatalog/citygml/13999
-
Responses
Section titled “ Responses ”成功時のレスポンス
object
The unique code representing the city.
The name of the city.
A map of feature types available in the CityGML data.
object
object
The name of the feature type.
A map of CityGML file lists grouped by type.
object
object
The mesh code representing the geographic area.
The total number of features in the CityGML file.
The file size in bytes.
The number of features with LOD0, or null if not available.
The number of features with LOD1, or null if not available.
The number of features with LOD2, or null if not available.
The number of features with LOD3, or null if not available.
The number of features with LOD4, or null if not available.
The maximum Level of Detail (LOD) available for the CityGML file.
The URL to access this specific CityGML file.
The year of registration for the CityGML data.
The specification of the CityGML data.
The URL for accessing the CityGML data.
The year associated with the CityGML data.
Example generated
{ "cityCode": "example", "cityName": "example", "featureTypes": { "additionalProperty": { "name": "example" } }, "files": { "additionalProperty": [ { "code": "example", "features": 1, "fileSize": 1, "lod0": 1, "lod1": 1, "lod2": 1, "lod3": 1, "lod4": 1, "maxLod": 1, "url": "https://example.com" } ] }, "metadataZipUrls": [ "https://example.com" ], "registrationYear": 1, "spec": "example", "url": "https://example.com", "year": 1}リソースが見つからない
object
エラーメッセージ
エラーの原因
エラーが発生したURL
Example generated
{ "error": "example", "reason": "example", "url": "example"}