This class is an object representation of the 'build-config.json'.
These are parameters that when changed, necessitate a Graph rebuild. They are distinct from the RouterParameters which can be applied to a pre-built graph or on the fly at runtime. Eventually both classes may be initialized from the same config file so make sure there is no overlap in the JSON keys used.
These used to be command line parameters, but there were getting to be too many of them and besides, we want to allow different graph build configuration for each Graph.
TODO maybe have only one giant config file and just annotate the parameters to indicate which ones trigger a rebuild ...or just feed the same JSON tree to two different classes, one of which is the build configuration and the other is the router configuration.
name | data type | constraints | description |
---|---|---|---|
configVersion | string | The config-version is a parameter which each OTP deployment may set to be able to
query the OTP server and verify that it uses the correct version of the config. The
version must be injected into the config in the operation deployment pipeline. How this
is done is up to the deployment.
The config-version have no effect on OTP, and is provided as is on the API. There is no syntax or format check on the version and it can be any string. Be aware that OTP uses the config embedded in the loaded graph if no new config is provided.
This parameter is optional, and the default is |
|
dataImportReport | boolean | required | Generates nice HTML report of Graph errors/warnings. They are stored in the same location as the graph. |
maxDataImportIssuesPerFile | number | required | If the number of issues is larger then #maxDataImportIssuesPerFile , then the files
will be split in multiple files. Since browsers have problems opening large HTML files.
|
transit | boolean | required | Include all transit input files (GTFS) from scanned directory. |
parentStopLinking | boolean | required | Link GTFS stops to their parent stops. |
stationTransfers | boolean | required | Create direct transfers between the constituent stops of each parent station. |
subwayAccessTime | number | required | Minutes necessary to reach stops served by trips on routes of route_type=1 (subway) from the street. Perhaps this should be a runtime router parameter rather than a graph build parameter. |
streets | boolean | required | Include street input files (OSM/PBF). |
embedRouterConfig | boolean | required | Embed the Router config in the graph, which allows it to be sent to a server fully configured over the wire. |
areaVisibility | boolean | required | Perform visibility calculations on OSM areas (these calculations can be time consuming). |
platformEntriesLinking | boolean | required | Link unconnected entries to public transport platforms. |
matchBusRoutesToStreets | boolean | required | Based on GTFS shape data, guess which OSM streets each bus runs on to improve stop linking. |
elevationBucket | S3BucketConfig | If specified, download NED elevation tiles from the given AWS S3 bucket. | |
elevationUnitMultiplier | number | required | Unit conversion multiplier for elevation values. No conversion needed if the elevation values are defined in meters in the source data. If, for example, decimetres are used in the source data, this should be set to 0.1. |
fareServiceFactory | FareServiceFactory | A specific fares service to use. | |
customNamer | CustomNamer | A custom OSM namer to use. | |
osmWayPropertySet | WayPropertySetSource | Custom OSM way properties | |
osmCacheDataInMem | boolean | required | When loading OSM data, the input is streamed 3 times - one phase for processing RELATIONS,
one for WAYS and last one for NODES. Instead of reading the data source 3 times it might be
faster to cache the entire osm file im memory. The trade off is of cause that OTP might use
more memory while loading osm data. You can use this parameter to choose what is best for
your deployment depending on your infrastructure. Set the parameter to true to cache
the data, and to false to read the stream from the source each time. The default
value is false .
|
staticParkAndRide | boolean | required | Whether we should create car P+R stations from OSM data. |
staticBikeParkAndRide | boolean | required | Whether we should create bike P+R stations from OSM data. |
maxInterlineDistance | number | required | Maximal distance between stops in meters that will connect consecutive trips that are made with same vehicle |
pruningThresholdIslandWithoutStops | number | required | This field indicates the pruning threshold for islands without stops. Any such island under this size will be pruned. |
pruningThresholdIslandWithStops | number | required | This field indicates the pruning threshold for islands with stops. Any such island under this size will be pruned. |
banDiscouragedWalking | boolean | required | This field indicates whether walking should be allowed on OSM ways tagged with "foot=discouraged". |
banDiscouragedBiking | boolean | required | This field indicates whether bicycling should be allowed on OSM ways tagged with "bicycle=discouraged". |
maxTransferDurationSeconds | number | required | Transfers up to this duration with the default walk speed value will be pre-calculated and included in the Graph. |
extraEdgesStopPlatformLink | boolean | This will add extra edges when linking a stop to a platform, to prevent detours along the platform edge. | |
distanceBetweenElevationSamples | number | required | The distance between elevation samples in meters. Defaults to 10m, the approximate resolution of 1/3 arc-second NED data. This should not be smaller than the horizontal resolution of the height data used. |
readCachedElevations | boolean | required | When set to true (it is by default), the elevation module will attempt to read this file in order to reuse calculations of elevation data for various coordinate sequences instead of recalculating them all over again. |
writeCachedElevations | boolean | required | When set to true (it is false by default), the elevation module will create a file of a lookup map of the LineStrings and the corresponding calculated elevation data for those coordinates. Subsequent graph builds can reuse the data in this file to avoid recalculating all the elevation data again. |
includeEllipsoidToGeoidDifference | boolean | required | When set to true (it is false by default), the elevation module will include the Ellipsoid to Geiod difference in the calculations of every point along every StreetWithElevationEdge in the graph. NOTE: if this is set to true for graph building, make sure to not set the value of RoutingResource#geoidElevation to true otherwise OTP will add this geoid value again to all of the elevation values in the street edges. |
multiThreadElevationCalculations | boolean | required | Whether or not to multi-thread the elevation calculations in the elevation module. The default is set to false. For unknown reasons that seem to depend on data and machine settings, it might be faster to use a single processor. If multi-threading is activated, parallel streams will be used to calculate the elevations. |
transitServiceStart | string | Limit the import of transit services to the given START date. Inclusive. If set, any transit
service on a day BEFORE the given date is dropped and will not be part of the graph.
Use an absolute date or a period relative to the date the graph is build(BUILD_DAY).
Optional, defaults to "-P1Y" (BUILD_DAY minus 1 year). Use an empty string to make it unbounded. Examples:
|
|
transitServiceEnd | string | Limit the import of transit services to the given END date. Inclusive. If set, any transit
service on a day AFTER the given date is dropped and will not be part of the graph.
Use an absolute date or a period relative to the date the graph is build(BUILD_DAY).
Optional, defaults to "P3Y" (BUILD_DAY plus 3 years). Use an empty string to make it unbounded. Examples:
|
|
netex | NetexConfig | Netex specific build parameters. | |
storage | StorageConfig | Otp auto detect input and output files using the command line supplied paths. This parameter make it possible to override this by specifying a path for each file. All parameters in the storage section is optional, and the fallback is to use the auto detection. It is OK to autodetect some file and specify the path to others. | |
transferRequests | array of RoutingRequest | ||
maxAreaNodes | number | required | Visibility calculations for an area will not be done if there are more nodes than this limit. |
dataOverlay | DataOverlayConfig | Config for the DataOverlay Sandbox module | |
maxStopToShapeSnapDistance | number | required | This field is used for mapping routes geometry shapes. It determines max distance between shape points and their stop sequence. If mapper can not find any stops within this radius it will default to simple stop-to-stop geometry instead. |
default | boolean | required | If true the config is loaded from file, in not the DEFAULT config is used.
|
transitServicePeriod | ServiceDateInterval | ||
subwayAccessTimeSeconds | number | required |
Example
{ "configVersion" : "...", "dataImportReport" : true, "maxDataImportIssuesPerFile" : 12345, "transit" : true, "parentStopLinking" : true, "stationTransfers" : true, "subwayAccessTime" : 12345.0, "streets" : true, "embedRouterConfig" : true, "areaVisibility" : true, "platformEntriesLinking" : true, "matchBusRoutesToStreets" : true, "elevationBucket" : { "accessKey" : "...", "secretKey" : "...", "bucketName" : "..." }, "elevationUnitMultiplier" : 12345.0, "fareServiceFactory" : { }, "customNamer" : { }, "osmWayPropertySet" : { "intersectionTraversalCostModel" : { } }, "osmCacheDataInMem" : true, "staticParkAndRide" : true, "staticBikeParkAndRide" : true, "maxInterlineDistance" : 12345, "pruningThresholdIslandWithoutStops" : 12345, "pruningThresholdIslandWithStops" : 12345, "banDiscouragedWalking" : true, "banDiscouragedBiking" : true, "maxTransferDurationSeconds" : 12345.0, "extraEdgesStopPlatformLink" : true, "distanceBetweenElevationSamples" : 12345.0, "readCachedElevations" : true, "writeCachedElevations" : true, "includeEllipsoidToGeoidDifference" : true, "multiThreadElevationCalculations" : true, "transitServiceStart" : "...", "transitServiceEnd" : "...", "netex" : { "netexFeedId" : "...", "ignoreFilePattern" : { }, "sharedFilePattern" : { }, "sharedGroupFilePattern" : { }, "groupFilePattern" : { }, "ferryIdsNotAllowedForBicycle" : [ "...", "..." ] }, "storage" : { "gsCredentials" : "...", "streetGraph" : "...", "graph" : "...", "osm" : [ "...", "..." ], "dem" : [ "...", "..." ], "gtfs" : [ "...", "..." ], "netex" : [ "...", "..." ], "buildReportDir" : "...", "localFileNamePatterns" : { "gtfs" : { }, "netex" : { }, "osm" : { }, "dem" : { } } }, "transferRequests" : [ { "parameters" : { "property1" : "...", "property2" : "..." }, "from" : { "label" : "...", "stopId" : { }, "lat" : 12345.0, "lng" : 12345.0, "coordinate" : { }, "specified" : true }, "to" : { "label" : "...", "stopId" : { }, "lat" : 12345.0, "lng" : 12345.0, "coordinate" : { }, "specified" : true }, "maxDirectStreetDurationSeconds" : 12345.0, "maxAccessEgressDurationSeconds" : 12345.0, "maxAccessEgressDurationSecondsForMode" : { "property1" : 12345.0, "property2" : 12345.0 }, "modes" : { "accessMode" : "WALK", "transferMode" : "BIKE", "egressMode" : "CAR", "directMode" : "WALK", "transitModes" : [ { }, { } ] }, "streetSubRequestModes" : { "bicycle" : true, "walk" : true, "car" : true, "tram" : true, "bus" : true, "gondola" : true, "ferry" : true, "cableCar" : true, "funicular" : true, "rail" : true, "trolleyBus" : true, "subway" : true, "airplane" : true, "transit" : true, "nonTransitSet" : { }, "modes" : [ "BUS", "TRAM" ], "valid" : true, "asStr" : "..." }, "bicycleOptimizeType" : "SAFE", "searchWindow" : 12345, "maxJourneyDuration" : 12345, "pageCursor" : { "type" : "NEXT_PAGE", "originalSortOrder" : "STREET_AND_DEPARTURE_TIME", "earliestDepartureTime" : 12345, "latestArrivalTime" : 12345, "searchWindow" : 12345 }, "timetableView" : true, "arriveBy" : true, "wheelchairAccessible" : true, "numItineraries" : 12345, "maxWheelchairSlope" : 12345.0, "showIntermediateStops" : true, "walkSpeed" : 12345.0, "bikeSpeed" : 12345.0, "bikeWalkingSpeed" : 12345.0, "carSpeed" : 12345.0, "locale" : "...", "transferCost" : 12345, "transferOptimization" : { }, "walkReluctance" : 12345.0, "bikeWalkingReluctance" : 12345.0, "bikeReluctance" : 12345.0, "carReluctance" : 12345.0, "stairsTimeFactor" : 12345.0, "stairsReluctance" : 12345.0, "turnReluctance" : 12345.0, "elevatorBoardTime" : 12345, "elevatorBoardCost" : 12345, "elevatorHopTime" : 12345, "elevatorHopCost" : 12345, "bikeSwitchTime" : 12345, "bikeSwitchCost" : 12345, "vehicleRentalPickupTime" : 12345, "vehicleRentalPickupCost" : 12345, "vehicleRentalDropoffTime" : 12345, "vehicleRentalDropoffCost" : 12345, "allowedVehicleRentalNetworks" : [ "...", "..." ], "bannedVehicleRentalNetworks" : [ "...", "..." ], "bikeParkTime" : 12345, "bikeParkCost" : 12345, "carParkTime" : 12345, "carParkCost" : 12345, "requiredVehicleParkingTags" : [ "...", "..." ], "bannedVehicleParkingTags" : [ "...", "..." ], "carDropoffTime" : 12345, "carPickupTime" : 12345, "carPickupCost" : 12345, "waitReluctance" : 12345.0, "walkBoardCost" : 12345, "bikeBoardCost" : 12345, "transferSlack" : 12345, "boardSlack" : 12345, "boardSlackForMode" : { "property1" : 12345, "property2" : 12345 }, "alightSlack" : 12345, "alightSlackForMode" : { "property1" : 12345, "property2" : 12345 }, "maxTransfers" : 12345, "bikeTriangleTimeFactor" : 12345.0, "bikeTriangleSlopeFactor" : 12345.0, "bikeTriangleSafetyFactor" : 12345.0, "useVehicleRentalAvailabilityInformation" : true, "allowKeepingRentedVehicleAtDestination" : true, "keepingRentedVehicleAtDestinationCost" : 12345.0, "carDecelerationSpeed" : 12345.0, "carAccelerationSpeed" : 12345.0, "ignoreRealtimeUpdates" : true, "includePlannedCancellations" : true, "disableRemainingWeightHeuristic" : true, "rctx" : { "opt" : { }, "graph" : { }, "fromVertices" : [ { }, { } ], "toVertices" : [ { }, { } ], "bannedRoutes" : [ { }, { } ], "originBackEdge" : { }, "remainingWeightHeuristic" : { }, "aborted" : true, "slopeRestrictionRemoved" : true, "dataOverlayContext" : { } }, "vehicleRental" : true, "parkAndRide" : true, "carPickup" : true, "allowedRentalFormFactors" : [ "CAR", "BICYCLE" ], "useVehicleParkingAvailabilityInformation" : true, "dominanceFunction" : { }, "geoidElevation" : true, "itineraryFilters" : { "debug" : true, "groupSimilarityKeepOne" : 12345.0, "groupSimilarityKeepThree" : 12345.0, "groupedOtherThanSameLegsMaxCostMultiplier" : 12345.0, "transitGeneralizedCostLimit" : { }, "bikeRentalDistanceRatio" : 12345.0, "parkAndRideDurationRatio" : 12345.0, "nonTransitGeneralizedCostLimit" : { } }, "dataOverlay" : { "empty" : true }, "raptorDebuging" : { }, "dateTime" : 12345, "tripPlannedForNow" : true, "numItinerariesForDirectStreetSearch" : 12345, "itinerariesSortOrder" : "STREET_AND_DEPARTURE_TIME", "routingContext" : { "opt" : { }, "graph" : { }, "fromVertices" : [ { }, { } ], "toVertices" : [ { }, { } ], "bannedRoutes" : [ { }, { } ], "originBackEdge" : { }, "remainingWeightHeuristic" : { }, "aborted" : true, "slopeRestrictionRemoved" : true, "dataOverlayContext" : { } }, "streetSpeedUpperBound" : 12345.0, "newShortestPathTree" : { "options" : { }, "dominanceFunction" : { }, "paths" : [ { }, { } ], "vertices" : [ { }, { } ], "vertexCount" : 12345, "allStates" : [ { }, { } ] }, "intersectionTraversalCostModel" : { } }, { "parameters" : { "property1" : "...", "property2" : "..." }, "from" : { "label" : "...", "stopId" : { }, "lat" : 12345.0, "lng" : 12345.0, "coordinate" : { }, "specified" : true }, "to" : { "label" : "...", "stopId" : { }, "lat" : 12345.0, "lng" : 12345.0, "coordinate" : { }, "specified" : true }, "maxDirectStreetDurationSeconds" : 12345.0, "maxAccessEgressDurationSeconds" : 12345.0, "maxAccessEgressDurationSecondsForMode" : { "property1" : 12345.0, "property2" : 12345.0 }, "modes" : { "accessMode" : "CAR_RENTAL", "transferMode" : "NOT_SET", "egressMode" : "BIKE", "directMode" : "FLEXIBLE", "transitModes" : [ { }, { } ] }, "streetSubRequestModes" : { "bicycle" : true, "walk" : true, "car" : true, "tram" : true, "bus" : true, "gondola" : true, "ferry" : true, "cableCar" : true, "funicular" : true, "rail" : true, "trolleyBus" : true, "subway" : true, "airplane" : true, "transit" : true, "nonTransitSet" : { }, "modes" : [ "CABLE_CAR", "BICYCLE" ], "valid" : true, "asStr" : "..." }, "bicycleOptimizeType" : "QUICK", "searchWindow" : 12345, "maxJourneyDuration" : 12345, "pageCursor" : { "type" : "NEXT_PAGE", "originalSortOrder" : "STREET_AND_ARRIVAL_TIME", "earliestDepartureTime" : 12345, "latestArrivalTime" : 12345, "searchWindow" : 12345 }, "timetableView" : true, "arriveBy" : true, "wheelchairAccessible" : true, "numItineraries" : 12345, "maxWheelchairSlope" : 12345.0, "showIntermediateStops" : true, "walkSpeed" : 12345.0, "bikeSpeed" : 12345.0, "bikeWalkingSpeed" : 12345.0, "carSpeed" : 12345.0, "locale" : "...", "transferCost" : 12345, "transferOptimization" : { }, "walkReluctance" : 12345.0, "bikeWalkingReluctance" : 12345.0, "bikeReluctance" : 12345.0, "carReluctance" : 12345.0, "stairsTimeFactor" : 12345.0, "stairsReluctance" : 12345.0, "turnReluctance" : 12345.0, "elevatorBoardTime" : 12345, "elevatorBoardCost" : 12345, "elevatorHopTime" : 12345, "elevatorHopCost" : 12345, "bikeSwitchTime" : 12345, "bikeSwitchCost" : 12345, "vehicleRentalPickupTime" : 12345, "vehicleRentalPickupCost" : 12345, "vehicleRentalDropoffTime" : 12345, "vehicleRentalDropoffCost" : 12345, "allowedVehicleRentalNetworks" : [ "...", "..." ], "bannedVehicleRentalNetworks" : [ "...", "..." ], "bikeParkTime" : 12345, "bikeParkCost" : 12345, "carParkTime" : 12345, "carParkCost" : 12345, "requiredVehicleParkingTags" : [ "...", "..." ], "bannedVehicleParkingTags" : [ "...", "..." ], "carDropoffTime" : 12345, "carPickupTime" : 12345, "carPickupCost" : 12345, "waitReluctance" : 12345.0, "walkBoardCost" : 12345, "bikeBoardCost" : 12345, "transferSlack" : 12345, "boardSlack" : 12345, "boardSlackForMode" : { "property1" : 12345, "property2" : 12345 }, "alightSlack" : 12345, "alightSlackForMode" : { "property1" : 12345, "property2" : 12345 }, "maxTransfers" : 12345, "bikeTriangleTimeFactor" : 12345.0, "bikeTriangleSlopeFactor" : 12345.0, "bikeTriangleSafetyFactor" : 12345.0, "useVehicleRentalAvailabilityInformation" : true, "allowKeepingRentedVehicleAtDestination" : true, "keepingRentedVehicleAtDestinationCost" : 12345.0, "carDecelerationSpeed" : 12345.0, "carAccelerationSpeed" : 12345.0, "ignoreRealtimeUpdates" : true, "includePlannedCancellations" : true, "disableRemainingWeightHeuristic" : true, "rctx" : { "opt" : { }, "graph" : { }, "fromVertices" : [ { }, { } ], "toVertices" : [ { }, { } ], "bannedRoutes" : [ { }, { } ], "originBackEdge" : { }, "remainingWeightHeuristic" : { }, "aborted" : true, "slopeRestrictionRemoved" : true, "dataOverlayContext" : { } }, "vehicleRental" : true, "parkAndRide" : true, "carPickup" : true, "allowedRentalFormFactors" : [ "SCOOTER", "SCOOTER" ], "useVehicleParkingAvailabilityInformation" : true, "dominanceFunction" : { }, "geoidElevation" : true, "itineraryFilters" : { "debug" : true, "groupSimilarityKeepOne" : 12345.0, "groupSimilarityKeepThree" : 12345.0, "groupedOtherThanSameLegsMaxCostMultiplier" : 12345.0, "transitGeneralizedCostLimit" : { }, "bikeRentalDistanceRatio" : 12345.0, "parkAndRideDurationRatio" : 12345.0, "nonTransitGeneralizedCostLimit" : { } }, "dataOverlay" : { "empty" : true }, "raptorDebuging" : { }, "dateTime" : 12345, "tripPlannedForNow" : true, "numItinerariesForDirectStreetSearch" : 12345, "itinerariesSortOrder" : "STREET_AND_ARRIVAL_TIME", "routingContext" : { "opt" : { }, "graph" : { }, "fromVertices" : [ { }, { } ], "toVertices" : [ { }, { } ], "bannedRoutes" : [ { }, { } ], "originBackEdge" : { }, "remainingWeightHeuristic" : { }, "aborted" : true, "slopeRestrictionRemoved" : true, "dataOverlayContext" : { } }, "streetSpeedUpperBound" : 12345.0, "newShortestPathTree" : { "options" : { }, "dominanceFunction" : { }, "paths" : [ { }, { } ], "vertices" : [ { }, { } ], "vertexCount" : 12345, "allStates" : [ { }, { } ] }, "intersectionTraversalCostModel" : { } } ], "maxAreaNodes" : 12345, "dataOverlay" : { "longitudeVariable" : "...", "indexVariables" : [ { "variable" : "...", "name" : "...", "displayName" : "..." }, { "variable" : "...", "name" : "...", "displayName" : "..." } ], "fileName" : "...", "timeFormat" : "SECONDS", "latitudeVariable" : "...", "timeVariable" : "...", "parameterBindings" : { } }, "maxStopToShapeSnapDistance" : 12345.0, "default" : true, "transitServicePeriod" : { "unbounded" : true, "start" : { "year" : 12345, "month" : 12345, "day" : 12345, "minMax" : true }, "end" : { "year" : 12345, "month" : 12345, "day" : 12345, "minMax" : true } }, "subwayAccessTimeSeconds" : 12345 }