# 6.1 WMTS

臺北市政府都市發展局於 101 年建置完成「臺北市歷史圖資展示系統」，提供民眾、 產官學以及機關單位可透過系統查詢及瀏覽臺北市多時期的基本圖資。為提供使用者更 多元的圖資使用方式，本局利用 OGC (Open Geospatial Consortium) 的 WMTS （Web Map Tile Service）圖磚服務，提供 Google Maps 相容規格（EPSG:3857）與 台灣通用的 TWD97（EPSG:3826）兩種坐標格式，配合內政部地理圖磚服務準則（草 案），提供各界更開放之圖資標準，以增加資料流通性及價值性。

### 一、服務網址

1. (EPSG:3857) <https://historygis.udd.gov.taipei/WMTS/>
2. (EPSG:3826) <https://historygis.udd.gov.taipei/WMTS_97/>           &#x20;

### 二、服務項目

1. 臺北市多時期數值地形圖資WMTS服務。
2. 臺北市多時期航測影像圖資WMTS服務。
3. 臺北市多時期歷史類比(掃描)圖資WMTS服務。                                           &#x20;

### 三、使用對象：不限。

### 四、使用限制

1. 不得自行重製拷貝或交付轉供第三方使用。
2. 為維護共同使用者權益，使用本服務時不得於短時間內連續進行大量批次查詢及取圖。
3. 使用本項服務時，介接單位不得擅自對外流通發布予其他第三方使用，如因第三方使用行為而導致任何民眾或機關權益受損者，應由介接單位負一切法律責任。
4. 本服務資料，不得對外轉載、複製、流通或違反個人資料保護法及相關法令等規定，若有違反之情事導致任何民眾或機關權益受損者，由介接單位負一切法律責任。
5. 違反上述規定者，經本局確認違規情事屬實後，將立即終止對該 IP 位址的服務。

### 五、歷史圖資圖磚服務(WMTS)發布清單：

若欲使用程式介接「<mark style="color:$primary;">**最新版**</mark>」地形圖或航測影像圖磚，建議可選用以下表列<mark style="color:$primary;">**紅色粗體之圖層**</mark>，以避免每年有新版圖資上架時須修改網頁程式、調整服務網址。

　1. Google Maps 相容（EPSG: 3857）

<figure><img src="/files/HTGMakuf0hWE111RDi2P" alt=""><figcaption></figcaption></figure>

　2. TWD97 坐標系統（EPSG:3826）

<figure><img src="/files/8xMYD2VfJZqCFcb9qLp2" alt=""><figcaption></figcaption></figure>

### 六、圖資介接方法

#### 1. 使用 ESRI ArcGIS Desktop (ArcMap)

&#x20;圖層選定->GIS Server

<figure><img src="/files/kLYLr8iqvNDSYZZ860n9" alt=""><figcaption></figcaption></figure>

URL <https://www.historygis.udd.gov.taipei/WMTS/> 及 Get Layers

<figure><img src="/files/tAvSgMIiWHY6wqLwLVkc" alt=""><figcaption></figcaption></figure>

選定介接的圖層->以101年版地形圖為例

<figure><img src="/files/ucm75djocGpIkELCrL0c" alt=""><figcaption></figcaption></figure>

載入101年版地形圖的圖磚服務

<figure><img src="/files/Ccakp29S2PTiphd1rZug" alt=""><figcaption></figcaption></figure>

#### 2.使用 QGIS Desktop

圖層->加入 WMTS 圖層

<figure><img src="/files/PZpr22TBnpR1M4s6c76P" alt=""><figcaption></figcaption></figure>

輸入連線名稱及 URL <https://www.historygis.udd.gov.taipei/WMTS/>

<figure><img src="/files/l6W1iKXnB46LiwM9bevl" alt=""><figcaption></figcaption></figure>

選定 101 年版地形圖的圖磚服務

<figure><img src="/files/HhUTTA7msrEDGh19hgN3" alt=""><figcaption></figcaption></figure>

載入 101 年版地形圖的圖磚服務

<figure><img src="/files/gFN1lgGbfhMvJi6D76TJ" alt=""><figcaption></figcaption></figure>

#### 3. 使用 ArcGIS API for JavaScript 3.X 介接 WMTS 服務

依據 ESRI 官網文件之說明，有兩種介接方法：

(1) 使用 resourceInfo、tileInfo物件手動填入所有WMTS圖磚參數，官網參考範例：<https://developers.arcgis.com/javascript/3/jssamples/layers_wmtslayerresourceinfo.html>

(2) 準備一支proxy網頁，透過該網頁向WMTS網站發出GetCapabilities請求並取回相關圖磚參數，而後便可以取用圖磚影像，官網提供的 proxy source code：<https://github.com/Esri/resource-proxy>

以下範例為使用ASP.Net開發、IIS架站之參考程式碼（使用上述之方法(2)），可適用所有各家WMTS服務（例如中研院百年歷史地圖、內政部測繪中心通用版地圖WMTS…）

範例檔下載：<https://www.historygis.udd.gov.taipei/testWMTS/testWMTS.zip>

測試網址：<https://www.historygis.udd.gov.taipei/testWMTS/testWMTS.html>

程式碼說明（以107年航測影像為例）：

給定以下三個參數，建構 WMTSLayer：

a.      WMTS URL：本說明文件第一項之服務網址(可為3857或3826)

b.     圖層ID：本說明文件第五項服務清單之Layer\_ID欄位

c.      圖磚集名稱：GoogleMapsCompatible

![](/files/-MVzKvbkOqfZHEdIk_Ko)

### 七、介接文件下載

詳細說明請下載以下文件：

{% file src="/files/iZiOrXbfZRDacbcoCIQF" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://uddtp.gitbook.io/tpgis/ch6/6.1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
