mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
@@ -88,9 +88,9 @@ std::string DescriptionsCollectionBuilderStat::LangStatisticsToString() const
|
|||||||
|
|
||||||
void DescriptionsCollector::operator() (FeatureType & ft, uint32_t featureId)
|
void DescriptionsCollector::operator() (FeatureType & ft, uint32_t featureId)
|
||||||
{
|
{
|
||||||
auto const & attractionsChecker = ftypes::AttractionsChecker::Instance();
|
// auto const & attractionsChecker = ftypes::AttractionsChecker::Instance();
|
||||||
if (!attractionsChecker(ft))
|
// if (!attractionsChecker(ft))
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
(*this)(ft.GetMetadata().GetWikiURL(), featureId);
|
(*this)(ft.GetMetadata().GetWikiURL(), featureId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,10 +55,10 @@ void WikiUrlDumper::Dump(size_t cpuCount) const
|
|||||||
// static
|
// static
|
||||||
void WikiUrlDumper::DumpOne(std::string const & path, std::ostream & stream)
|
void WikiUrlDumper::DumpOne(std::string const & path, std::ostream & stream)
|
||||||
{
|
{
|
||||||
auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
//auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
||||||
if (!needWikiUrl(feature.GetTypesHolder()))
|
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
auto const wikiUrl = feature.GetMetadata().GetWikiURL();
|
auto const wikiUrl = feature.GetMetadata().GetWikiURL();
|
||||||
if (wikiUrl.empty())
|
if (wikiUrl.empty())
|
||||||
@@ -89,10 +89,10 @@ WikiDataFilter::WikiDataFilter(std::string const & path, std::vector<std::string
|
|||||||
void WikiDataFilter::FilterOne(std::string const & path, std::map<base::GeoObjectId, std::string> const & idToWikiData,
|
void WikiDataFilter::FilterOne(std::string const & path, std::map<base::GeoObjectId, std::string> const & idToWikiData,
|
||||||
std::ostream & stream)
|
std::ostream & stream)
|
||||||
{
|
{
|
||||||
auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
//auto const & needWikiUrl = ftypes::AttractionsChecker::Instance();
|
||||||
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
feature::ForEachFeatureRawFormat(path, [&](FeatureBuilder const & feature, uint64_t /* pos */) {
|
||||||
if (!needWikiUrl(feature.GetTypesHolder()))
|
// if (!needWikiUrl(feature.GetTypesHolder()))
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
auto const it = idToWikiData.find(feature.GetMostGenericOsmId());
|
auto const it = idToWikiData.find(feature.GetMostGenericOsmId());
|
||||||
if (it == std::end(idToWikiData))
|
if (it == std::end(idToWikiData))
|
||||||
|
|||||||
Reference in New Issue
Block a user