Fig 1. In pink, the hypothetic new tram line in Diagonal Avenue. Source: Barcelona Tram -


The Tram Tool is a tool made in ArcGIS and Model Builder to explore the demand of tram users in a hypothetic scenario where the Barcelona tram was connected along Diagonal Avenue.

Moreover, the TramTool allows knowing the population served by the new stops, visualising the road accessibility and analysing the income or population based in the proximity of the new tram stops.

The output is a series of maps with to show the capabilities of the TramTool. Nevertheless, adding new data to the ArcGIS Model Builder can perform new analysis.


The connection of the tramlines through the Diagonal Avenue in Barcelona was designed in the original tram plan. However, due to several reasons, it was never been completed.

Fig 2. Original tramline design through the Diagonal Avenue, Barcelona, 1989. Source:


Currently there is a public debate whether the tram needs to be connected through both Diagonal Avenue ends, with several civil associations and political parties in dispute.

The tramtool is designed to study this situation and provide data for decision-making.

The premises for this tool can be found in the ideas from Image of the City (Lynch, 1960) and in several papers related to mobility, as Transit Stops and Stations from the Perspective of Users, Iseki et al. (2007) or Improvement of transport network by connecting the tram in Barcelona (2015) and
Cost-benefit analysis of joining the tram (2006), both by Promoció del Transport Públic, a mobility association based in Barcelona.

Limitations of the tramtool:

  • Spatial Uncertainty. The data about block population is not up-to-date
  • Ambiguity. The tool doesn´t take into consideration from other transport means
  • Modifiable Areal Unit Problem (MAUP). Depending on where the new stops are placed, the tramtool will offer different outputs.
  • Ecological Fallacy. The tramtool assumes that the population of the analysed neighbourhoods has regular features (i.e. similar income or density)
  • Lack of qualitative data. Surveys, local associations and so on

Data Collection

Input data:
The input data used in TramTool are shapefiles for the streets, blocks and road network, coordinates tables for the transport stops and data from Barcelona census (2013 and 2014). The data used is been downloaded from Open Data portals and other public initiatives or, in few cases, from previous works and compilations published by other GIS users.
In some occasions, some tables have been cleaned up to avoid common errors in GIS as written accents from original language or Internet links. Nevertheless, the main data has not been modified.
Another type of changes in the tables consist of adding new columns in order to allow ArcGIS to process the imported data from 2 separate tables (i.e. in TRANSPORT.CSV needed an Object ID column to be manipulated later on.). The same file had wrong coordinates and it was necessary to move the points to the right place in the map.

Data availability:
Shapefiles (Barcelona road network, blocks and neighbourhoods):

Barcelona public transports:
The spatial reference frame for the Tram Tool is ETRS89 zone 31N.

Barcelona Census Data (2013 & 2014)



The necessary data for this tool has been added and processed using ArcMap feature ‘Model Builder’,

Fig 3. Model used in ArcMap for the TramTool. Source: Own data

The tool uses shapefiles to draw Barcelona basemaps. The shapefiles, downloaded from Open Data portal by Barcelona City Council, have census data included (the only one feature used in this tool is ‘inhabitants per block’). These files provided data about:

  • Buildings and blocks (BCN_Illes_ETRS89_SHP)
  • Road Network (BCN_GrafVial_Trams_ETRS89_SHP)
  • Neighbourhoods administrative boundaries (BCN_Barri_ETRS89_SHP)
  • The data has been added and processed using ArcMap feature ‘Model Builder’

Following the original Barcelona tram plan (1989), 7 new points representing the new tram stops have been previously drawn and exported in ArcMap, and added into the model (NewTramStops.shp.)

Once the new stops are correctly displayed, the model calculates a ‘Multiple Ring Buffer’ of 100, 200, 300, 400 and 500 meters, which are acceptable walkable distances. This buffer will be used to explore the different scenarios regarding population served (via ‘Clip’ tool), road accessibility to stops and connectivity with other public transport stops (both via ‘Intersect’ tool).

For the public transport stops, a CSV file downloaded from Open Data portal by Barcelona City Council (TRANSPORTS.CSV) have been imported to the model, then converted to a new dBASE table (‘Table to Table’ feature) in order to process it correctly by adding an ‘Object ID’ column. Finally, the coordinates have been exported to XY events and placed in the correct location via ArcMap editor.

Fig 4: CSV file with public transport stops misplaced (dark blue) and corrected (light blue). General (above) and detail (below). Source: Barcelona City Council and own data.

To isolate the tram stops from the rest of public transport stops, the model includes a selection by field performed by ‘Selection’ tool, so the existing and theoretical new stops can be visualised and analyse following different criteria, which is the main purpose of this TramTool.

Fig 5: Existing tram stops (green) and new tram stops (blue). Source: Barcelona City Council and own data.

Regarding the census data, the model includes a CSV downloaded from Google Fusion Tables (Renta Familiar Disponible y paro - Barcelona (1).CSV) and cross-validated with the data provided by the Barcelona City Council Statistics Department. The selected data for this tool is the total population and the income percentage for each neighbourhood. The TramTool relates this data to the administrative boundaries (CN_Barri_ETRS89_SHP.shp) by using the feature ‘Add Join’ in the model.
After the model processes all the data, some adjustments have been made in order to process the data for the final output. Several data frame have been included to showcase some possible outputs of TramTool


The tool allows exploring several variables related to the new stops locations. For demonstration purposes, 5 outputs are shown in this presentation.

1. Total population served by new tram stops

To calculate how many inhabitants can access to the new tram stops from the surrounding neighbourhoods (Sant Gervasi-Galvany, Antiga Esquerra de l’Eixample, la Vila de Gràcia, la Dreta de l’Eixample, el Camp d’en Grassot I Gràcia Nova, la Sagrada Família, el Fort Pienc and el Parc I la Llacuna de Poblenou), the TramTool determinates a buffer of 500 meters and takes the number of inhabitants per block, getting an accurate estimation of the number of people served by the new tram stops.
In conclusion, a total of 130,967 people can access by foot to a new tram stop in less than 10 minutes (with a standard 5km/h walking speed it takes about 6 minutes). Currently, this population hasn´t access to any tram stop in less than 500 meters.

Fig 6: Total of inhabitants served by the new tram stops in a radius of 500 meters. Source: Barcelona City Council and own data.

2. Public transport stops near the new tram stops

Still with a buffer of 500 meters (subdivided in 100 sections of 100 meters), the TramTool can calculate the public transport stops that are in every section of 100 meters.

Fig 7: Public transport stops in a buffer of 500 meters from the new tram stops. Source: Barcelona City Council and own data.

3. Road accessibility to new tram stops

Continuing with the proximity analysis, the TramTool indicates the streets sections that have easy access to the new tram stops. A gradient for every section of 100 meters has been included to easily analyse the road accessibility. Due to Barcelona´s compact urbanism, the new stations have a high degree of accessibility.

Fig 8: Road accessibility in a buffer of 500 meters. Source: Barcelona City Council and own data.

4. Population density near tram stops

In order to decide whether the location of the new stops is relevant, an analysis of density has been performed for the surrounding neighbourhoods. The new stops are located by many of the densest area (Antiga Esquerra de l’Eixample, la Vila de Gràcia, la Dreta de l’Eixample and la Sagrada Família), so it suggests that in this aspect the new stops would be serving populated neighbourhoods,

Fig 9: Population density in neighbourhoods and tram stops (blue, new stops and green, existing tram stops). Barcelona. 2013 data. Source: Barcelona City Council and own data.

5. Income in surrounding neighbourhoods

TramTool, with Barcelona census data in 2013, can also perform an analysis based in the income of families living near the new tram stops. As conclusion, the new stops will serve mostly middle class families, but a network analysis -which is out of scope for the TramTool should be performed to have a more detailed study.

Fig 10: Income percentage for neighbourhoods and tram stops (blue, new stops and green, existing tram stops). The total income for Barcelona is 100%. 2013 data. Source: Barcelona City Council and own data.


User Documentation

This tool runs only in Windows 7, 8 or 10 and needs ArcGIS 10.3 with Color Brewer Ramp Set - downloadable from -. It also requires the necessary licenses for the software and a working Internet connection.
The TramTool needs 2 types of files: CSV and shapefiles.
WinRAR or similar software is also needed to unzip the downloaded data, often compressed.
The minimum recommended hard drive free space is 100 Mb, but it depends on the size of the source data files – This example has a total size of 88.8 Mb.



GIScience and Systems. M. F. Goodchild (2009)
Transit Stops and Stations from the Perspective of Users. Iseki et al. (2007)
Improvement of transport network by connecting the tram in BCN. (2015)
Cost-benefit analysis of joining the tram. (2006)

Edaimon De Juan

Need help for your Communications Department?

For a web or design project?

I'm available for new positions and projects..

I look forward to hearing from you.



Get in touch

  • Edaimon De Juan
    East Sussex
  • +44 (0) 7427 666 942
Signup to my newsletter: