@param[in] coastGeomFilename Can be empty if no need to cut borders by water. @param[in] popularPlacesFilename Can be empty if no need in popular places.
| 101 | /// @param[in] coastGeomFilename Can be empty if no need to cut borders by water. |
| 102 | /// @param[in] popularPlacesFilename Can be empty if no need in popular places. |
| 103 | WorldMapGenerator(std::string const & worldFilename, std::string const & coastGeomFilename, |
| 104 | std::string const & popularPlacesFilename) |
| 105 | : m_worldBucket(worldFilename) |
| 106 | , m_merger(kFeatureSorterPointCoordBits - (scales::GetUpperScale() - scales::GetUpperWorldScale()) / 2) |
| 107 | , m_popularPlacesFilename(popularPlacesFilename) |
| 108 | { |
| 109 | // Do not strip last types for given tags, |
| 110 | // for example, do not cut 'admin_level' in 'boundary-administrative-XXX'. |
| 111 | char const * arr1[][3] = { |
| 112 | {"boundary", "administrative", "2"}, {"boundary", "administrative", "3"}, {"boundary", "administrative", "4"}}; |
| 113 | |
| 114 | for (size_t i = 0; i < ARRAY_SIZE(arr1); ++i) |
| 115 | m_typesCorrector.SetDontNormalizeType(arr1[i]); |
| 116 | |
| 117 | // Merge motorways into trunks. |
| 118 | // TODO : merge e.g. highway-trunk_link into highway-trunk? |
| 119 | char const *marr1[2] = {"highway", "motorway"}, *marr2[2] = {"highway", "trunk"}; |
| 120 | m_typesCorrector.SetMappingTypes(marr1, marr2); |
| 121 | |
| 122 | if (popularPlacesFilename.empty()) |
| 123 | LOG(LWARNING, ("popular_places_data option not set. Popular attractions will not be added to World.mwm")); |
| 124 | |
| 125 | // Can be empty in tests. |
| 126 | if (!coastGeomFilename.empty()) |
| 127 | m_boundaryChecker.LoadWaterGeometry(coastGeomFilename); |
| 128 | } |
| 129 | |
| 130 | void Process(feature::FeatureBuilder & fb) |
| 131 | { |
nothing calls this directly
no test coverage detected