GHashTable *dedupe_ways_hash;
int phase;
int slices;
+int unknown_country;
+
struct buffer node_buffer = {
64*1024*1024,
};
fprintf(f,"-w (--dedupe-ways) : ensure no duplicate ways or nodes. useful when using several input files\n");
fprintf(f,"-W (--ways-only) : process only ways\n");
fprintf(f,"-z (--compression-level) : set the compression level\n");
+ fprintf(f,"-U (--unknown-country) : add objects with unknown country to index\n");
exit(1);
}
{"url", 1, 0, 'u'},
{"ways-only", 0, 0, 'W'},
{"slice-size", 1, 0, 'S'},
+ {"unknown-country", 0, 0, 'U'},
{0, 0, 0, 0}
};
c = getopt_long (argc, argv, "5:6B:DNO:PWS:a:bc"
#ifdef HAVE_POSTGRESQL
"d:"
#endif
- "e:hi:knm:p:r:s:wu:z:", long_options, &option_index);
+ "e:hi:knm:p:r:s:wu:z:U", long_options, &option_index);
if (c == -1)
break;
switch (c) {
case 'W':
process_nodes=0;
break;
+ case 'U':
+ unknown_country=1;
+ break;
case 'a':
attr_debug_level=atoi(optarg);
break;
item_bin_write(item_bin,out);
if (item_is_town(*item_bin) && attr_strings[attr_string_label]) {
char *tok,*buf=is_in_buffer;
- if (!buf[0])
+ if (!buf[0] && unknown_country)
strcpy(is_in_buffer, "Unknown");
while ((tok=strtok(buf, ",;"))) {
while (*tok==' ')