🗺️ オープン地図アーカイブ
台湾のかたち
SVG・GeoJSON・TopoJSON — 開発者・デザイナー・研究者のためのオープンソース地図データ集。
台湾のかたちが大事な理由
どんな AI 画像生成ツールに台湾を描かせても、出てくるのはだいたいオリーブとジャガイモの中間のような丸い塊です。台湾はオリーブではありません。394 キロメートルの細長いサツマイモで、中央山脈が南北を貫き、離島が 100 以上あります。
かたちを正確に描くのは、デザインの細部ではなく、アイデンティティの問題です。このページでは taiwan.md で使っているオープンソース地図素材をすべて集めています。
🤖 vs. 🇹🇼 — AI はいつも間違える
📐 SVG 輪郭 — すぐ使える
厳選した 4 つの SVG ファイル、すべて CC 或いはパブリックドメイン。あらゆる Web サイト、アプリ、デザインファイルに直接使えます。
使い方
<!-- HTML -->
<img src="https://taiwan.md/assets/svg/taiwan-icon-wiki.svg" alt="Taiwan" width="200">
/* CSS */
background-image: url('https://taiwan.md/assets/svg/taiwan-icon-wiki.svg');
<!-- Markdown -->
 SVG はすべて Creative Commons またはパブリックドメインです。帰属表示は歓迎しますが必須ではありません。
🌐 TopoJSON — 県市レベルのインタラクティブ地図
インタラクティブ地図を作るには SVG パスではなく、地理座標データが必要です。Waiting の taiwan-vue-components(MIT ライセンス、2018)から抽出した TopoJSON ファイルを同梱しています。
TopoJSON は GeoJSON の圧縮版です。隣接する行政区が共有する境界線を一度だけ保存するため、ファイルサイズが 80% 小さくなります。topojson-client でオンザフライで GeoJSON に変換できます。
TopoJSON と GeoJSON の使い分け
TopoJSON:ファイルサイズが小さく、隣接区域が境界を共有する。Web インタラクティブ地図に最適。
GeoJSON:シンプル、Python geopandas、QGIS などの GIS ツールと互換性あり。
国レベルの輪郭(22 県市)
約 21 KB の TopoJSON。22 の県市と直轄市がそれぞれ独立した feature。Choropleth 地図の出発点。
taiwan-country.topo.json六直轄市の町丁目レベル
台北、新北、桃園、台中、台南、高雄の六直轄市の町丁目レベル TopoJSON を同梱しています。他の 16 県市は GitHub リポジトリをご覧ください。
taiwan-towns-63000.topo.json taiwan-towns-64000.topo.json taiwan-towns-65000.topo.json taiwan-towns-66000.topo.json taiwan-towns-67000.topo.json taiwan-towns-68000.topo.json 22 県市全体の町丁目ファイルは github.com/waiting7777/taiwan-vue-components.
🧭 行政区コード対照表
台湾の行政区は数字コードで識別されます。22 の県市レベル行政区の対照表です(ファイル命名:`towns-{code}.json`)。
| コード | 行政区 | 種別 |
|---|---|---|
63000 | 臺北市 Taipei | 直轄市 |
64000 | 高雄市 Kaohsiung | 直轄市 |
65000 | 新北市 New Taipei | 直轄市 |
66000 | 臺中市 Taichung | 直轄市 |
67000 | 臺南市 Tainan | 直轄市 |
68000 | 桃園市 Taoyuan | 直轄市 |
10002 | 宜蘭縣 Yilan | 県 |
10004 | 新竹縣 Hsinchu | 県 |
10005 | 苗栗縣 Miaoli | 県 |
10007 | 彰化縣 Changhua | 県 |
10008 | 南投縣 Nantou | 県 |
10009 | 雲林縣 Yunlin | 県 |
10010 | 嘉義縣 Chiayi | 県 |
10013 | 屏東縣 Pingtung | 県 |
10014 | 臺東縣 Taitung | 県 |
10015 | 花蓮縣 Hualien | 県 |
10016 | 澎湖縣 Penghu | 県 |
10017 | 基隆市 Keelung | 市 |
10018 | 新竹市 Hsinchu City | 市 |
10020 | 嘉義市 Chiayi City | 市 |
09007 | 連江縣 Lienchiang (Matsu) | 離島県 |
09020 | 金門縣 Kinmen | 離島県 |
💻 使用例
D3.js — インタラクティブ choropleth
// D3.js v7 + topojson-client
import * as d3 from 'd3';
import * as topojson from 'topojson-client';
const topo = await d3.json('https://taiwan.md/assets/geo/taiwan-country.topo.json');
const counties = topojson.feature(topo, topo.objects.map);
const projection = d3.geoMercator()
.center([121, 24])
.scale(8000)
.translate([400, 300]);
const path = d3.geoPath().projection(projection);
d3.select('svg')
.selectAll('path')
.data(counties.features)
.join('path')
.attr('d', path)
.attr('fill', d => colorScale(d.properties.value))
.attr('stroke', '#333'); Python — geopandas
# Python — convert TopoJSON to GeoDataFrame
import json, geopandas as gpd
from topojson import Topology
with open('taiwan-country.topo.json') as f:
topo = json.load(f)
# Convert to GeoJSON
topology = Topology(topo)
gdf = gpd.GeoDataFrame.from_features(
topology.to_geojson()['features']
)
gdf.plot(column='name', legend=True) Leaflet — タイル地図オーバーレイ
// Leaflet + topojson
import L from 'leaflet';
import * as topojson from 'topojson-client';
const map = L.map('map').setView([24, 121], 7);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
fetch('https://taiwan.md/assets/geo/taiwan-country.topo.json')
.then(r => r.json())
.then(topo => {
const geojson = topojson.feature(topo, topo.objects.map);
L.geoJSON(geojson, {
style: { color: '#4a90e2', weight: 1, fillOpacity: 0.3 }
}).addTo(map);
}); Vue — taiwan-vue-components
// Vue 2 — taiwan-vue-components (original source)
npm install taiwan-vue-components
// In your Vue component
import { Country, Taipei, Kaohsiung } from 'taiwan-vue-components';
<template>
<div>
<Country :width="400" :height="600" fill="#f0f0f0" stroke="#333" />
<Taipei :width="300" :height="300" />
</div>
</template> 📚 他のオープンデータソース
ここに同梱されているもの以上が必要な場合(高解像度、異なる投影、歴史的行政区界など)、以下がお勧めの情報源です:
- 政府資料開放平臺 (data.gov.tw) — 台湾政府のオープンデータ公式ポータル、内政部の行政境界シェープファイルを含む。
- Natural Earth — パブリックドメインのグローバル地図データ、1:10m、1:50m、1:110m スケール。小スケールの世界地図に最適。
- OpenStreetMap (Taiwan relation) — OSM コミュニティが編集した台湾地図、Overpass API と Geofabrik 経由で OSM XML または PBF としてダウンロード可能。
- GADM — Taiwan — グローバル行政区域データベース、台湾の行政境界 0-3 レベルを Shapefile、GeoPackage、KMZ、R 形式で提供。
- g0v.tw — 台湾のシビックテックコミュニティ。多くの g0v プロジェクトがクリーンアップされた地図データと可視化をオープンソースで公開。
⚖️ ライセンスと帰属
このページのすべてのファイルはオープンソースです。正確な出典とライセンス:
- taiwan-icon-wiki.svg · taiwan-location-map.svg · taiwan-political-division.svg — Wikimedia Commons、クリエイティブ・コモンズ。
- taiwan-simplemaps.svg — SimpleMaps、帰属表示付きで個人・商用利用無料。
- taiwan-country.topo.json · taiwan-towns-*.topo.json — 出典:waiting7777/taiwan-vue-components, MIT License © 2018 Waiting.