@@ -35,18 +35,29 @@ int main(int argc, char *argv[])
3535 std::string database_path;
3636 std::string postal_country_parser;
3737 std::string postal_address_parser_dir;
38+ std::string type_priority_list;
39+ std::string type_skip_list;
3840 bool verbose_address_expansion = false ;
3941
4042 {
4143 po::options_description generic (" Geocoder NLP importer options" );
42- generic.add_options ()(" help" , " Help message" )(" version,v" , " Data format version" )(
43- " poly,p" , po::value<std::string>(&polyjson),
44- " Boundary of the imported region in GeoJSON format" )(
45- " postal-country" , po::value<std::string>(&postal_country_parser),
46- " libpostal country preference for this database" )(
44+ generic.add_options ()(" help" , " Help message" )(" version,v" , " Data format version" );
45+ generic.add_options ()(" poly,p" , po::value<std::string>(&polyjson),
46+ " Boundary of the imported region in GeoJSON format" );
47+ generic.add_options ()(" postal-country" , po::value<std::string>(&postal_country_parser),
48+ " libpostal country preference for this database" );
49+ generic.add_options ()(
4750 " postal-address" , po::value<std::string>(&postal_address_parser_dir),
4851 " libpostal address parser directory. If not specified, global libpostal parser directory "
49- " preference is used." )(" verbose" , " Verbose address expansion" );
52+ " preference is used." );
53+ generic.add_options ()(
54+ " priority" , po::value<std::string>(&type_priority_list),
55+ " File with OSM tags that are kept even if there is no name associated with the location" );
56+ generic.add_options ()(
57+ " skip" , po::value<std::string>(&type_skip_list),
58+ " File with OSM tags for locations that should be dropped even if there is a name "
59+ " associated with the location" );
60+ generic.add_options ()(" verbose" , " Verbose address expansion" );
5061
5162 po::options_description hidden (" Hidden options" );
5263 hidden.add_options ()(" output-directory" , po::value<std::string>(&database_path),
@@ -103,6 +114,9 @@ int main(int argc, char *argv[])
103114 std::cout << " Loaded border GeoJSON. Geometry string length: " << border.size () << " \n " ;
104115 }
105116
117+ HierarchyItem::load_priority_list (type_priority_list);
118+ HierarchyItem::load_skip_list (type_skip_list);
119+
106120 Hierarchy hierarchy;
107121
108122 std::string postgres_dblink;
0 commit comments