跳至主要內容 / Skip to main content
QGIS實戰:WMTS匯入HK GeoTiles歷史地圖
教學

QGIS實戰:WMTS匯入HK GeoTiles歷史地圖

HK GeoTiles約 2 分鐘閱讀16 次閱讀
GIS 技術能讓沉睡的香港老地圖在螢幕上重新「活」過來。透過 QGIS 與 WMTS 服務,您能流暢載入 HK GeoTiles 歷史圖資,徹底告別龐大圖檔的卡頓煩惱。立即掌握進階疊圖技巧,在現代底圖上動態比對百年地貌變遷,展開一場穿越時空的空間探險!
16

QGIS實戰:WMTS匯入HK GeoTiles歷史地圖

引言

放眼全球,很少有城市能像香港一樣,在短短百年間經歷如此劇烈的地貌變遷。從削山填海到高樓拔地而起,昔日的寧靜漁村與曲折海岸線,如今已化為繁華的都會中心與筆直的海堤。對於熱愛香港歷史與地理的讀者來說,追尋這些地貌變遷的軌跡,就像是一場穿越時空的探險。

然而,傳統的紙本歷史地圖雖然珍貴,但在研究與比對上卻充滿限制。紙本地圖不僅難以與現代地圖精準對齊,也無法疊加不同年份的資料來觀察動態變化。這正是 GIS(地理資訊系統)技術大顯身手的時候。透過數位化與空間校正,我們能讓沉睡在檔案館的老地圖在電腦螢幕上「活」過來。

這篇文章將帶領您使用強大且免費的開源軟體 QGIS,透過 WMTS(Web Map Tile Service)技術,輕鬆匯入 HK GeoTiles 提供的高畫質歷史地圖。無需下載龐大的圖檔,您就能在現代地圖上進行一場深度的歷史空間對話。

認識 HK GeoTiles 與 WMTS 技術

什麼是 HK GeoTiles?

HK GeoTiles 是一個專為香港歷史與地理數據打造的專業地圖磚服務平台。我們深知歷史圖資處理的繁瑣,因此團隊將珍貴的香港歷史地圖(例如戰前的地段測量圖、1960年代的舊版航空照片等),進行了極其精準的空間校正(Georeferencing)。

校正後的圖資不僅具備準確的地理座標,還被轉換為易於取用的「地圖磚」(Map Tiles)。無論您是開發者還是 GIS 使用者,都可以透過 HK GeoTiles 提供的 XYZ 磚服務,或是無縫整合至 Leaflet、QGIS 等平台,極大地降低了歷史空間數據的使用門檻。

為什麼選擇 WMTS (Web Map Tile Service)?

如果您曾經嘗試在 GIS 軟體中載入一張高解析度的巨型 TIF 檔,一定經歷過電腦嚴重卡頓、畫面重繪緩慢的痛苦。WMTS 就是為了解決這個問題而生的。

WMTS 的概念非常直觀:伺服器會預先將龐大的地圖切割成無數個 256x256 像素的小方塊(即「地圖磚」),並為不同的縮放層級(Zoom Levels)建立快取。當您在 QGIS 中瀏覽地圖時,軟體只會向伺服器請求「當下畫面範圍與縮放比例」所需的那幾塊地圖磚。相較於直接下載完整圖檔,WMTS 能大幅節省網路頻寬與電腦記憶體,提供極致流暢的瀏覽體驗。

準備工作與 QGIS 基礎設定

軟體安裝與環境準備

首先,請前往 QGIS 官方網站下載並安裝最新穩定版本(建議選擇 LTR 長期發佈版以確保穩定性)。安裝完成並開啟軟體後,點擊左上角的「新增專案」。您可以透過「設定」>「選項」>「一般」來確認介面語言是否已設定為您習慣的繁體中文。

取得 HK GeoTiles 的 WMTS 連結

要將 HK GeoTiles 的圖資匯入 QGIS,您需要一把「鑰匙」。請前往 HK GeoTiles 平台註冊或登入您的帳號,在您的儀表板或圖層庫中,找到您感興趣的歷史地圖,並複製其專屬的 WMTS 或 XYZ 服務網址(URL)。這串網址是串接外部地圖服務的核心。

設定正確的座標系統 (CRS)

這是許多香港地理資訊使用者常遇到的痛點——地圖偏移。在匯入圖層前,請務必確認專案的座標系統(CRS)。點擊 QGIS 右下角的 EPSG 代碼:


  • 如果您主要結合香港本地的政府開放數據,建議搜尋並設定為 EPSG:2326 (Hong Kong 1980 Grid)。

  • 如果您打算疊加 OpenStreetMap (OSM) 或 Google Maps 等全球性底圖,則可以設定為通用的 EPSG:3857 (Web Mercator)。


HK GeoTiles 的服務支援主流座標系統,能自動適應您的專案設定,避免歷史地圖跑到海中央的窘境。

實戰教學:在 QGIS 匯入 WMTS 圖層

步驟一:建立 WMTS 伺服器連線

  • 在 QGIS 左側的「瀏覽器」面板中,向下捲動找到「WMS/WMTS」選項。

  • 對著「WMS/WMTS」點擊滑鼠右鍵,選擇「新增連線...」。

  • 在彈出的視窗中,為這個連線命名(例如:HK GeoTiles 歷史地圖)。

  • 在「URL」欄位中,貼上您剛剛從 HK GeoTiles 複製的網址。

  • 若您的帳號需要驗證,請在下方的基本驗證區塊輸入帳號密碼,最後點擊「確定」。
  • (此處可想像插入一張 QGIS 新增 WMTS 連線的設定截圖)

    步驟二:選擇並載入歷史地圖圖層

    連線建立後,展開「瀏覽器」面板中的「WMS/WMTS」,您會看到剛建立的 HK GeoTiles 目錄。點開目錄,裡面會列出所有可用的歷史圖層。例如,您可以找到「1904年新界測量圖」或「1964年維多利亞港地圖」。只需按住滑鼠左鍵,將目標圖層直接拖曳到下方的「圖層」面板中,百年歷史的香港地貌就會瞬間躍然於螢幕之上。

    步驟三:常見問題排除

    • 問題一:載入緩慢或破圖? 這通常與網路連線有關。您可以對著圖層點擊右鍵 >「屬性」>「彩現」,適度調整網路快取設定;或者稍微放大/縮小畫面,強制 QGIS 重新請求地圖磚。
    • 問題二:畫面一片空白? 可能是您當前的地圖視野不在香港範圍內。只需在圖層面板對著該歷史圖層點擊右鍵,選擇「縮放至圖層範圍 (Zoom to Layer)」,畫面就會自動定位到歷史地圖的所在位置。

    歷史與現代的交錯:進階疊圖與應用

    結合現代底圖進行比對

    單看歷史地圖或許有些抽象,最有趣的玩法是將歷史與現代進行疊加。您可以透過 QGIS 的「XYZ Tiles」功能匯入 OpenStreetMap (OSM),或是匯入香港地政總署的現代數碼地圖作為底圖。將 HK GeoTiles 的歷史圖層置於現代底圖之上,空間的對話就此展開。

    實用 QGIS 技巧:透明度與地圖翻轉 (Swipe Tool)

    為了更清晰地觀察變遷,您可以使用以下兩個技巧:

  • 透明度調整:在歷史圖層的「屬性」>「透明度」中,將全局透明度調至 50%。這樣您可以同時看透歷史與現代的街道紋理。

  • Map Swipe Tool:這是一個極力推薦的 QGIS 外掛。安裝後,它會在畫面上產生一條滑桿。您可以像拉開窗簾一樣,左右或上下拖拉,動態比對海岸線的推移,視覺效果極佳。
  • 應用案例分享:啟德機場與九龍灣的變遷

    以著名的啟德機場為例。如果您載入 1920 年代的 HK GeoTiles 九龍地圖,您會發現當時的九龍灣仍是一片廣闊的海域,啟德一帶僅有初具規模的填海區。接著,利用 Map Swipe Tool 拉開現代底圖,您會震驚地看到昔日的海洋不僅長出了標誌性的 13 跑道,如今更演變成密集的啟德發展區與郵輪碼頭。這種透過 GIS 疊加所呈現的滄海桑田,是任何文字都難以完全描述的震撼。

    結論

    透過本文的教學,我們學習了如何使用 QGIS 結合 WMTS 技術,輕鬆將 HK GeoTiles 的歷史地圖匯入專案中。總結來說,只需三個核心步驟:設定正確座標、建立 WMTS 連線、拖曳載入圖層,您就能免去處理龐大圖檔的煩惱,享受流暢的歷史地圖探索體驗。

    我們非常鼓勵讀者親自下載 QGIS 動手嘗試!歷史不只存在於博物館的玻璃櫃裡,它就隱藏在我們每天走過的街道之下。當您透過疊圖發現了某個「消失的村落」或「被填平的海灣」時,歡迎截圖並在社群媒體上與我們分享您的發現。

    準備好展開您的香港時空之旅了嗎? 立即前往 HK GeoTiles 官網 探索更多不同年份與主題的珍貴圖層,或訂閱我們的服務,解鎖更進階、更高解析度的圖資使用權限,讓您的空間研究與專案更上一層樓!

    認識 HK GeoTiles 與 WMTS 技術
    認識 HK GeoTiles 與 WMTS 技術

    EN

    English Summary

    Hong Kong has experienced a remarkably rapid geographical transformation over the past century, evolving from quiet coastal fishing villages into a densely populated global metropolis through extensive land reclamation and urban development. For historians, geographers, and urban researchers, tracking these dramatic spatial changes is akin to a temporal exploration. However, traditional paper historical maps present significant limitations in this pursuit. Archival documents are invaluable, yet they cannot be easily aligned with contemporary geographies or dynamically overlaid with other datasets to observe urban evolution. This is where Geographic Information Systems (GIS) technology becomes essential. By digitizing and spatially calibrating these archival records, GIS allows dormant historical maps to be accurately projected onto modern digital interfaces, enabling precise and interactive comparative research.

    HK GeoTiles facilitates this temporal research by providing a dedicated platform for meticulously georeferenced historical map data of Hong Kong. Recognizing the technical hurdles involved in processing archival spatial data, the platform offers highly accurate digital versions of rare documents, such as pre-war lot surveys and 1960s aerial photography. Traditionally, loading high-resolution, uncompressed image files like massive TIFFs into GIS software causes severe performance degradation, memory overload, and slow rendering times. HK GeoTiles resolves this bottleneck by utilizing Web Map Tile Service (WMTS) technology. Instead of forcing users to download entire map files, the server pre-renders the heavy imagery into thousands of small, highly optimized pixel tiles cached across various zoom levels. When a user navigates the map in software like QGIS, the system only requests the specific tiles required for the current viewing area and zoom scale. This approach drastically reduces bandwidth consumption and processing power, democratising access to complex historical spatial data for developers and GIS users alike.

    Integrating these historical resources into a QGIS workflow is a straightforward process that yields powerful analytical capabilities. The foundational step requires users to configure the correct Coordinate Reference System (CRS) for their project to prevent spatial misalignment, a common issue when handling localized historical data. HK GeoTiles seamlessly supports major coordinate systems, allowing users to confidently set their workspace to EPSG:2326 when working alongside local Hong Kong government open data, or EPSG:3857 when overlaying global basemaps like OpenStreetMap. Once the CRS is established, users simply create a new WMS/WMTS connection in the QGIS browser using a unique service URL generated from their HK GeoTiles dashboard. After authenticating, the directory of available historical layers becomes instantly accessible. Users can effortlessly drag and drop century-old maps directly into their layer panel, instantly projecting historical geographies onto their screen. Should any rendering delays occur, users can easily resolve them by adjusting network cache settings or utilizing the software's native zoom-to-layer functions to accurately frame the historical boundaries.

    The true analytical value of this workflow emerges when these historical tiles are overlaid onto modern digital basemaps, creating a dynamic spatial dialogue across time. To clearly observe the shifting urban footprint, users can utilize global transparency settings within QGIS, lowering the opacity of the historical layer to simultaneously view past and present street networks. For an even more compelling visual analysis, the Map Swipe Tool plugin is highly recommended. This feature introduces an interactive slider to the workspace, allowing researchers to dynamically drag across the screen to reveal the dramatic progression of coastlines and infrastructure. A prime example of this application is the spatial analysis of the Kowloon Bay and Kai Tak Airport area. By overlaying 1920s map data—which depicts a vast expanse of open water and nascent reclamation—onto contemporary basemaps, users can visually comprehend how the ocean was systematically transformed into a massive runway and, eventually, a modern cruise terminal and commercial district. Through the seamless integration of QGIS and HK GeoTiles, international GIS professionals and history enthusiasts are equipped with the precise tools needed to uncover the forgotten geographies hidden beneath modern Hong Kong, elevating their spatial research and historical projects to new heights.

    QGIS教學
    HK GeoTiles
    歷史地圖
    WMTS
    香港地貌
    GIS疊圖
    16
    H

    HK GeoTiles

    HK GeoTiles 撰稿人

    致力於整理及分享香港歷史地圖磚資源,讓公眾更容易取用珍貴的地理資訊。

    載入附件中…

    相關文章

    查看全部