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
Requested attributes
| Attribute | Coverage | Sources | Scope and limitations |
|---|---|---|---|
Railway network geometry route_geometry | Covered |
| IGN WFS: 60,018 polylines, all managers. RINF has only 2-point chords per section. |
Line type line_type | Partially covered |
| 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 electrification | Covered |
| 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_manager | Partially covered |
| 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 traffic | Partially covered |
| 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
- IGN attributes are separate features linked to links; many links lack electrification (38,120) or track count (37,336) of 60,018. GML only.
- ERA RINF geometry is a 2-point chord per section and only manager code 0071; the code was not confirmed as Adif by any page.
- Traffic is per axis and top-10 lines only, RFIG only (no FGC, Euskotren, SFM, metro or tram).
- ideadif.adif.es, www.adif.es and www.transportes.gob.es answered 403 to automated clients; Adif's own WFS and network statement were not read.
- Network lengths differ: Adif 15,654.1 km (OFE 2024), RFIG 15,678 km (CNMC 2025), RINF sections sum 15,537 km.
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
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
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
- 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
Additional sources in the detail: 5. Read the full detail; locate each source by its source_id.
Document access
- Summary
Local search terms
- Term
- red ferroviaria de interés general (RFIG)
- Language
- es
- Meaning
- state-level rail network managed by Adif and Adif AV
- Term
- declaración sobre la red
- Language
- es
- Meaning
- network statement published by the infrastructure manager
- Term
- tren.km / trenes-km
- Language
- es
- Meaning
- train-kilometres, the traffic unit
- Term
- ancho ibérico / métrico / UIC
- Language
- es
- Meaning
- gauges 1,668 mm / 1,000 mm / 1,435 mm
- Term
- vía única / doble
- Language
- es
- Meaning
- single / double track
- Term
- eje (ferroviario)
- Language
- es
- Meaning
- Adif corridor code 01..16 grouping lines
- Term
- tramificación común
- Language
- es
- Meaning
- Adif common sectioning used for its INSPIRE dataset
- Term
- xarxa ferroviària
- Language
- ca
- Meaning
- rail network (Catalan, Valencian, Balearic catalogues)
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
- Html url
- https://georutter.org/es/railways/