Skip to main content

Rail route path

Contents

This endpoint takes in station locations on a freight rail route and returns the rail route path as a series of latitude/longitude coordinates.

POST /route/Path

Resource URL

‚Äčhttps://pcmrail.alk.com/REST/v{version}/Service.svc/route/Path

Path Parameter

Parameter Definition Data Type Required
version The version of PC*MILER Rail you want to use to generate reports. See available versions.
string
Y

POST Body Parameters

Parameter Definition Data Type Required
Stops An object containing the list of stations in the route.
object
Y
Options An object containing options to customize the route generated.
object
N

Stops Object

Parameter Definition Data Type Required
Format The format for how you want to enter station names. Options are:

StationState: Full station name, space, and state abbreviation or at least one letter of the station name, *, space, and state abbreviation.

FSAC: Full 5-digit FSAC or at least the first 3 digits and *

SPLC: Full 6-digit SPLC or at least the first first 3 digits and *

ERPC: Full ERPC code also called 3-3-3 or at least one letter of ERPC, *, space, and state abbreviation

R260: Rule260 junction code

enum
Y
Name The name of the station on the route, in the format set by the Format parameter.
string
Y
Railroad The two- to four-character Standard Carrier Alpha Code. See list of available railroads.
string
Y

Options Object

Parameter Definition Data Type Required
RoutingPreference The type of routing to use in calculations. Options are:

Practical: Practical routing is optimal for general merchandise traffic.

Intermodal: Intermodal routing is specific to intermodal trains. Only locations with intermodal service can be entered as origin/destinations.

Shortest: Shortest routing will route to the shortest path.

CoalBulk: Coal/Bulk Routing is specific to Coal/Bulk unit trains.

AutoRacks: AutoRack routing is specific to multi-levels.

FuelSurcharge: Fuel Surcharge routing is practical or shortest routing depending on the railroad.

enum
N, default is FuelSurcharge
AmtrakRoutes Whether or not to all routes that originate or terminate on Amtrak.
boolean
N, default is true
IntermodalOnlyStations Whether or not to include stations that exclusively serves only intermodal traffic.
boolean
N, default is true
DistUnit Sets whether to use Miles or Kilometers in distance measurements.
enum
N, default is Miles

Sample Request POST Body

{
  "Stops": [
    {
      "Format": "StationState",
      "Name": "Denver, CO",
      "Railroad": "BNSF"
    },
    {
      "Format": "StationState",
      "Name": "pueblo co",
      "Railroad": "BNSF"
    }
  ],
  "Options": {
    "RoutingPreference": "Practical",
    "AmtrakRoutes": true,
    "IntermodalOnlyStations": true,
    "DistUnit": "Miles"
  }
}

Sample Response

{
  "type": "Feature",
  "geometry": {
    "type": "MultiLineString",
    "coordinates": [
      [
        [-104.984991, 39.77248],
        [-104.990515, 39.767947],
        [-104.992283, 39.766],
        [-104.992756, 39.764481],
        [-104.994789, 39.762298],
        [-104.995737, 39.762037],
        [-104.999294, 39.760581],
        [-104.999809, 39.760003],
        [-105.001337, 39.757339],
        [-105.002349, 39.756578],
        [-105.007937, 39.749872],
        [-105.01385, 39.746414],
        [-105.014309, 39.743541],
        [-105.012697, 39.741392],
        [-105.011082, 39.737195],
        [-105.010791, 39.725191],
        [-105.009254, 39.722382],
        [-104.999065, 39.714242],
        [-104.996039, 39.711511],
        [-104.993918, 39.708846],
        [-104.99259, 39.707092],
        [-104.990643, 39.700352],
        [-104.989347, 39.693332],
        [-104.997366, 39.661836],
        [-105.005929, 39.640104],
        [-105.010473, 39.623924],
        [-105.014039, 39.613323],
        [-105.014813, 39.611998],
        [-105.015392, 39.611035],
        [-105.019513, 39.60366],
        [-105.021653, 39.591607],
        [-105.022059, 39.588562],
        [-105.022754, 39.584279],
        [-105.029638, 39.570729],
        [-105.032001, 39.563577],
        [-105.035992, 39.559676],
        [-105.042137, 39.555573],
        [-105.044778, 39.552065],
        [-105.044703, 39.547831],
        [-105.042235, 39.540664],
        [-105.030781, 39.526184],
        [-105.029466, 39.523564],
        [-105.02571, 39.517132],
        [-105.02052, 39.510701],
        [-105.018745, 39.506562],
        [-105.013529, 39.499023],
        [-105.012871, 39.497426],
        [-105.012192, 39.496035],
        [-105.006446, 39.489638],
        [-105.001716, 39.487691],
        [-104.998566, 39.485335],
        [-104.995978, 39.479911],
        [-104.993659, 39.474109],
        [-104.989201, 39.468023],
        [-104.987244, 39.462104],
        [-104.978517, 39.44961],
        [-104.976502, 39.440703],
        [-104.973701, 39.438708],
        [-104.958726, 39.436499],
        [-104.956541, 39.436496],
        [-104.950844, 39.435117],
        [-104.932079, 39.430958],
        [-104.925686, 39.428445],
        [-104.921302, 39.42469],
        [-104.912016, 39.421591],
        [-104.895917, 39.416002],
        [-104.883906, 39.408932],
        [-104.876426, 39.401106],
        [-104.872152, 39.395231],
        [-104.868761, 39.382701],
        [-104.86574, 39.375116],
        [-104.865634, 39.372797],
        [-104.86549, 39.368956],
        [-104.86777, 39.365187],
        [-104.867954, 39.361146],
        [-104.870141, 39.355172],
        [-104.873302, 39.348041],
        [-104.880233, 39.328827],
        [-104.889924, 39.302082],
        [-104.891162, 39.298575],
        [-104.896354, 39.289246],
        [-104.898442, 39.275961],
        [-104.896889, 39.266549],
        [-104.889146, 39.254484],
        [-104.884483, 39.247757],
        [-104.883216, 39.237494],
        [-104.883995, 39.235066],
        [-104.886249, 39.228278],
        [-104.887916, 39.221953],
        [-104.885939, 39.218306],
        [-104.877517, 39.211539],
        [-104.874636, 39.208081],
        [-104.861659, 39.195346],
        [-104.857693, 39.183768],
        [-104.856617, 39.180375],
        [-104.857032, 39.178087],
        [-104.865285, 39.167842],
        [-104.882715, 39.153136],
        [-104.884789, 39.150798],
        [-104.88855, 39.146371],
        [-104.892218, 39.139494],
        [-104.902287, 39.132165],
        [-104.905041, 39.128498],
        [-104.908389, 39.126495],
        [-104.9128, 39.123847],
        [-104.913719, 39.121904],
        [-104.912591, 39.119556],
        [-104.905734, 39.116981],
        [-104.90284, 39.114724],
        [-104.897007, 39.113788],
        [-104.892532, 39.111309],
        [-104.888362, 39.109308],
        [-104.882856, 39.109434],
        [-104.879965, 39.10811],
        [-104.879193, 39.104934],
        [-104.878297, 39.10299],
        [-104.874127, 39.100978],
        [-104.873668, 39.100408],
        [-104.873376, 39.095969],
        [-104.875098, 39.09108],
        [-104.873732, 39.087872],
        [-104.870771, 39.084563],
        [-104.870448, 39.078897],
        [-104.867829, 39.074846],
        [-104.864941, 39.069575],
        [-104.864758, 39.067051],
        [-104.861458, 39.059391],
        [-104.861816, 39.055253],
        [-104.857701, 39.049164],
        [-104.854646, 39.047812],
        [-104.84976, 39.041141],
        [-104.848242, 39.036129],
        [-104.849087, 39.033823],
        [-104.843344, 39.0224],
        [-104.840266, 39.015054],
        [-104.835577, 39.010519],
        [-104.83465, 39.008128],
        [-104.834396, 39.004102],
        [-104.830774, 38.999985],
        [-104.831159, 38.998001],
        [-104.83292, 38.995379],
        [-104.831514, 38.988881],
        [-104.830932, 38.986073],
        [-104.835223, 38.96846],
        [-104.836911, 38.958842],
        [-104.834286, 38.953227],
        [-104.83142, 38.95156],
        [-104.821733, 38.939013],
        [-104.816784, 38.928501],
        [-104.817858, 38.92582],
        [-104.819783, 38.922658],
        [-104.821989, 38.915329],
        [-104.824412, 38.907217],
        [-104.824906, 38.901551],
        [-104.827401, 38.893298],
        [-104.830088, 38.885286],
        [-104.830815, 38.879399],
        [-104.832936, 38.874812],
        [-104.832502, 38.868871],
        [-104.832063, 38.866195],
        [-104.833345, 38.858937],
        [-104.831901, 38.85449],
        [-104.828686, 38.837776],
        [-104.829487, 38.832742],
        [-104.83097, 38.827512],
        [-104.830827, 38.822427],
        [-104.8288, 38.8207],
        [-104.824045, 38.820822],
        [-104.805863, 38.814027],
        [-104.800082, 38.810172],
        [-104.795335, 38.807967],
        [-104.794158, 38.8071],
        [-104.785627, 38.798538],
        [-104.782956, 38.796941],
        [-104.77455, 38.790683],
        [-104.769457, 38.779948],
        [-104.768658, 38.778259],
        [-104.725979, 38.73228],
        [-104.71863, 38.723698],
        [-104.705103, 38.696814],
        [-104.703665, 38.683899],
        [-104.701737, 38.665155],
        [-104.694938, 38.64863],
        [-104.691713, 38.644075],
        [-104.691611, 38.641244],
        [-104.691976, 38.637528],
        [-104.68725, 38.618259],
        [-104.676917, 38.602079],
        [-104.666204, 38.585658],
        [-104.665197, 38.584302],
        [-104.655617, 38.570877],
        [-104.644339, 38.547875],
        [-104.642611, 38.543254],
        [-104.629188, 38.516974],
        [-104.621485, 38.499868],
        [-104.608921, 38.468069],
        [-104.605946, 38.455495],
        [-104.605362, 38.443607],
        [-104.60577, 38.43804],
        [-104.606564, 38.426852],
        [-104.61061, 38.40837],
        [-104.611243, 38.405523],
        [-104.612334, 38.400551],
        [-104.614398, 38.395227],
        [-104.623489, 38.383163],
        [-104.627704, 38.380782],
        [-104.635379, 38.376776],
        [-104.637434, 38.374017],
        [-104.638869, 38.365228],
        [-104.647788, 38.345856],
        [-104.650067, 38.335843],
        [-104.649107, 38.330986],
        [-104.645808, 38.325549],
        [-104.645029, 38.32147],
        [-104.648292, 38.305173],
        [-104.646869, 38.301025],
        [-104.635255, 38.283305],
        [-104.630928, 38.275506],
        [-104.629121, 38.273466]
      ]
    ]
  }
}
Last updated December 14, 2021.
Contents