GeoRutter

Geospatial data sources by country, with access methods and caveats.

Spain railways data sources

Where can I get the railway network (geometry) of Spain, with line type, electrification, infrastructure manager and traffic?

Answer

Geometry with electrification, gauge and track count for the whole network (Adif plus FGC, Euskotren, SFM, metro, tram) is in IGN's INSPIRE WFS (60,018 links, CC BY 4.0). Line type is partial (train/metro/tram on 497 lines). Manager is only an administration level there; ERA RINF gives a manager code for 2,520 Adif sections. Traffic exists only as train-km per axis and top-10 lines (CNMC PDF). Adif's own WFS is blocked to automated clients.

Official data
Partial coverage
Non official data
Partial coverage
Published
2026-11-19
Research reviewed
2026-11-16
Access checked
No complete access check recorded

Requested attributes

AttributeCoverageSourcesScope and limitations
Railway network geometry route_geometryCovered
  • s001
  • s003
IGN WFS: 60,018 polylines, all managers. RINF has only 2-point chords per section.
Line type line_typePartially covered
  • s001
  • s005
  • s007
RailwayType train 378, metro 65, tramway 45 on 497 lines; BOE blocks; Valencia tipo_linea. No Adif service-class type.

Not checked: Adif Declaración sobre la Red (line classification for fees) lives on adif.es, which returned 403; not opened.

Electrification electrificationCovered
  • s001
  • s003
  • s005
IGN boolean on 38,120 links; RINF voltage per track (3 kV DC, 25 kV AC, 1.5 kV DC); BOE by line.
Infrastructure manager infrastructure_managerPartially covered
  • s003
  • s006
  • s007
RINF: one manager code (0071) for Spain; OFE names Adif, ETS, FGC, SFM; Valencia titularidad. IGN gives owner level only.

Not checked: Per-segment manager for FGC, Euskotren and SFM links not found; Catalan and Basque IDE catalogues not rendered by my tools, ICGC not opened.

Traffic trafficPartially covered
  • s004
  • s006
CNMC train-km per axis (12) and top-10 lines; OFE density trains/km/day. No per-segment dataset seen.

Not checked: Line-level occupancy in Adif's Declaración sobre la Red (adif.es 403) not read; CNMC Data API not explored.

Main caveats

Sources

Redes de transporte de España (IGR-RT), INSPIRE download service, rail layers

Source id
s001
Publisher
Instituto Geográfico Nacional (IGN-CNIG), Sistema Cartográfico Nacional
Official
Yes
Landing url
https://datos.gob.es/es/catalogo/e00125901-transporte.rdf
Data url
https://servicios.idee.es/wfs-inspire/transportes?service=WFS&request=GetCapabilities
Access
api
Format
OGC WFS 2.0.0, GML 3.2 only (JSON refused); Shapefile also listed by the catalogue in CNIG Centro de Descargas (not opened)
License
CC BY 4.0 (scne.es)
Language
es
Has coordinates
Yes
Location precision
exact
Summary
Redes de transporte de España (IGR-RT), INSPIRE download service, rail layers
Coverage note
Spain (national, 60,018 RailwayLink polylines; includes regional and urban rail networks)
Date of data
No single dataset date; per-object version stamps (links 2021-05-18, RailwayLine 2024-09-25, OwnerAuthority citation revision 2026-01-20); catalogue record modified 2023-04-10.
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
api_query
Http status
200
Problems
  • JSON output refused (400)
  • National Centro de Descargas (centrodedescargas.cnig.es) returned an empty reply to curl; WebFetch showed only the menu
Example
Example request
curl -sL "https://servicios.idee.es/wfs-inspire/transportes?service=WFS&version=2.0.0&request=GetFeature&typeNames=tn-ra:RailwayLink&resultType=hits"  and  curl -sL "https://servicios.idee.es/wfs-inspire/transportes?service=WFS&version=2.0.0&request=GetFeature&typeNames=tn-ra:RailwayLink&count=500&startIndex=30000"
Example result
hits: numberMatched="60018". Sample record: gml:id TN-RA_RAILWAYLINK_FFCC_TR30000000827, net:fictitious=true, gml:LineString posList "38.390668 -0.515177 38.390787 -0.515290 ...". Electrification record: TN-RA_RAILWAYELECTRIFICATION_ELEC_FC460000004420, tn-ra:electrified=true.
Members summary
Not a grouped source

Red de Transporte Ferroviario de Adif (IDEADIF WFS and WMS, INSPIRE)

Source id
s002
Publisher
Adif (Administrador de Infraestructuras Ferroviarias)
Official
Yes
Landing url
https://datos.gob.es/es/catalogo/e0dat0002-red-de-transporte-ferroviario-de-adif1
Data url
https://ideadif.adif.es/services/wfs?REQUEST=GetCapabilities&SERVICE=WFS&VERSION=2.0.0
Access
api
Format
OGC WFS 1.1.0 and 2.0.0, GML 3.2; WMS
License
CC BY 4.0 (datos.gob.es); use allowed crediting '© Administrador de infraestructuras ferroviarias' (idee.es record)
Language
es
Has coordinates
Yes
Location precision
exact
Summary
Red de Transporte Ferroviario de Adif (IDEADIF WFS and WMS, INSPIRE)
Coverage note
Mainland Spain, Adif network (bbox -9.87..3.59, 36.01..43.84)
Date of data
2024-07 (revised 2024-07-01)
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
blocked
Http status
403
Problems
  • Akamai 'Access Denied' (403) to automated clients on ideadif.adif.es, www.adif.es and the Adif network-statement page
  • No Wayback copy of the WFS
Example
Example request
curl -sL "https://ideadif.adif.es/services/wfs?REQUEST=GetCapabilities&SERVICE=WFS&VERSION=2.0.0"
Example result
HTTP 403, text/html 390 bytes: '<TITLE>Access Denied</TITLE> You don't have permission to access ...'. No data obtained.
Members summary
Not a grouped source

ERA RINF knowledge graph (Register of Infrastructure), Spanish sections of line

Source id
s003
Publisher
European Union Agency for Railways (ERA)
Official
Yes
Landing url
https://www.era.europa.eu/domains/registers/rinf_en
Data url
https://graph.data.era.europa.eu/repositories/rinf-plus
Access
api
Format
SPARQL (JSON, XML); WKT geometries
License
unknown (ERA page links RINF Terms of Use, not read)
Language
en
Has coordinates
Yes
Location precision
exact
Summary
ERA RINF knowledge graph (Register of Infrastructure), Spanish sections of line
Coverage note
Spain: 2,520 SectionOfLine, one infrastructure-manager role (code 0071)
Date of data
Not stated
Caveats
  • Consult the main caveats and the complete reading traps and access evidence in the detail.
Test
Tested on
2026-11-16
Method
api_query
Http status
200
Problems
None recorded
Example
Example request
curl -sG --data-urlencode "[email protected]" -H "Accept: application/sparql-results+json" https://graph.data.era.europa.eu/repositories/rinf-plus   with rq.txt =
PREFIX era: <http://data.europa.eu/949/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX geo: <http://www.opengis.net/ont/geosparql#>
SELECT ?label ?im ?len ?cls ?wkt WHERE { ?s a era:SectionOfLine ; rdfs:label ?label ; era:inCountry <http://publications.europa.eu/resource/authority/country/ESP> ; era:infrastructureManager ?im ; era:lengthOfSectionOfLine ?len ; era:hasPart ?t ; era:netReference/geo:hasGeometry/geo:asWKT ?wkt . ?t era:contactLineSystem ?cls } LIMIT 2
Example result
label 'Section of Line BIF. CORESES - ZAMORA', im .../organisationRole/0071_IM, len 9.243, cls .../contactLineSystem/3ef9cb304f, wkt 'LINESTRING (-5.6318400 41.5329200, -5.7397000 41.5159000)'. Count: era:inCountry ESP gives 2520 sections.
Members summary
Not a grouped source

Additional sources in the detail: 5. Read the full detail; locate each source by its source_id.

Document access

Summary
Not stated

Local search terms

Confidence

Confidence
medium
Confidence reason
Geometry, electrification and RINF were tested live; traffic and manager rely on PDFs; Adif's primary services were blocked and Catalan/Basque catalogues not fully checked.

Research provenance

Pass count
1
Models
  • Claude Sonnet 5.5 (High)
Minutes estimate
60
Pages opened
33
Passes
  • Pass
    1
    Date
    2026-11-16
    Model
    Claude Sonnet 5.5 (High)
Note
Minutes are researcher estimates. Counts describe documented passes, not publication approval. Missing history or effort is not reconstructed.

Record metadata

Schema version
1.0
Country
es
Country name
Spain
Topic
railways
Territory
es
Territory level
country
Parent url
No parent territory
Html url
https://georutter.org/es/railways/