text: #include <iostream>
  #include <string>
  #include <vector>
  
  #include "baldr/graphreader.h"
  #include "baldr/rapidjson_utils.h"
  #include "loki/worker.h"
  #include "thor/worker.h"
  
  #include "test.h"
  
  using namespace valhalla;
  using namespace valhalla::thor;
  using namespace valhalla::sif;
  using namespace valhalla::loki;
  using namespace valhalla::baldr;
  using namespace valhalla::midgard;
  using namespace valhalla::tyr;
  
  namespace {
  
  const auto config = test::json_to_pt(R"({
      "mjolnir":{"tile_dir":"test/data/utrecht_tiles", "concurrency": 1},
      "loki":{
        "actions":["sources_to_targets"],
        "logging":{"long_request": 100},
        "service_defaults":{"minimum_reachability": 50,"radius": 0,"search_cutoff": 35000, "node_snap_tolerance": 5, "street_side_tolerance": 5, "street_side_max_distance": 1000, "heading_tolerance": 60}
      },
      "thor":{
        "logging":{"long_request": 100}
      },
      "meili":{
        "grid": {"cache_size": 100240,"size": 500},
        "default": {"breakage_distance": 2000}
      },
      "service_limits": {
        "auto": {"max_distance": 5000000.0, "max_locations": 20,"max_matrix_distance": 400000.0,"max_matrix_locations": 50},
        "auto_shorter": {"max_distance": 5000000.0,"max_locations": 20,"max_matrix_distance": 400000.0,"max_matrix_locations": 50},
        "bicycle": {"max_distance": 500000.0,"max_locations": 50,"max_matrix_distance": 200000.0,"max_matrix_locations": 50},
        "bus": {"max_distance": 5000000.0,"max_locations": 50,"max_matrix_distance": 400000.0,"max_matrix_locations": 50},
        "hov": {"max_distance": 5000000.0,"max_locations": 20,"max_matrix_distance": 400000.0,"max_matrix_locations": 50},
        "taxi": {"max_distance": 5000000.0,"max_locations": 20,"max_matrix_distance": 400000.0,"max_matrix_locations": 50},
        "isochrone": {"max_contours": 4,"max_distance": 25000.0,"max_locations": 1,"max_time": 120},
        "max_avoid_locations": 50,"max_radius": 200,"max_reachability": 100,"max_alternates":2,
        "multimodal": {"max_distance": 500000.0,"max_locations": 50,"max_matrix_distance": 0.0,"max_matrix_locations": 0},
        "pedestrian": {"max_distance": 250000.0,"max_locations": 50,"max_matrix_distance": 200000.0,"max_matrix_locations": 50,"max_transit_walking_distance": 10000,"min_transit_walking_distance": 1},
        "skadi": {"max_shape": 750000,"min_resample": 10.0},
        "trace": {"max_distance": 200000.0,"max_gps_accuracy": 100.0,"max_search_radius": 100,"max_shape": 16000,"max_best_paths":4,"max_best_paths_shape":100},
        "transit": {"max_distance": 500000.0,"max_locations": 50,"max_matrix_distance": 200000.0,"max_matrix_locations": 50},
        "truck": {"max_distance": 5000000.0,"max_locations": 20,"max_matrix_distance": 400000.0,"max_matrix_locations": 50}
      }
    })");
  
  void try_isochrone(loki_worker_t& loki_worker,
                     thor_worker_t& thor_worker,
                     const std::string& test_request,
                     const std::string& expected_json) {
    // compute the isochrone
    Api request;
    ParseApi(test_request, Options::isochrone, request);
    loki_worker.isochrones(request);
    auto response_json = thor_worker.isochrones(request);
  
    // Parse isochrone json responses
    rapidjson::Document response, expected_response;
    response.Parse(response_json);
    expected_response.Parse(expected_json);
  
    loki_worker.cleanup();
    thor_worker.cleanup();
  
    ASSERT_EQ(response, expected_response) << "Actual:   " << response_json << std::endl
                                           << "Expected: " << expected_json;
  
  } // namespace
  
  TEST(Isochronies, Basic) {
    // Test setup
    loki_worker_t loki_worker(config);
    thor_worker_t thor_worker(config);
    GraphReader reader(config.get_child("mjolnir"));
  
    {
      const auto expected =
          R"({"features":[{"properties":{"fill-opacity":0.33,"color":"#bf4040","fillColor":"#bf4040","fillOpacity":0.33,"contour":9,"opacity":0.33,"fill":"#bf4040"},"geometry":{"coordinates":[[5.040321,52.125973],[5.038507,52.122940],[5.041320,52.120514],[5.039321,52.119995],[5.037321,52.121387],[5.035835,52.118454],[5.038321,52.116249],[5.051321,52.111626],[5.053597,52.111660],[5.055684,52.115303],[5.049944,52.114941],[5.047333,52.116943],[5.056913,52.119530],[5.056321,52.117290],[5.059051,52.118938],[5.057562,52.119938],[5.062321,52.119022],[5.062781,52.117939],[5.058321,52.117588],[5.057777,52.115944],[5.062922,52.111938],[5.063050,52.109940],[5.059321,52.112587],[5.055534,52.110939],[5.070321,52.097363],[5.071321,52.098785],[5.077322,52.098423],[5.078321,52.100460],[5.082618,52.099644],[5.081657,52.102280],[5.077321,52.104362],[5.077321,52.106606],[5.082400,52.106018],[5.085320,52.103596],[5.089651,52.105610],[5.087321,52.107452],[5.084321,52.106533],[5.081321,52.107544],[5.080321,52.112587],[5.092457,52.110077],[5.094321,52.107834],[5.098457,52.109077],[5.097321,52.105576],[5.100321,52.107735],[5.102321,52.106670],[5.104636,52.107624],[5.107306,52.109959],[5.107985,52.107601],[5.110531,52.108150],[5.111320,52.104523],[5.113321,52.106415],[5.120321,52.106289],[5.125321,52.103390],[5.126001,52.104622],[5.124372,52.104939],[5.129321,52.104511],[5.132321,52.107464],[5.133321,52.105343],[5.140321,52.108669],[5.141321,52.106319],[5.143971,52.108940],[5.142321,52.111130],[5.147980,52.113277],[5.145185,52.119934],[5.146320,52.121944],[5.149516,52.117939],[5.148674,52.113293],[5.154031,52.104652],[5.161815,52.104939],[5.153644,52.102940],[5.159640,52.093258],[5.163073,52.091938],[5.161801,52.079453],[5.151957,52.070934],[5.158932,52.066547],[5.159111,52.064938],[5.156740,52.064358],[5.152321,52.068119],[5.149126,52.065941],[5.149182,52.063801],[5.151695,52.063942],[5.152162,52.058781],[5.160004,52.058937],[5.155123,52.057140],[5.155144,52.055763],[5.159028,52.054939],[5.156138,52.054127],[5.155792,52.051464],[5.145103,52.052147],[5.142321,52.048206],[5.141321,52.050285],[5.124321,52.048191],[5.120321,52.049164],[5.118321,52.046165],[5.114892,52.046509],[5.114080,52.049183],[5.112321,52.046223],[5.111485,52.050106],[5.107570,52.051186],[5.100171,52.050087],[5.098321,52.046253],[5.094321,52.048203],[5.093321,52.046314],[5.090321,52.047264],[5.089321,52.046310],[5.072977,52.046597],[5.066188,52.051071],[5.066422,52.052036],[5.069751,52.051510],[5.071011,52.057247],[5.073607,52.058220],[5.069969,52.058289],[5.068252,52.054867],[5.067759,52.057377],[5.065639,52.057941],[5.067613,52.061939],[5.064690,52.063309],[5.063321,52.066204],[5.033321,52.071575],[5.029840,52.071419],[5.025199,52.067936],[5.026955,52.071575],[5.025321,52.073410],[5.021982,52.073601],[5.022060,52.075203],[5.030321,52.074821],[5.029321,52.075958],[5.034245,52.077938],[5.035321,52.073261],[5.042774,52.072487],[5.043266,52.075939],[5.048321,52.081352],[5.047699,52.078312],[5.051212,52.075935],[5.050321,52.072426],[5.053321,52.077637],[5.052830,52.074448],[5.055662,52.074600],[5.055321,52.077652],[5.059321,52.081093],[5.060320,52.078934],[5.054917,52.070942],[5.060321,52.069595],[5.067614,52.070938],[5.066321,52.075321],[5.062322,52.076435],[5.059293,52.073914],[5.061004,52.077255],[5.069321,52.075623],[5.071554,52.076942],[5.071321,52.081589],[5.054321,52.081932],[5.050951,52.083939],[5.051803,52.085419],[5.049811,52.085449],[5.049321,52.083271],[5.048780,52.085400],[5.045357,52.085934],[5.047319,52.087944],[5.048321,52.086861],[5.054998,52.088261],[5.058052,52.090210],[5.058721,52.092937],[5.063321,52.092392],[5.063768,52.093945],[5.057775,52.096943],[5.059008,52.098625],[5.057233,52.098938],[5.060841,52.098938],[5.060638,52.103939],[5.058321,52.102779],[5.053207,52.103825],[5.049845,52.106937],[5.049421,52.111038],[5.034321,52.116543],[5.029321,52.113617],[5.031767,52.118385],[5.026321,52.120693],[5.023292,52.123940],[5.033321,52.118965],[5.040321,52.125973]],"type":"LineString"},"type":"Feature"}],"type":"FeatureCollection"})";
      const auto request =
          R"({"locations":[{"lat":52.078937,"lon":5.115321}],"costing":"auto","contours":[{"time":9}],"polygons":false,"denoise":0.2,"generalize":100})";
      try_isochrone(loki_worker, thor_worker, request, expected);
    }
  
    {
      const auto expected =
          R"({"features":[{"properties":{"fillOpacity":0.33,"fill-opacity":0.33,"opacity":0.33,"fillColor":"#bf4040","fill":"#bf4040","color":"#bf4040","contour":15},"geometry":{"coordinates":[[[5.116656,52.105274],[5.116321,52.105682],[5.115321,52.104362],[5.114321,52.104870],[5.113321,52.104645],[5.112321,52.104927],[5.111321,52.104362],[5.110504,52.105122],[5.109321,52.105293],[5.108883,52.104939],[5.109858,52.104477],[5.109999,52.103939],[5.108321,52.102577],[5.107902,52.104519],[5.106321,52.105423],[5.104321,52.104939],[5.101321,52.105141],[5.100321,52.104622],[5.098351,52.104973],[5.094643,52.103935],[5.094321,52.101650],[5.095782,52.101398],[5.096973,52.099586],[5.098321,52.098530],[5.100321,52.098286],[5.101321,52.097282],[5.103321,52.097290],[5.103322,52.095806],[5.103030,52.096649],[5.102321,52.096794],[5.095321,52.096756],[5.094321,52.097733],[5.088078,52.097698],[5.087986,52.098270],[5.089509,52.098751],[5.089676,52.099583],[5.090807,52.099937],[5.089321,52.100563],[5.088321,52.100250],[5.087321,52.101742],[5.085685,52.100941],[5.085321,52.099857],[5.082504,52.098938],[5.085321,52.098564],[5.085573,52.097687],[5.081321,52.097309],[5.080321,52.097908],[5.080216,52.096836],[5.081820,52.095940],[5.079321,52.095554],[5.078765,52.094944],[5.079912,52.093525],[5.081638,52.092937],[5.078917,52.092342],[5.078765,52.090939],[5.079895,52.088512],[5.081787,52.087940],[5.081321,52.087151],[5.080253,52.087009],[5.080040,52.083939],[5.081591,52.082211],[5.081661,52.079941],[5.080817,52.079441],[5.078733,52.079350],[5.077898,52.079514],[5.077321,52.080441],[5.076321,52.080605],[5.076161,52.079941],[5.077321,52.078667],[5.082322,52.078293],[5.083060,52.076675],[5.084321,52.075779],[5.084602,52.074657],[5.083025,52.073940],[5.084638,52.072254],[5.084649,52.071609],[5.082177,52.071796],[5.079113,52.074730],[5.078983,52.075603],[5.077865,52.075935],[5.078329,52.076950],[5.077243,52.077019],[5.076986,52.076275],[5.076106,52.076157],[5.075321,52.075344],[5.071819,52.074936],[5.074321,52.074570],[5.075012,52.073635],[5.076706,52.072945],[5.076615,52.071644],[5.074913,52.070938],[5.075072,52.069687],[5.076196,52.068939],[5.075956,52.065575],[5.081321,52.065281],[5.084188,52.062805],[5.086740,52.062355],[5.087599,52.061661],[5.089370,52.061893],[5.088583,52.062939],[5.089038,52.064220],[5.090321,52.064339],[5.090966,52.063580],[5.092715,52.063335],[5.093321,52.062641],[5.093757,52.063938],[5.094321,52.064175],[5.097864,52.060486],[5.100728,52.058342],[5.101321,52.056843],[5.102894,52.057365],[5.104321,52.056190],[5.106467,52.056084],[5.105991,52.054939],[5.105321,52.054501],[5.104326,52.054947],[5.103601,52.054661],[5.103545,52.053940],[5.102666,52.053596],[5.102436,52.052826],[5.100936,52.052326],[5.100321,52.051449],[5.096518,52.051136],[5.096321,52.051624],[5.096117,52.051140],[5.097017,52.050629],[5.102321,52.050480],[5.104321,52.048439],[5.104321,52.050793],[5.103623,52.051941],[5.104321,52.052250],[5.104820,52.051437],[5.107707,52.051323],[5.108322,52.050499],[5.111756,52.050373],[5.112321,52.049007],[5.114426,52.050938],[5.113321,52.052040],[5.112896,52.051361],[5.111029,52.051647],[5.112002,52.052940],[5.112127,52.055134],[5.113824,52.055435],[5.115321,52.056652],[5.121322,52.057217],[5.123321,52.059151],[5.125321,52.059216],[5.126321,52.058231],[5.127517,52.059135],[5.128169,52.056789],[5.131797,52.056416],[5.132321,52.055954],[5.132879,52.056381],[5.136321,52.056900],[5.137321,52.057510],[5.138801,52.057419],[5.139321,52.056988],[5.139910,52.058350],[5.141636,52.059628],[5.141756,52.060944],[5.143844,52.062416],[5.144321,52.064152],[5.144811,52.062428],[5.150010,52.057629],[5.151765,52.057384],[5.152321,52.055866],[5.152515,52.058128],[5.150910,52.058525],[5.148040,52.061939],[5.148321,52.062508],[5.149321,52.062332],[5.149607,52.062653],[5.148851,52.063942],[5.148973,52.065941],[5.151094,52.068169],[5.152321,52.068295],[5.153321,52.067333],[5.154649,52.067268],[5.156321,52.065609],[5.158179,52.065941],[5.156867,52.066486],[5.155650,52.068268],[5.154322,52.068497],[5.153070,52.069687],[5.153321,52.070431],[5.155321,52.070580],[5.155561,52.071178],[5.152321,52.071522],[5.151321,52.070641],[5.149109,52.072937],[5.150067,52.073940],[5.150121,52.075138],[5.151321,52.076328],[5.152969,52.074936],[5.153321,52.073833],[5.153954,52.075306],[5.155539,52.075722],[5.155432,52.078049],[5.153321,52.076458],[5.151885,52.077938],[5.153321,52.079460],[5.154563,52.079697],[5.155321,52.080734],[5.156282,52.080940],[5.156773,52.082939],[5.156047,52.083214],[5.155575,52.082687],[5.154026,52.082233],[5.153663,52.081600],[5.152321,52.081520],[5.151580,52.080681],[5.149875,52.080387],[5.149322,52.079670],[5.149101,52.080940],[5.150076,52.081936],[5.149321,52.082695],[5.147795,52.082466],[5.146440,52.080822],[5.145147,52.080940],[5.145214,52.082047],[5.145978,52.082283],[5.147321,52.084141],[5.149322,52.084198],[5.150321,52.083221],[5.153321,52.083302],[5.154095,52.083939],[5.153717,52.085941],[5.154674,52.087585],[5.155728,52.087940],[5.154321,52.089520],[5.150321,52.089470],[5.149641,52.086941],[5.149321,52.086666],[5.149100,52.086941],[5.149097,52.091164],[5.152321,52.091423],[5.153321,52.090771],[5.154321,52.090908],[5.153684,52.091305],[5.153568,52.093185],[5.152137,52.094128],[5.150321,52.092552],[5.149321,52.093414],[5.148322,52.092606],[5.147380,52.092937],[5.147984,52.094276],[5.149538,52.094723],[5.149871,52.095390],[5.150894,52.095512],[5.151321,52.095196],[5.151906,52.097355],[5.154284,52.097939],[5.153525,52.098141],[5.153330,52.098946],[5.152919,52.098339],[5.152321,52.098278],[5.150918,52.098537],[5.150321,52.099579],[5.147181,52.099083],[5.146686,52.098934],[5.148722,52.098339],[5.148619,52.097641],[5.145321,52.097630],[5.144804,52.097935],[5.146219,52.098938],[5.145744,52.099937],[5.146544,52.100941],[5.146321,52.101742],[5.144989,52.101273],[5.144899,52.099937],[5.144321,52.099487],[5.142838,52.100945],[5.143321,52.101650],[5.144602,52.101940],[5.142791,52.102940],[5.140321,52.102592],[5.140028,52.102230],[5.137537,52.102158],[5.136729,52.102348],[5.136321,52.103081],[5.135886,52.102375],[5.134052,52.101940],[5.133929,52.099545],[5.135321,52.099365],[5.135719,52.098938],[5.135472,52.096786],[5.134633,52.096630],[5.134353,52.095905],[5.133705,52.095940],[5.132703,52.096321],[5.132321,52.096977],[5.130460,52.097076],[5.129322,52.098137],[5.128321,52.098118],[5.127058,52.099674],[5.124400,52.099018],[5.123968,52.099941],[5.124378,52.102940],[5.120322,52.103275],[5.119321,52.102711],[5.116656,52.105274]]],"type":"Polygon"},"type":"Feature"}],"type":"FeatureCollection"})";
      const auto request =
          R"({"locations":[{"lat":52.078937,"lon":5.115321}],"costing":"bicycle","contours":[{"time":15}],"polygons":true,"denoise":0.2})";
      try_isochrone(loki_worker, thor_worker, request, expected);
    }
  
    {
      const auto expected =
          R"({"features":[{"properties":{"fillOpacity":0.33,"fill-opacity":0.33,"opacity":0.33,"fillColor":"#bf4040","fill":"#bf4040","color":"#bf4040","contour":15},"geometry":{"coordinates":[[5.116656,52.105274],[5.116321,52.105682],[5.115321,52.104362],[5.114321,52.104870],[5.113321,52.104645],[5.112321,52.104927],[5.111321,52.104362],[5.110504,52.105122],[5.109321,52.105293],[5.108883,52.104939],[5.109858,52.104477],[5.109999,52.103939],[5.108321,52.102577],[5.107902,52.104519],[5.106321,52.105423],[5.104321,52.104939],[5.101321,52.105141],[5.100321,52.104622],[5.098351,52.104973],[5.094643,52.103935],[5.094321,52.101650],[5.095782,52.101398],[5.096973,52.099586],[5.098321,52.098530],[5.100321,52.098286],[5.101321,52.097282],[5.103321,52.097290],[5.103322,52.095806],[5.103030,52.096649],[5.102321,52.096794],[5.095321,52.096756],[5.094321,52.097733],[5.088078,52.097698],[5.087986,52.098270],[5.089509,52.098751],[5.089676,52.099583],[5.090807,52.099937],[5.089321,52.100563],[5.088321,52.100250],[5.087321,52.101742],[5.085685,52.100941],[5.085321,52.099857],[5.082504,52.098938],[5.085321,52.098564],[5.085573,52.097687],[5.081321,52.097309],[5.080321,52.097908],[5.080216,52.096836],[5.081820,52.095940],[5.079321,52.095554],[5.078765,52.094944],[5.079912,52.093525],[5.081638,52.092937],[5.078917,52.092342],[5.078765,52.090939],[5.079895,52.088512],[5.081787,52.087940],[5.081321,52.087151],[5.080253,52.087009],[5.080040,52.083939],[5.081591,52.082211],[5.081661,52.079941],[5.080817,52.079441],[5.078733,52.079350],[5.077898,52.079514],[5.077321,52.080441],[5.076321,52.080605],[5.076161,52.079941],[5.077321,52.078667],[5.082322,52.078293],[5.083060,52.076675],[5.084321,52.075779],[5.084602,52.074657],[5.083025,52.073940],[5.084638,52.072254],[5.084649,52.071609],[5.082177,52.071796],[5.079113,52.074730],[5.078983,52.075603],[5.077865,52.075935],[5.078329,52.076950],[5.077243,52.077019],[5.076986,52.076275],[5.076106,52.076157],[5.075321,52.075344],[5.071819,52.074936],[5.074321,52.074570],[5.075012,52.073635],[5.076706,52.072945],[5.076615,52.071644],[5.074913,52.070938],[5.075072,52.069687],[5.076196,52.068939],[5.075956,52.065575],[5.081321,52.065281],[5.084188,52.062805],[5.086740,52.062355],[5.087599,52.061661],[5.089370,52.061893],[5.088583,52.062939],[5.089038,52.064220],[5.090321,52.064339],[5.090966,52.063580],[5.092715,52.063335],[5.093321,52.062641],[5.093757,52.063938],[5.094321,52.064175],[5.097864,52.060486],[5.100728,52.058342],[5.101321,52.056843],[5.102894,52.057365],[5.104321,52.056190],[5.106467,52.056084],[5.105991,52.054939],[5.105321,52.054501],[5.104326,52.054947],[5.103601,52.054661],[5.103545,52.053940],[5.102666,52.053596],[5.102436,52.052826],[5.100936,52.052326],[5.100321,52.051449],[5.096518,52.051136],[5.096321,52.051624],[5.096117,52.051140],[5.097017,52.050629],[5.102321,52.050480],[5.104321,52.048439],[5.104321,52.050793],[5.103623,52.051941],[5.104321,52.052250],[5.104820,52.051437],[5.107707,52.051323],[5.108322,52.050499],[5.111756,52.050373],[5.112321,52.049007],[5.114426,52.050938],[5.113321,52.052040],[5.112896,52.051361],[5.111029,52.051647],[5.112002,52.052940],[5.112127,52.055134],[5.113824,52.055435],[5.115321,52.056652],[5.121322,52.057217],[5.123321,52.059151],[5.125321,52.059216],[5.126321,52.058231],[5.127517,52.059135],[5.128169,52.056789],[5.131797,52.056416],[5.132321,52.055954],[5.132879,52.056381],[5.136321,52.056900],[5.137321,52.057510],[5.138801,52.057419],[5.139321,52.056988],[5.139910,52.058350],[5.141636,52.059628],[5.141756,52.060944],[5.143844,52.062416],[5.144321,52.064152],[5.144811,52.062428],[5.150010,52.057629],[5.151765,52.057384],[5.152321,52.055866],[5.152515,52.058128],[5.150910,52.058525],[5.148040,52.061939],[5.148321,52.062508],[5.149321,52.062332],[5.149607,52.062653],[5.148851,52.063942],[5.148973,52.065941],[5.151094,52.068169],[5.152321,52.068295],[5.153321,52.067333],[5.154649,52.067268],[5.156321,52.065609],[5.158179,52.065941],[5.156867,52.066486],[5.155650,52.068268],[5.154322,52.068497],[5.153070,52.069687],[5.153321,52.070431],[5.155321,52.070580],[5.155561,52.071178],[5.152321,52.071522],[5.151321,52.070641],[5.149109,52.072937],[5.150067,52.073940],[5.150121,52.075138],[5.151321,52.076328],[5.152969,52.074936],[5.153321,52.073833],[5.153954,52.075306],[5.155539,52.075722],[5.155432,52.078049],[5.153321,52.076458],[5.151885,52.077938],[5.153321,52.079460],[5.154563,52.079697],[5.155321,52.080734],[5.156282,52.080940],[5.156773,52.082939],[5.156047,52.083214],[5.155575,52.082687],[5.154026,52.082233],[5.153663,52.081600],[5.152321,52.081520],[5.151580,52.080681],[5.149875,52.080387],[5.149322,52.079670],[5.149101,52.080940],[5.150076,52.081936],[5.149321,52.082695],[5.147795,52.082466],[5.146440,52.080822],[5.145147,52.080940],[5.145214,52.082047],[5.145978,52.082283],[5.147321,52.084141],[5.149322,52.084198],[5.150321,52.083221],[5.153321,52.083302],[5.154095,52.083939],[5.153717,52.085941],[5.154674,52.087585],[5.155728,52.087940],[5.154321,52.089520],[5.150321,52.089470],[5.149641,52.086941],[5.149321,52.086666],[5.149100,52.086941],[5.149097,52.091164],[5.152321,52.091423],[5.153321,52.090771],[5.154321,52.090908],[5.153684,52.091305],[5.153568,52.093185],[5.152137,52.094128],[5.150321,52.092552],[5.149321,52.093414],[5.148322,52.092606],[5.147380,52.092937],[5.147984,52.094276],[5.149538,52.094723],[5.149871,52.095390],[5.150894,52.095512],[5.151321,52.095196],[5.151906,52.097355],[5.154284,52.097939],[5.153525,52.098141],[5.153330,52.098946],[5.152919,52.098339],[5.152321,52.098278],[5.150918,52.098537],[5.150321,52.099579],[5.147181,52.099083],[5.146686,52.098934],[5.148722,52.098339],[5.148619,52.097641],[5.145321,52.097630],[5.144804,52.097935],[5.146219,52.098938],[5.145744,52.099937],[5.146544,52.100941],[5.146321,52.101742],[5.144989,52.101273],[5.144899,52.099937],[5.144321,52.099487],[5.142838,52.100945],[5.143321,52.101650],[5.144602,52.101940],[5.142791,52.102940],[5.140321,52.102592],[5.140028,52.102230],[5.137537,52.102158],[5.136729,52.102348],[5.136321,52.103081],[5.135886,52.102375],[5.134052,52.101940],[5.133929,52.099545],[5.135321,52.099365],[5.135719,52.098938],[5.135472,52.096786],[5.134633,52.096630],[5.134353,52.095905],[5.133705,52.095940],[5.132703,52.096321],[5.132321,52.096977],[5.130460,52.097076],[5.129322,52.098137],[5.128321,52.098118],[5.127058,52.099674],[5.124400,52.099018],[5.123968,52.099941],[5.124378,52.102940],[5.120322,52.103275],[5.119321,52.102711],[5.116656,52.105274]],"type":"LineString"},"type":"Feature"},{"geometry":{"coordinates":[[5.115327,52.078941]],"type":"MultiPoint"},"properties":{"location_index":0,"type":"snapped"},"type":"Feature"},{"geometry":{"coordinates":[5.115321,52.078938],"type":"Point"},"properties":{"location_index":0,"type":"input"},"type":"Feature"}],"type":"FeatureCollection"})";
      const auto request =
          R"({"locations":[{"lat":52.078937,"lon":5.115321}],"costing":"bicycle","contours":[{"time":15}],"show_locations":true})";
      try_isochrone(loki_worker, thor_worker, request, expected);
    }
  }
  
  } // namespace
  
  int main(int argc, char* argv[]) {
    // user wants to try it
    if (argc > 1) {
      loki_worker_t loki_worker(config);
      thor_worker_t thor_worker(config);
      GraphReader reader(config.get_child("mjolnir"));
      Api request;
      ParseApi(argv[1], Options::isochrone, request);
      loki_worker.isochrones(request);
      std::cout << thor_worker.isochrones(request) << std::endl;
      return EXIT_SUCCESS;
    }
    // Silence logs (especially long request logging)
    logging::Configure({{"type", ""}});
    testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
  }
  