Preparing baseline network
Start by gathering GTFS files for the transit agencies whose service will be included in your scenarios. Ensure any GTFS you upload follows requirements of the specification. Various validation tools are available. Common issues include:
- Missing required files
- Calendar dates that do not cover an intended date of analysis.
- Using values other than 0-7 in the route_type column of routes.txt
If there is no GTFS available for your region, as a workaround you can use a valid GTFS feed from somewhere else in the world, follow the steps below, then attempt to import route alignment shapefiles representing service in your region.
Setting up a new region
From the initial login page, set up a new region by clicking
Set up a new region
If any regions have already been created, they will be shown in a list below this button.
When setting up a new region, enter a name and specify boundaries by moving the bounding box on the map. You must also upload an appropriate OpenStreetMap (OSM) extract in this view, which will serve as the road layer of the transport network. OSM extracts can be downloaded from services such as Geofabrik or Nextzen. Note that several formats exist for OSM data. We always use the PBF format because it is more compact and faster to process.
Filtering OSM data
The OSM database contains a lot of other data besides the roads, paths, and public transportation platform data we need for accessibility analysis. As of this writing, according to TagInfo 59% of the ways in OSM are buildings, and only 23% are roads or paths. Buildings frequently have more complex shapes than roads, and objects like waterways or political boundaries can be very large in size. It has been jokingly said that OSM should be renamed "OpenBuildingMap" rather than "OpenStreetMap".
Removing unneeded data will reduce the time and network bandwidth needed to the upload the file to Analysis, and will speed up the processing stages where the OSM data is converted into a routable street network. Several command line tools exist to filter OSM data. If you are familiar with the command line or comfortable experimenting with it, you may want to try Osmosis, Osmium-Tool, or OSMFilter. Osmium-Tool is extremely fast but is only straightforward to install on Linux and MacOS platforms. Osmosis is often slower at filtering but will also work on Windows as it's a multi-platform Java application. OSMFilter cannot work with PBF format files so we rarely use it. Below are some example commands for retaining only OSM data useful for accessibility analysis. You would need to replace
input.osm.pbf with the OSM data file you downloaded.
osmosis --rb input.osm.pbf --tf reject-ways building=* --tf reject-ways waterway=* --tf reject-ways landuse=* --tf reject-ways natural=* --used-node --wb filtered.osm.pbf
osmium tags-filter input.osm.pbf w/highway w/public_transport=platform w/railway=platform w/park_ride=yes r/type=restriction -o filtered.osm.pbf
Cropping OSM data
Services producing automated extracts of OSM data like Geofabrik or Nextzen are limited to predefined areas. You'll often need to download an extract for a country or region larger than your true analysis area, then cut it down to size.
Performing accessibility analysis with excessively large OSM data can lead to significant increases in computation time and complexity. Therefore we strongly recommend cropping the OSM data if they cover an area significantly larger than your transportation network or opportunity data. Several command line tools are also able to perform these cropping operations: Osmosis is a multi-platform Java tool that works on Windows, Linux, and MacOS but is relatively slow, OSMConvert is a fast tool pre-built for Windows and Linux and available on MacOS and Linux distributions as part of
osmctools package. Osmium-Tool is a personal favorite that is extremely fast but only straightforward to install on Linux and MacOS platforms. Below are some example crop commands for these different tools:
osmosis --rb input.osm.pbf --bounding-box left=4.34 right=5.84 bottom=43.10 top=43.97 --wb cropped.osm.pbf
osmconvert input.osm.pbf -b=-77.255859375,38.77764022307335,-76.81365966796875,39.02345139405933 --complete-ways -o=cropped.osm.pbf
osmium extract --strategy complete_ways --bbox 2.25,48.81,2.42,48.91 input.osm.pbf -o cropped.osm.pbf
The latter two commands expect bounding boxes to be specified in the format
min_lon,min_lat,max_lon,max_lat. We frequently find bounding boxes using the convenient Klokantech bounding box tool. Selecting the "CSV" format in the lower left will give exactly the format expected by these tools. You can also adapt the bounding box values shown in the region setup panel of Analysis.
When creating a region, the panel will show an osmconvert command pre-filled with the current regional bouding box. If you have osmconvert installed locally, you can paste this command into to your local command line and modify the filenames to crop your OSM data to regional boundaries before upload.
Note that files larger than 500MB may be rejected on upload. Please contact us if you genuinely need to upload a file of this size, or need assistance in cropping and filtering OSM data.
Uploading a GTFS bundle
On the main page for a region, upload your first bundle of GTFS feeds by clicking:
Upload a new GTFS Bundle
You can also click this icon on the sidebar to access GTFS Bundles:
This will take you to the GTFS Bundles page, where you can give the Bundle a name and choose .zip files to upload. If you have multiple GTFS feed .zip files, you can select them by shift-clicking, control-clicking or command-clicking (depending on your browser/operating system). Finally, click the create button to confirm.
Again, note that files larger than 500MB may be rejected on upload. The largest GTFS in regular use are below 400MB so a larger file may indicate a problem. Please contact us if you genuinely need to upload a file of this size.
Creating a Project
Uploading and processing a bundle may take several minutes. Once processing is complete, on the Projects page, click:
Create new Project
This will take you to the Create new Project page, where you can give the Project a name, select a bundle to which the project will be associated, and click the create button to confirm. You are now ready to move on to editing scenarios.