X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fplanetsplitter.c;h=d660154d0d8ba9fd428c17bf88a18d136ba12870;hb=a5b34ad069a52ff6cf981f01667d102292988811;hp=5380455e811243b3d438d94e34501b704714e224;hpb=20283c6cf5c6951cc1f2787492c67a7fb72aee9a;p=routino diff --git a/src/planetsplitter.c b/src/planetsplitter.c index 5380455..d660154 100644 --- a/src/planetsplitter.c +++ b/src/planetsplitter.c @@ -1,5 +1,5 @@ /*************************************** - $Header: /home/amb/routino/src/RCS/planetsplitter.c,v 1.73 2010/05/22 18:40:47 amb Exp $ + $Header: /home/amb/routino/src/RCS/planetsplitter.c,v 1.81 2010/09/17 18:38:39 amb Exp $ OSM planet file splitter. @@ -27,23 +27,24 @@ #include #include -#include "typesx.h" #include "types.h" -#include "functionsx.h" -#include "functions.h" +#include "ways.h" + +#include "typesx.h" #include "nodesx.h" #include "segmentsx.h" #include "waysx.h" +#include "relationsx.h" #include "superx.h" -#include "ways.h" + +#include "files.h" +#include "functions.h" +#include "functionsx.h" #include "tagging.h" /* Global variables */ -/*+ The option to use a slim mode with file-backed read-only intermediate storage. +*/ -int option_slim=0; - /*+ The name of the temporary directory. +*/ char *option_tmpdirname=NULL; @@ -53,7 +54,7 @@ size_t option_filesort_ramsize=0; /* Local functions */ -static void print_usage(int detail); +static void print_usage(int detail,const char *argerr,const char *err); /*++++++++++++++++++++++++++++++++++++++ @@ -62,24 +63,23 @@ static void print_usage(int detail); int main(int argc,char** argv) { - NodesX *Nodes; - SegmentsX *Segments,*SuperSegments=NULL,*MergedSegments=NULL; - WaysX *Ways; - int iteration=0,quit=0; - int max_iterations=10; - char *dirname=NULL,*prefix=NULL,*tagging=NULL; - int option_parse_only=0,option_process_only=0; - int option_filenames=0; - int arg; + NodesX *Nodes; + SegmentsX *Segments,*SuperSegments=NULL,*MergedSegments=NULL; + WaysX *Ways; + RelationsX *Relations; + int iteration=0,quit=0; + int max_iterations=10; + char *dirname=NULL,*prefix=NULL,*tagging=NULL; + int option_parse_only=0,option_process_only=0; + int option_filenames=0; + int arg; /* Parse the command line arguments */ for(arg=1;arg] [--prefix=]\n" - " [--slim] [--sort-ram-size=]\n" + " [--sort-ram-size=]\n" " [--tmpdir=]\n" " [--parse-only | --process-only]\n" " [--max-iterations=]\n" " [--tagging=]\n" " [ ...]\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) fprintf(stderr, "\n" @@ -378,9 +418,12 @@ static void print_usage(int detail) "--dir= The directory containing the routing database.\n" "--prefix= The filename prefix for the routing database.\n" "\n" - "--slim Use less RAM and more temporary files.\n" "--sort-ram-size= The amount of RAM (in MB) to use for data sorting\n" - " (defaults to 64MB with '--slim' or 256MB otherwise.)\n" +#if SLIM + " (defaults to 64MB otherwise.)\n" +#else + " (defaults to 256MB otherwise.)\n" +#endif "--tmpdir= The directory name for temporary files.\n" " (defaults to the '--dir' option directory.)\n" "\n" @@ -390,8 +433,9 @@ static void print_usage(int detail) "--max-iterations= The number of iterations for finding super-nodes.\n" "\n" "--tagging= The name of the XML file containing the tagging rules\n" - " (defaults to 'tagging.xml' with '--dirname' and\n" - " '--prefix' options).\n" + " (defaults to 'tagging.xml' with '--dir' and\n" + " '--prefix' options or the file installed in\n" + " '" DATADIR "').\n" "\n" " ... The name(s) of the file(s) to process (by default\n" " data is read from standard input).\n"