@@ -95,6 +95,7 @@ namespace {
9595 std::string routeCsvOut;
9696 std::string subRouteCsvOut;
9797 std::string routeGeoJsonOut;
98+ std::string trackGeoJsonOut;
9899 std::string routeStatisticJsonOut;
99100 std::string pipelineOut;
100101 std::string dbHost{" localhost" };
@@ -271,7 +272,6 @@ namespace {
271272 context.street .travelDirectionList ,
272273 context.street .highwayList
273274 );
274- ensure.emplace_back (" map written" );
275275 }
276276
277277 auto routeCsvOut = std::unique_ptr<std::ofstream>{};
@@ -286,7 +286,6 @@ namespace {
286286 context.street .segmentList ,
287287 context.routing .samplingPointList
288288 );
289- ensure.emplace_back (" CsvRouteWriter" );
290289 }
291290
292291 auto subRouteCsvOut = std::unique_ptr<std::ofstream>{};
@@ -301,7 +300,6 @@ namespace {
301300 context.street .segmentList ,
302301 context.routing .samplingPointList
303302 );
304- ensure.emplace_back (" CsvSubRouteWriter" );
305303 }
306304
307305 auto routeGeoJsonOut = std::unique_ptr<std::ofstream>{};
@@ -316,7 +314,6 @@ namespace {
316314 context.street .segmentList ,
317315 context.routing .samplingPointList
318316 );
319- ensure.emplace_back (" GeoJsonRouteWriter" );
320317 }
321318
322319 auto routeStatisticJsonOut = std::unique_ptr<std::ofstream>{};
@@ -328,7 +325,18 @@ namespace {
328325 context.routing .samplingPointList ,
329326 context.track .timeList
330327 );
331- ensure.emplace_back (" JsonRouteStatisticWriter" );
328+ }
329+
330+ auto trackGeoJsonOut = std::unique_ptr<std::ofstream>{};
331+ if (!options.trackGeoJsonOut .empty ())
332+ {
333+ trackGeoJsonOut = std::make_unique<std::ofstream>(options.trackGeoJsonOut );
334+ Writer::GeoJsonTrackWriter{*trackGeoJsonOut}(
335+ context.track .timeList ,
336+ context.track .pointList ,
337+ context.track .headingList ,
338+ context.track .velocityList
339+ );
332340 }
333341
334342 return EXIT_SUCCESS;
@@ -344,6 +352,7 @@ int main(int argc, char * argv[])
344352 | lyra::opt (options.routeCsvOut , " file" )[" --route" ](" route output" ).optional ()
345353 | lyra::opt (options.subRouteCsvOut , " file" )[" --sub-route" ](" sub route output" ).optional ()
346354 | lyra::opt (options.routeGeoJsonOut , " file" )[" --route-geojson" ](" route output" ).optional ()
355+ | lyra::opt (options.trackGeoJsonOut , " file" )[" --track-geojson" ](" track output" ).optional ()
347356 | lyra::opt (options.routeStatisticJsonOut , " file" )[" --route-statistic" ](" route statistic output" ).optional ()
348357 | lyra::opt (options.pipelineOut , " file" )[" --pipeline" ](" pipeline graph output (dot)" ).optional ()
349358 | lyra::opt (options.dbHost , " db host" )[" --host" ](" db host name" ).optional () | lyra::opt (options.dbPort , " db port" )[" --port" ](" db host port" ).optional ()
0 commit comments