Skip to content

Commit

Permalink
Merge pull request #1516 from Framstag/add-import-options-for-arwa-wa…
Browse files Browse the repository at this point in the history
…y-index

Improvement: See issue #1506
  • Loading branch information
Framstag committed Oct 8, 2023
2 parents 09d3f91 + a357df6 commit 8926aa5
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
33 changes: 33 additions & 0 deletions Import/src/Import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ void DumpHelp(osmscout::ImportParameter& parameter)
std::cout << " --wayDataMemoryMaped true|false memory maped way data file access (default: " << osmscout::BoolToString(parameter.GetWayDataMemoryMaped()) << ")" << std::endl;
std::cout << " --wayDataCacheSize <number> way data cache size (default: " << parameter.GetWayDataCacheSize() << ")" << std::endl;

std::cout << " --areaWayIndexMinMag <number> minimum index level for area way index analysis (default: " << parameter.GetAreaWayIndexMinMag() << ")" << std::endl;
std::cout << " --areaWayIndexMaxMag <number> maximum index level for area way index analysis (default: " << parameter.GetAreaWayIndexMaxMag() << ")" << std::endl;

std::cout << " --routeNodeBlockSize <number> number of route nodes resolved in block (default: " << parameter.GetRouteNodeBlockSize() << ")" << std::endl;
std::cout << std::endl;
std::cout << " --langOrder <#|lang1[,#|lang2]..> language order when parsing lang[:language] and place_name[:language] tags" << std::endl
Expand Down Expand Up @@ -349,6 +352,10 @@ static void DumpParameter(const osmscout::ImportParameter& parameter,
(parameter.GetAreaDataMemoryMaped() ? "true" : "false"));
progress.Info(std::string("AreaDataCacheSize: ")+
std::to_string(parameter.GetAreaDataCacheSize()));
progress.Info(std::string("AreaWayIndexMinMag: ")+
std::to_string(parameter.GetAreaWayIndexMinMag().Get()));
progress.Info(std::string("AreaWayIndexMaxMag: ")+
std::to_string(parameter.GetAreaWayIndexMaxMag().Get()));

progress.Info(std::string("WayDataMemoryMaped: ")+
(parameter.GetWayDataMemoryMaped() ? "true" : "false"));
Expand Down Expand Up @@ -810,6 +817,32 @@ int main(int argc, char* argv[])
parameterError=true;
}
}
else if (strcmp(argv[i],"--areaWayIndexMinMag")==0) {
size_t areaWayIndexMinMag;

if (osmscout::ParseSizeTArgument(argc,
argv,
i,
areaWayIndexMinMag)) {
parameter.SetAreaWayIndexMinMag(osmscout::MagnificationLevel(areaWayIndexMinMag));
}
else {
parameterError=true;
}
}
else if (strcmp(argv[i],"--areaWayIndexMaxMag")==0) {
size_t areaWayIndexMaxMag;

if (osmscout::ParseSizeTArgument(argc,
argv,
i,
areaWayIndexMaxMag)) {
parameter.SetAreaWayIndexMaxMag(osmscout::MagnificationLevel(areaWayIndexMaxMag));
}
else {
parameterError=true;
}
}
else if (strcmp(argv[i],"--wayDataMemoryMaped")==0) {
bool wayDataMemoryMaped;

Expand Down
2 changes: 0 additions & 2 deletions libosmscout-import/include/osmscoutimport/ImportParameter.h
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,6 @@ class OSMSCOUT_IMPORT_API ImportParameter CLASS_FINAL
std::unique_ptr<Preprocessor> GetPreprocessor(const std::string& filename,
PreprocessorCallback& callback) const;

void SetAreaWayIndexMaxMag(const MagnificationLevel& areaWayIndexMaxLevel);

void SetTextIndexVariant(TextIndexVariant textIndexVariant);
TextIndexVariant GetTextIndexVariant() const;

Expand Down

0 comments on commit 8926aa5

Please sign in to comment.