Docs
Contents

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

IDes_transportes_ferrocarril
Records63,082
Size14.8 MB
GeometryLINESTRING
CRSEPSG:4326
Versionv/2026-08
Sourceign
Upstream layerign:btn0641l_fc_conv
LicenceCC-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/download

sha256 of this version:

1da164ba3d5eb355df1e42c1327d94a10bdaa1a202ef54bdc950f5f4789e6eef

Query it without downloading it

import duckdb
con = 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.

ColumnTypeFilledDistinctValues
nombreVARCHAR61.71 %449
situa_0638VARCHAR7.80 %302 · 03 · 01
id_lineafcDOUBLE99.72 %497Range: 11000000002.0 → 990480000001.0
id_tramoDOUBLE99.72 %60,018Range: 10000000001.0 → 500000002598.0
f_altaVARCHAR100 %82026/02/23 · 2026/03/04 · 2026/02/27 · 2023/04/24 · 2026/06/23 · 2026/06/26 · 2026/06/25 · 2026/06/24
nvias_0638VARCHAR7.80 %402 · 01 · 99 · 05
titul_0638VARCHAR7.80 %301 · 99 · 02
rtent_0638VARCHAR7.80 %201 · 02
estad_0638VARCHAR7.80 %301 · 02 · 03
nvias_0641VARCHAR80.72 %501 · 05 · 02 · 99 · 04
elect_0641VARCHAR80.72 %399 · 01 · 02
situa_0641VARCHAR80.72 %302 · 03 · 01
estad_0641VARCHAR80.72 %301 · 03 · 02
titul_0641VARCHAR80.72 %601 · 99 · 07 · 10 · 02 · 05
rtent_0641VARCHAR80.44 %202 · 01
ancho_0641VARCHAR80.72 %502 · 99 · 01 · 03 · 04
tipo_0644VARCHAR11.48 %505 · 03 · 02 · 06 · 01
situa_0644VARCHAR11.48 %302 · 01 · 03
nvias_0644VARCHAR11.48 %502 · 05 · 01 · 99 · 04
titul_0644VARCHAR11.48 %302 · 99 · 01
rtent_0644VARCHAR11.48 %202 · 01
estad_0644VARCHAR11.48 %301 · 02 · 03
situaVARCHAR100 %3SUPERFICIE · ELEVADO · SUBTERRÁNEO
nviasVARCHAR100 %5ÚNICA · PLAYA DE VÍAS · DOBLE · NO APLICABLE/NO DISPONIBLE · CUÁDRUPLO
titulVARCHAR100 %6ADMINISTRACIÓN GENERAL DEL · NO APLICABLE/NO DISPONIBLE · COMUNIDAD AUTÓNOMA · AUTORIDAD PORTUARIA · OTROS · AYUNTAMIENTO
rtentVARCHAR99.72 %2NO RED TEN-T · RED TEN-T
estadVARCHAR100 %3EN USO · FUERA DE SERVICIO · EN CONSTRUCCIÓN
electVARCHAR80.72 %3NO APLICABLE/NO DISPONIBLE · ELECTRIFICADO · NO ELECTRIFICADO
anchoVARCHAR80.72 %5IBÉRICO · NO APLICABLE/NO DISPONIBLE · ESTRECHO · MIXTO · INTERNACIONAL
tipoVARCHAR11.48 %5METRO · TRANVÍA · TREN LIGERO · CREMALLERA · FUNICULAR
subcapaVARCHAR100 %3convencional · transporte_especial · alta_velocidad
prov_codeVARCHAR100 %50
prov_nameVARCHAR100 %50
prov_aproxBOOLEAN100 %2false · true
_fuenteVARCHAR100 %1ign
_fecha_capturaDATE100 %12026-08-22
_licenciaVARCHAR100 %1CC-BY-4.0
_atribucionVARCHAR100 %1Obra derivada de BTN 2026
bboxSTRUCT(xmin DOUBLE, ymin DOUBLE, xmax DOUBLE, ymax DOUBLE)100 %—
geometryGEOMETRY(‘EPSG:4326’)100 %—