Railways
What it is
The 63,082 railway segments, with subcapa separating conventional 50,919, special transport 7,243 (metro 3,305, tram 3,276, light rail 549, rack railway 77 and funicular 36) and high speed 4,920. It carries what you need to assess a rail connection: 22,462 segments belong to the Trans-European Transport Network (TEN-T), track gauge distinguishes 23,936 Iberian-gauge segments, 5,194 narrow, 765 mixed and 407 standard, and electrification separates 17,907 electrified from 12,768 non-electrified. Ownership is State in 33,377 segments, regional in 4,892 and port authority in 322 — the latter are port branch lines, usually the way into a terminal. ⚠ ancho and elect exist only in the BTN’s conventional-railway table: they come out empty for high speed and special transport (81 % overall fill). The gap means “the source does not publish it for that track type”, not “not electrified”.
According to the publishing agency
Official text, in Spanish, exactly as the upstream service publishes it:
BTN — Base Topográfica Nacional Base de datos tridimensional multiescala (1:2.000-1:25.000) con cobertura completa y continua para España. Contiene datos topográficos y temáticos que permiten su explotación mediante sistemas de información geográfica y la generación de productos cartográficos y servicios interoperables. Incluye información hidrográfica con estructura de red e información geográfica de referencia del IGN de redes de transporte y poblaciones. … La resolución de los datos depende de la temática tratada, pero puede asegurarse que de forma global la exactitud posicional es mejor de 3 metros en X, Y, Z. …
At a glance
| ID | es_transportes_ferrocarril |
| Records | 63,082 |
| Size | 14.8 MB |
| Geometry | LINESTRING |
| CRS | EPSG:4326 |
| Version | v/2026-08 |
| Source | ign |
| Upstream layer | ign:btn0641l_fc_conv |
| Licence | CC-BY-4.0 |
Extent: -16.31816, 28.44308 → 3.20312, 43.744065
Download
curl -H "x-api-key: $GEOVIS_API_KEY" \ https://datos.geovis.es/v1/data/datasets/es_transportes_ferrocarril/downloadsha256 of this version:
1da164ba3d5eb355df1e42c1327d94a10bdaa1a202ef54bdc950f5f4789e6eefQuery it without downloading it
import duckdbcon = duckdb.connect(); con.execute("INSTALL spatial; LOAD spatial; INSTALL httpfs; LOAD httpfs;")con.execute("SELECT count(*) FROM read_parquet('<url-firmada>')").fetchone()Columns
Column names are kept exactly as the agency publishes them. They are not translated: renaming them would break traceability against the official source.
The literals below are the ones present in the data: they work as-is in a WHERE. Only columns with few distinct values are enumerated; for the rest, the count is given.
| Column | Type | Filled | Distinct | Values |
|---|---|---|---|---|
nombre | VARCHAR | 61.71 % | 449 | |
situa_0638 | VARCHAR | 7.80 % | 3 | 02 · 03 · 01 |
id_lineafc | DOUBLE | 99.72 % | 497 | Range: 11000000002.0 → 990480000001.0 |
id_tramo | DOUBLE | 99.72 % | 60,018 | Range: 10000000001.0 → 500000002598.0 |
f_alta | VARCHAR | 100 % | 8 | 2026/02/23 · 2026/03/04 · 2026/02/27 · 2023/04/24 · 2026/06/23 · 2026/06/26 · 2026/06/25 · 2026/06/24 |
nvias_0638 | VARCHAR | 7.80 % | 4 | 02 · 01 · 99 · 05 |
titul_0638 | VARCHAR | 7.80 % | 3 | 01 · 99 · 02 |
rtent_0638 | VARCHAR | 7.80 % | 2 | 01 · 02 |
estad_0638 | VARCHAR | 7.80 % | 3 | 01 · 02 · 03 |
nvias_0641 | VARCHAR | 80.72 % | 5 | 01 · 05 · 02 · 99 · 04 |
elect_0641 | VARCHAR | 80.72 % | 3 | 99 · 01 · 02 |
situa_0641 | VARCHAR | 80.72 % | 3 | 02 · 03 · 01 |
estad_0641 | VARCHAR | 80.72 % | 3 | 01 · 03 · 02 |
titul_0641 | VARCHAR | 80.72 % | 6 | 01 · 99 · 07 · 10 · 02 · 05 |
rtent_0641 | VARCHAR | 80.44 % | 2 | 02 · 01 |
ancho_0641 | VARCHAR | 80.72 % | 5 | 02 · 99 · 01 · 03 · 04 |
tipo_0644 | VARCHAR | 11.48 % | 5 | 05 · 03 · 02 · 06 · 01 |
situa_0644 | VARCHAR | 11.48 % | 3 | 02 · 01 · 03 |
nvias_0644 | VARCHAR | 11.48 % | 5 | 02 · 05 · 01 · 99 · 04 |
titul_0644 | VARCHAR | 11.48 % | 3 | 02 · 99 · 01 |
rtent_0644 | VARCHAR | 11.48 % | 2 | 02 · 01 |
estad_0644 | VARCHAR | 11.48 % | 3 | 01 · 02 · 03 |
situa | VARCHAR | 100 % | 3 | SUPERFICIE · ELEVADO · SUBTERRÁNEO |
nvias | VARCHAR | 100 % | 5 | ÚNICA · PLAYA DE VÍAS · DOBLE · NO APLICABLE/NO DISPONIBLE · CUÁDRUPLO |
titul | VARCHAR | 100 % | 6 | ADMINISTRACIÓN GENERAL DEL · NO APLICABLE/NO DISPONIBLE · COMUNIDAD AUTÓNOMA · AUTORIDAD PORTUARIA · OTROS · AYUNTAMIENTO |
rtent | VARCHAR | 99.72 % | 2 | NO RED TEN-T · RED TEN-T |
estad | VARCHAR | 100 % | 3 | EN USO · FUERA DE SERVICIO · EN CONSTRUCCIÓN |
elect | VARCHAR | 80.72 % | 3 | NO APLICABLE/NO DISPONIBLE · ELECTRIFICADO · NO ELECTRIFICADO |
ancho | VARCHAR | 80.72 % | 5 | IBÉRICO · NO APLICABLE/NO DISPONIBLE · ESTRECHO · MIXTO · INTERNACIONAL |
tipo | VARCHAR | 11.48 % | 5 | METRO · TRANVÍA · TREN LIGERO · CREMALLERA · FUNICULAR |
subcapa | VARCHAR | 100 % | 3 | convencional · transporte_especial · alta_velocidad |
prov_code | VARCHAR | 100 % | 50 | |
prov_name | VARCHAR | 100 % | 50 | |
prov_aprox | BOOLEAN | 100 % | 2 | false · true |
_fuente | VARCHAR | 100 % | 1 | ign |
_fecha_captura | DATE | 100 % | 1 | 2026-08-22 |
_licencia | VARCHAR | 100 % | 1 | CC-BY-4.0 |
_atribucion | VARCHAR | 100 % | 1 | Obra derivada de BTN 2026 |
bbox | STRUCT(xmin DOUBLE, ymin DOUBLE, xmax DOUBLE, ymax DOUBLE) | 100 % | — | |
geometry | GEOMETRY(‘EPSG:4326’) | 100 % | — |