Madrid rail station.
Madrid has the UN/LOCODE ESMAD with the rail function. Below: the nearest station and its codes, track gauge and electrification, freight yards and terminals nearby, hub facts and nearby rail locations.
About Madrid
Madrid (UN/LOCODE ESMAD) is a rail location in Spain. The nearest railway station on OpenStreetMap is Madrid-Príncipe Pío, 1.4 km from the UN/LOCODE point, run by Renfe. The lines here use 1,668 mm (Iberian gauge) track, electrified at 3,000 V DC. 10 freight yards and terminals are mapped nearby, 3 of them container or freight terminals. Corridors: TEN-T Core network (Freight), TEN-T Atlantic and TEN-T Mediterranean.
Nearest station
Source: OpenStreetMap, Wikidata.
Photos of Madrid-Príncipe Pío station
Photos from Wikimedia Commons under free licences, credited under each photo: the station's own Wikidata image first, then photos taken within 600 m of the station.
Madrid rail freight hub
One of the main rail freight hubs we track. Operator site: portdebarcelona.cat. Each figure links to where it was published.
Freight yards and terminals near Madrid
10 mapped freight facilities, closest first. Names and types as tagged on OpenStreetMap; terminals with an operator page link to it.
| Facility | Type | Operator | Distance, size |
|---|---|---|---|
| Puerto Seco de Madrid (Coslada) | container/intermodal | CONTERAIL | 140,000 TEU/yr |
| Madrid-Vicálvaro Mercancías | freight terminal | Adif | |
| Vicálvaro-Mercancías | rail yard | Adif | 10.52 km, 66.7 ha |
| Centro Logístico de Abroñigal | intermodal/container terminal | Adif | 3.8 km, 22.7 ha |
| Base Mantenimiento Madrid Cerro Negro Cercanías | rail facility | Adif | 4.28 km, 14.8 ha |
| Base mantenimiento de Madrid-Santa Catalina | rail facility | Adif | 5.07 km, 7.8 ha |
| Recinto Cocheras de Hortaleza | rail facility | 8.37 km, 4 ha | |
| Estación de Villaverde Alto | rail facility | Adif | 8.41 km, 7.5 ha |
| Depósito nº 4. Recinto de Canillejas | rail facility | 8.74 km, 30.3 ha | |
| Depósito 10. Recinto de Cuatro Vientos | rail facility | 9.06 km, 29.7 ha |
Rail corridors
- TEN-T Core network (Freight) (data.europa.eu)
- TEN-T Atlantic
- TEN-T Mediterranean
FAQ
- What is the UN/LOCODE of Madrid?
- The UN/LOCODE of Madrid is ESMAD: ES for Spain and MAD for the place. The code carries the rail function (2), so it is used in rail consignment notes and rate requests.
- What is the UIC station code of Madrid-Príncipe Pío?
- 7110000, as given on Wikidata.
- What track gauge is used at Madrid?
- 1,668 mm (Iberian gauge), from the tracks mapped at the station.
- Is the railway at Madrid electrified?
- Yes, 3,000 V DC, per the OpenStreetMap tags of the lines at the station.
- Which freight terminals are near Madrid?
- Puerto Seco de Madrid (Coslada) (CONTERAIL), Madrid-Vicálvaro Mercancías (Adif) and Centro Logístico de Abroñigal (Adif).
- Code, name, region and functions: UNECE UN/LOCODE. Coordinates are the UN/LOCODE position of the place.
- Station, track gauge, electrification and freight facilities: OpenStreetMap contributors (ODbL), lines 1, 2, 3.
- Station ids and opening date: Wikidata (CC0).
- Operational point: ERA RINF register, type station.
- Data as of 14 Nov 2026.
- All rail locations of Spain: railway stations in Spain. Wagons: wagon types.

