CoolFace
Datasetpublic

yhzkiki/taiwan-dtm-2025-terrarium-z13

2025 年版全臺灣 20 m DTM — Terrarium z13 這個 Dataset 將內政部公開的 2025 年版全臺灣 20 公尺網格數值地形模型(DTM)轉為 ShadeMap 可直接讀取的 Terrarium RGB XYZ tiles。 官方資料來源:https://data.gov.tw/dataset/176927 原始資料授權:政府資料開放授權條款-第 1 版。本 repository 為衍生格式,請保留官方來源與授權資訊。 內容 terrain/13/{x}/{y}.png:256×256 RGB PNG,XYZ / Web Mercator tile addressing。 tile-index.csv:每張 tile 的區域、有效像素比例、來源高程範圍與 Terrarium 量化誤差。 build-summary.json:建置摘要。 source-manifest.json:原始 ZIP/TIFF SHA-256、解析度、範圍與 CRS 決策。… See the full description on the dataset page: https://huggingface.co/datasets/yhzkiki/taiwan-dtm-2025-terrarium-z13.

sourceHugging Faceotherupdated 14d agoView on Hugging Face
0likes304downloads
Dataset Card

2025 年版全臺灣 20 m DTM — Terrarium z13

這個 Dataset 將內政部公開的 2025 年版全臺灣 20 公尺網格數值地形模型(DTM)轉為 ShadeMap 可直接讀取的 Terrarium RGB XYZ tiles。

官方資料來源:<https://data.gov.tw/dataset/176927>

原始資料授權:政府資料開放授權條款-第 1 版。本 repository 為衍生格式,請保留官方來源與授權資訊。

內容

  • —terrain/13/{x}/{y}.png:256×256 RGB PNG,XYZ / Web Mercator tile addressing。
  • —tile-index.csv:每張 tile 的區域、有效像素比例、來源高程範圍與 Terrarium 量化誤差。
  • —build-summary.json:建置摘要。
  • —source-manifest.json:原始 ZIP/TIFF SHA-256、解析度、範圍與 CRS 決策。
  • —validation-samples.csv:臺灣本島、澎湖、金門抽樣反解驗證。
  • —tools/:重建、驗證、Hugging Face 上傳工具。

Terrarium 編碼

解碼公式:

text
elevation_m = R * 256 + G + B / 256 - 32768

本資料集只發佈 z13。20 m 原始 DTM 在臺灣緯度與 z13 的地面像素尺度相近,因此不假裝提高原始資料解析度。ShadeMap 在 z14–z17 時可將 z13 terrain overzoom 使用。

NoData / 海面處理

官方 raster 的 NoData 為 -32767。為避免沿海 ShadeMap 因 tile 404 或極端負高程出錯:

  • —每個原始 raster 矩形覆蓋到的 z13 tile 都會存在;
  • —raster 有資料的像素使用官方 DTM;
  • —raster NoData 像素在 terrain surface 中編碼為 0 m;
  • —完全沒有官方有效像素的矩形內 tile 也是 0 m 海面 tile。

因此這些 0 m 像素是 terrain continuity policy,不應被當成官方點位高程觀測值。

CRS 注意事項

臺灣本島 GeoTIFF 的投影參數為 121° 中央經線,建置使用 EPSG:3826。

澎湖與金門 GeoTIFF 的投影參數為 119° 中央經線;若用 EPSG:3826 會整體向東偏約 2°,與實際島嶼位置不符,因此建置使用 EPSG:3825。下載包中的 Metadata.xml 對三區都標示 EPSG:3826,與澎湖、金門 raster 本身的投影參數不一致;此建置以 GeoTIFF projection parameters 與可驗證的地理位置為準。

ShadeMap URL

直接由 Hugging Face 讀取時可使用:

text
https://huggingface.co/datasets/<ACCOUNT>/<REPO>/resolve/main/terrain/{z}/{x}/{y}.png

本專案建議前面再放 Cloudflare Worker cache:

text
https://<worker>.workers.dev/terrain/{z}/{x}/{y}.png

並在 Worker 設定:

text
TERRAIN_HF_BASE_URL=https://huggingface.co/datasets/<ACCOUNT>/<REPO>/resolve/main/terrain

建置日期

2026-09-14