static void print_usage(int detail) { fprintf(stderr, "Usage: planetsplitter [--help]\n" " [--dir=<dirname>] [--prefix=<name>]\n" " [--slim] [--sort-ram-size=<size>]\n" " [--tmpdir=<dirname>]\n" " [--parse-only | --process-only]\n" " [--max-iterations=<number>]\n" " [--tagging=<filename>]\n" " [<filename.osm> ...]\n"); if(detail) fprintf(stderr, "\n" "--help Prints this information.\n" "\n" "--dir=<dirname> The directory containing the routing database.\n" "--prefix=<name> The filename prefix for the routing database.\n" "\n" "--slim Use less RAM and more temporary files.\n" "--sort-ram-size=<size> The amount of RAM (in MB) to use for data sorting\n" " (defaults to 64MB with '--slim' or 256MB otherwise.)\n" "--tmpdir=<dirname> The directory name for temporary files.\n" " (defaults to the '--dir' option directory.)\n" "\n" "--parse-only Parse the input OSM files and store the results.\n" "--process-only Process the stored results from previous option.\n" "\n" "--max-iterations=<number> The number of iterations for finding super-nodes.\n" "\n" "--tagging=<filename> The name of the XML file containing the tagging rules\n" " (defaults to 'tagging.xml' with '--dirname' and\n" " '--prefix' options).\n" "\n" "<filename.osm> ... The name(s) of the file(s) to process (by default\n" " data is read from standard input).\n" "\n" "<transport> defaults to all but can be set to:\n" "%s" "\n" "<highway> can be selected from:\n" "%s" "\n" "<property> can be selected from:\n" "%s", TransportList(),HighwayList(),PropertyList()); exit(!detail); }
static void print_usage(int detail,const char *argerr,const char *err) { if(detail<0) { fprintf(stderr, "Routino version " ROUTINO_VERSION " " ROUTINO_URL ".\n" ); } if(detail>=0) { fprintf(stderr, "Usage: router [--version]\n" " [--help | --help-profile | --help-profile-xml |\n" " --help-profile-json | --help-profile-perl ]\n" " [--dir=<dirname>] [--prefix=<name>]\n" " [--profiles=<filename>] [--translations=<filename>]\n" " [--exact-nodes-only]\n" " [--quiet | [--loggable] [--logtime] [--logmemory]]\n" " [--language=<lang>]\n" " [--output-html]\n" " [--output-gpx-track] [--output-gpx-route]\n" " [--output-text] [--output-text-all]\n" " [--output-none] [--output-stdout]\n" " [--profile=<name>]\n" " [--transport=<transport>]\n" " [--shortest | --quickest]\n" " --lon1=<longitude> --lat1=<latitude>\n" " --lon2=<longitude> --lon2=<latitude>\n" " [ ... --lon99=<longitude> --lon99=<latitude>]\n" " [--reverse] [--loop]\n" " [--highway-<highway>=<preference> ...]\n" " [--speed-<highway>=<speed> ...]\n" " [--property-<property>=<preference> ...]\n" " [--oneway=(0|1)] [--turns=(0|1)]\n" " [--weight=<weight>]\n" " [--height=<height>] [--width=<width>] [--length=<length>]\n"); if(argerr) fprintf(stderr, "\n" "Error with command line parameter: %s\n",argerr); if(err) fprintf(stderr, "\n" "Error: %s\n",err); } if(detail==1) fprintf(stderr, "\n" "--version Print the version of Routino.\n" "\n" "--help Prints this information.\n" "--help-profile Prints the information about the selected profile.\n" "--help-profile-xml Prints all loaded profiles in XML format.\n" "--help-profile-json Prints all loaded profiles in JSON format.\n" "--help-profile-perl Prints all loaded profiles in Perl format.\n" "\n" "--dir=<dirname> The directory containing the routing database.\n" "--prefix=<name> The filename prefix for the routing database.\n" "--profiles=<filename> The name of the XML file containing the profiles\n" " (defaults to 'profiles.xml' with '--dir' and\n" " '--prefix' options or the file installed in\n" " '" ROUTINO_DATADIR "').\n" "--translations=<fname> The name of the XML file containing the translations\n" " (defaults to 'translations.xml' with '--dir' and\n" " '--prefix' options or the file installed in\n" " '" ROUTINO_DATADIR "').\n" "\n" "--exact-nodes-only Only route between nodes (don't find closest segment).\n" "\n" "--quiet Don't print any screen output when running.\n" "--loggable Print progress messages suitable for logging to file.\n" "--logtime Print the elapsed time for each processing step.\n" "--logmemory Print the max allocated/mapped memory for each step.\n" "\n" "--language=<lang> Use the translations for specified language.\n" "--output-html Write an HTML description of the route.\n" "--output-gpx-track Write a GPX track file with all route points.\n" "--output-gpx-route Write a GPX route file with interesting junctions.\n" "--output-text Write a plain text file with interesting junctions.\n" "--output-text-all Write a plain text file with all route points.\n" "--output-none Don't write any output files or read any translations.\n" " (If no output option is given then all are written.)\n" "--output-stdout Write to stdout instead of a file (requires exactly\n" " one output format option, implies '--quiet').\n" "\n" "--profile=<name> Select the loaded profile with this name.\n" "--transport=<transport> Select the transport to use (selects the profile\n" " named after the transport if '--profile' is not used.)\n" "\n" "--shortest Find the shortest route between the waypoints.\n" "--quickest Find the quickest route between the waypoints.\n" "\n" "--lon<n>=<longitude> Specify the longitude of the n'th waypoint.\n" "--lat<n>=<latitude> Specify the latitude of the n'th waypoint.\n" "\n" "--reverse Find a route between the waypoints in reverse order.\n" "--loop Find a route that returns to the first waypoint.\n" "\n" "--heading=<bearing> Initial compass bearing at lowest numbered waypoint.\n" "\n" " Routing preference options\n" "--highway-<highway>=<preference> * preference for highway type (%%).\n" "--speed-<highway>=<speed> * speed for highway type (km/h).\n" "--property-<property>=<preference> * preference for proprty type (%%).\n" "--oneway=(0|1) * oneway restrictions are to be obeyed.\n" "--turns=(0|1) * turn restrictions are to be obeyed.\n" "--weight=<weight> * maximum weight limit (tonnes).\n" "--height=<height> * maximum height limit (metres).\n" "--width=<width> * maximum width limit (metres).\n" "--length=<length> * maximum length limit (metres).\n" "\n" "<transport> defaults to motorcar but can be set to:\n" "%s" "\n" "<highway> can be selected from:\n" "%s" "\n" "<property> can be selected from:\n" "%s", TransportList(),HighwayList(),PropertyList()); exit(!detail); }