Configure paths to each individual file resource. Use URIs to specify paths. If a parameter is specified, it override any local files, and the local file is NOT loaded.
Local file access is supported. Use the following URI format:
file:/a/b/c/filename.ext -- Absolute URI ../street/streetGraph.obj -- Relative URI (to OTP base path) graph-${otp.serialization.version.id}.obj -- Relative path with property substitutionGoogle Cloud Storage(GCS) access is supported. Use the following URI format:
gs://bucket-name/a/b/c/blobname.ext
Example build-config.json
:
{ osmWayPropertySet: "norway", storage: { gsCredentials: "${OTP_GOOGLE_SERVICE_ACCOUNT}", osm: [ "gs://otp-test-bucket/a/b/osm-oslo-mini.pbf" ], dem: [ "file:/public/dem/norway.dem.tif" ], gtfs: ["gs://otp-bucket/rut-gtfs.zip", "gs://otp-bucket/vy-gtfs.zip"], buildReportDir: "gs://otp-bucket/build-report" } }In the example above, the Google cloud service credentials file resolved using an environment variable. The OSM and GTFS data is streamed from Google Cloud Storage, the elevation data is fetched from the local file system and the build report is stored in the cloud. All other artifacts like the loaded graph, saved graph and NeTEx files are loaded and written from/to the local base directory - it they exist.
name | data type | constraints | description |
---|---|---|---|
gsCredentials | string | Local file system path to Google Cloud Platform service accounts credentials file. The
credentials is used to access GCS urls. When using GCS from outside of the bucket cluster you
need to provide a path the the service credentials. Environment variables in the path is
resolved.
Example: This is a path to a file on the local file system, not an URI.
This parameter is optional. Default is |
|
streetGraph | string | URI to the street graph object file for reading and writing. The file is created or
overwritten if OTP saves the graph to the file.
Example:
This parameter is optional. Default is |
|
graph | string | URI to the graph object file for reading and writing. The file is created or overwritten if
OTP saves the graph to the file.
Example:
This parameter is optional. Default is |
|
osm | array of string | Array of URIs to the open street map pbf files (the pbf format is the only one supported).
Example: This parameter is optional. |
|
dem | array of string | Array of URIs to elevation data files.
Example: This parameter is optional. |
|
gtfs | array of string | required | Array of URIs to GTFS data files .
Example: This parameter is optional. |
netex | array of string | required | Array of URIs to Netex data files.
Example: This parameter is optional. |
buildReportDir | string | URI to the directory where the graph build report should be written to. The html report is
written into this directory. If the directory exist, any existing files are deleted.
If it does not exist, it is created.
Example:
This parameter is optional. Default is |
|
localFileNamePatterns | LocalFilenamePatterns | Configure patterns for auto-detection of input files in the local base directory. Resolving input files is only provided for files in the base directory not for any external resources. |
Example
{ "gsCredentials" : "...", "streetGraph" : "...", "graph" : "...", "osm" : [ "...", "..." ], "dem" : [ "...", "..." ], "gtfs" : [ "...", "..." ], "netex" : [ "...", "..." ], "buildReportDir" : "...", "localFileNamePatterns" : { "gtfs" : { }, "netex" : { }, "osm" : { }, "dem" : { } } }