From aaaa59235b2a96f95273cba62689aae09da22758 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 19 Oct 2002 15:42:50 +0000 Subject: [PATCH] Added --chunk argument to simplify generating airports for a specific chunk (like w130n30). --- src/Airports/GenAirports/main.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Airports/GenAirports/main.cxx b/src/Airports/GenAirports/main.cxx index 3fbcebf3..611ee1fa 100644 --- a/src/Airports/GenAirports/main.cxx +++ b/src/Airports/GenAirports/main.cxx @@ -45,6 +45,7 @@ #include #include +#include #include "build.hxx" #include "convex_hull.hxx" @@ -61,7 +62,8 @@ static void usage( int argc, char **argv ) { SG_LOG(SG_GENERAL, SG_ALERT, "Usage " << argv[0] << " --input= " << "--work= [ --start-id=abcd ] [ --nudge=n ]" - << "[--min-lon=] [--max-lon=] [--min-lat=] [--max-lat=]"); + << "[--min-lon=] [--max-lon=] [--min-lat=] [--max-lat=]" + << "[--chunk=]"); } @@ -104,6 +106,12 @@ int main( int argc, char **argv ) { min_lat = atof( arg.substr(10).c_str() ); } else if ( arg.find("--max-lat=") == 0 ) { max_lat = atof( arg.substr(10).c_str() ); + } else if ( arg.find("--chunk=") == 0 ) { + tg::Rectangle rectangle = tg::parseChunk(arg.substr(8).c_str()); + min_lon = rectangle.getMin().x(); + min_lat = rectangle.getMin().y(); + max_lon = rectangle.getMax().x(); + max_lon = rectangle.getMax().y(); } else { usage( argc, argv ); exit(-1);