Archivo cartográfico abierto

La forma de Taiwán

SVG, GeoJSON, TopoJSON — un conjunto completo de datos de mapas de código abierto para desarrolladores, diseñadores e investigadores.

Por qué importa la forma de Taiwán

Pide a cualquier generador de imágenes con IA que dibuje Taiwán y observa lo que pasa. Normalmente escupe una mancha gorda y redondeada, a medio camino entre una aceituna y una patata. Taiwán no es una aceituna. Es una batata de 394 kilómetros de largo con una cordillera central y más de 100 islas costeras.

Representar bien la forma no es un capricho de diseño — es un problema de identidad. Esta página reúne todos los recursos de código abierto que usamos en taiwan.md para que cualquiera pueda renderizar Taiwán con precisión en su propio proyecto.

vs. 🇹🇼 — La IA siempre se equivoca.

AI-generated Taiwan shape (wrong)
Generado por IA (incorrecto)
Correct Taiwan shape from Wikipedia
Correcto (Wikipedia)

Contornos SVG — listos para usar

Cuatro archivos SVG seleccionados a mano, todos bajo CC o dominio público. Insértalos directamente en cualquier web, app o archivo de diseño.

Taiwan icon — Wikipedia

taiwan-icon.svg

Contorno relleno simple — ideal para iconos, favicons y botones.

Wikimedia Commons · CC

Descargar SVG
Taiwan outline — SimpleMaps

taiwan-simplemaps.svg

Vector limpio — ideal para incrustar en la web.

SimpleMaps · 5 KB

Descargar SVG
Taiwan location map with city markers

taiwan-location-map.svg

Mapa de ubicación con cuadrícula de lat/lon y marcadores de ciudades.

Wikimedia Commons · CC

Descargar SVG
Taiwan political division map with counties

taiwan-political-division.svg

Límites de condados — divisiones administrativas en color.

Wikimedia Commons · CC

Descargar SVG

Ejemplos de uso

<!-- 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 -->
![Taiwan](https://taiwan.md/assets/svg/taiwan-icon-wiki.svg)

Todos los SVGs están bajo Creative Commons o dominio público. Se agradece la atribución pero no es obligatoria.

TopoJSON — mapas interactivos a nivel de condado

Para mapas interactivos — zoom, hover, relleno por valor de datos — necesitas coordenadas geográficas reales, no solo rutas SVG. Incluimos archivos TopoJSON extraídos de taiwan-vue-components de Waiting (Licencia MIT, 2018).

TopoJSON es GeoJSON comprimido: las fronteras compartidas entre condados se almacenan una sola vez, lo que reduce el tamaño de los archivos en un 80%. Se puede convertir a GeoJSON al vuelo con topojson-client.

TopoJSON vs GeoJSON — ¿cuál elegir?

TopoJSON

TopoJSON: menor tamaño de archivo, topología compartida entre regiones adyacentes, la opción correcta para mapas web.

GeoJSON

GeoJSON: formato más sencillo, compatibilidad directa con Python geopandas, QGIS y la mayoría de herramientas GIS.

Contorno a nivel de país (22 condados)

Archivo TopoJSON de ~21 KB con los 22 condados y municipios especiales como entidades separadas. Perfecto para mapas coropléticos.

taiwan-country.topo.json
TopoJSON · 22 features · ~21 KB
Descargar TopoJSON

Nivel de municipio (los 22 condados y ciudades)

Incluimos los archivos a nivel de municipio de los 22 condados y ciudades, todos extraídos del mismo repositorio de origen.

taiwan-towns-63000.topo.json
臺北市 Taipei · 23 KB
Descargar TopoJSON
taiwan-towns-64000.topo.json
高雄市 Kaohsiung · 69 KB
Descargar TopoJSON
taiwan-towns-65000.topo.json
新北市 New Taipei · 24 KB
Descargar TopoJSON
taiwan-towns-66000.topo.json
臺中市 Taichung · 21 KB
Descargar TopoJSON
taiwan-towns-67000.topo.json
臺南市 Tainan · 27 KB
Descargar TopoJSON
taiwan-towns-68000.topo.json
桃園市 Taoyuan · 13 KB
Descargar TopoJSON
taiwan-towns-10002.topo.json
宜蘭縣 Yilan · 8 KB
Descargar TopoJSON
taiwan-towns-10004.topo.json
新竹縣 Hsinchu · 7 KB
Descargar TopoJSON
taiwan-towns-10005.topo.json
苗栗縣 Miaoli · 8 KB
Descargar TopoJSON
taiwan-towns-10007.topo.json
彰化縣 Changhua · 9 KB
Descargar TopoJSON
taiwan-towns-10008.topo.json
南投縣 Nantou · 10 KB
Descargar TopoJSON
taiwan-towns-10009.topo.json
雲林縣 Yunlin · 12 KB
Descargar TopoJSON
taiwan-towns-10010.topo.json
嘉義縣 Chiayi · 12 KB
Descargar TopoJSON
taiwan-towns-10013.topo.json
屏東縣 Pingtung · 14 KB
Descargar TopoJSON
taiwan-towns-10014.topo.json
臺東縣 Taitung · 11 KB
Descargar TopoJSON
taiwan-towns-10015.topo.json
花蓮縣 Hualien · 10 KB
Descargar TopoJSON
taiwan-towns-10016.topo.json
澎湖縣 Penghu · 4 KB
Descargar TopoJSON
taiwan-towns-10017.topo.json
基隆市 Keelung · 2 KB
Descargar TopoJSON
taiwan-towns-10018.topo.json
新竹市 Hsinchu City · 1 KB
Descargar TopoJSON
taiwan-towns-10020.topo.json
嘉義市 Chiayi City · 1 KB
Descargar TopoJSON
taiwan-towns-09007.topo.json
連江縣 Lienchiang (Matsu) · 2 KB
Descargar TopoJSON
taiwan-towns-09020.topo.json
金門縣 Kinmen · 3 KB
Descargar TopoJSON

Se han incluido los 22 condados y ciudades anteriores. Los datos de límites de pueblos y distritos proceden de github.com/waiting7777/taiwan-vue-components,MIT License © 2018 Waiting。

Códigos de divisiones administrativas

Las divisiones administrativas de Taiwán usan códigos numéricos. Aquí tienes la tabla de referencia para las 22 divisiones a nivel de condado (la nomenclatura de archivos sigue el formato `towns-{código}.json`).

Código División Tipo
63000 臺北市 Taipei municipality
64000 高雄市 Kaohsiung municipality
65000 新北市 New Taipei municipality
66000 臺中市 Taichung municipality
67000 臺南市 Tainan municipality
68000 桃園市 Taoyuan municipality
10002 宜蘭縣 Yilan county
10004 新竹縣 Hsinchu county
10005 苗栗縣 Miaoli county
10007 彰化縣 Changhua county
10008 南投縣 Nantou county
10009 雲林縣 Yunlin county
10010 嘉義縣 Chiayi county
10013 屏東縣 Pingtung county
10014 臺東縣 Taitung county
10015 花蓮縣 Hualien county
10016 澎湖縣 Penghu county
10017 基隆市 Keelung city
10018 新竹市 Hsinchu City city
10020 嘉義市 Chiayi City city
09007 連江縣 Lienchiang (Matsu) offshore
09020 金門縣 Kinmen offshore

Ejemplos de uso

D3.js — coroplético interactivo

// 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 — superposición de mapa basada en teselas

// 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>

Otras fuentes de datos abiertos

Si necesitas más de lo que ofrecemos aquí — mayor resolución, diferentes proyecciones, límites administrativos históricos — estas son las fuentes que recomendamos:

  • 政府資料開放平臺 (data.gov.tw) — Plataforma oficial de datos abiertos del gobierno, que incluye Shapefiles de límites administrativos publicados por el Ministerio del Interior.
  • Natural Earth — Datos cartográficos globales de dominio público en tres escalas: 1:10m / 1:50m / 1:110m. Ideales para mapas mundiales que incluyen Taiwán.
  • OpenStreetMap (Taiwan relation) — Mapa de Taiwán editado por la comunidad de OSM, descargable como OSM XML o PBF a través de Overpass API y Geofabrik.
  • GADM — Taiwan — Base de datos de áreas administrativas globales. Límites administrativos de Taiwán en niveles 0-3, disponibles en formatos Shapefile / GeoPackage / KMZ / R.
  • g0v.tw — Comunidad de tecnología civica de Taiwán. Muchos proyectos g0v publican datos de mapas depurados y visualizaciones como código abierto.

Licencia y atribución

Todos los archivos de esta página son de código abierto. Aquí están los orígenes exactos y las licencias:

  • taiwan-icon-wiki.svg · taiwan-location-map.svg · taiwan-political-division.svg — Wikimedia Commons, licencia Creative Commons.
  • taiwan-simplemaps.svg — SimpleMaps, uso comercial gratuito con atribución.
  • taiwan-country.topo.json · taiwan-towns-*.topo.json — Extraído de waiting7777/taiwan-vue-components, MIT License © 2018 Waiting.