Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read tagGroups (cities) #787

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project(OsmAndCore)

# Bump this number each time a new source file is committed to repository, source file removed from repository or renamed: 187
# Bump this number each time a new source file is committed to repository, source file removed from repository or renamed: 188

set(target_specific_sources "")
set(target_specific_public_definitions "")
Expand Down
3 changes: 2 additions & 1 deletion include/OsmAndCore/Data/Amenity.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ namespace OsmAnd
QString value;
};

private:
protected:
public:
Amenity(const std::shared_ptr<const ObfPoiSectionInfo>& obfSection);
virtual ~Amenity();

QHash<uint32_t, QList<QPair<QString, QString>>> tagGroups;
const std::shared_ptr<const ObfPoiSectionInfo> obfSection;

PointI position31;
Expand All @@ -72,6 +72,7 @@ namespace OsmAnd
const QList< std::shared_ptr<const OsmAnd::Amenity> >& input);

QString getName(const QString lang, bool transliterate) const;
QString getCityFromTagGroups(QString lang) const;
};
}

Expand Down
6 changes: 6 additions & 0 deletions include/OsmAndCore/Data/ObfPoiSectionInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <OsmAndCore/CommonTypes.h>
#include <OsmAndCore/Data/DataCommonTypes.h>
#include <OsmAndCore/Data/ObfSectionInfo.h>
#include <OsmAndCore/QuadTree.h>

namespace OsmAnd
{
Expand Down Expand Up @@ -76,6 +77,8 @@ namespace OsmAnd
friend class OsmAnd::ObfPoiSectionReader_P;
};

typedef OsmAnd::QuadTree<int32_t, AreaI::CoordType> BBoxIndexTree;

class ObfPoiSectionInfo_P;
class OSMAND_CORE_API ObfPoiSectionInfo : public ObfSectionInfo
{
Expand All @@ -93,9 +96,12 @@ namespace OsmAnd
uint32_t nameIndexInnerOffset;
uint32_t subtypesInnerOffset;
uint32_t firstBoxInnerOffset;
mutable QHash<int, QList<QPair<QString, QString>>> tagGroups;
mutable BBoxIndexTree bboxIndexCache;

std::shared_ptr<const ObfPoiSectionCategories> getCategories() const;
std::shared_ptr<const ObfPoiSectionSubtypes> getSubtypes() const;
QList<QPair<QString, QString>> getTagValues(int id) const;

friend class OsmAnd::ObfPoiSectionReader_P;
};
Expand Down
861 changes: 780 additions & 81 deletions protos/OBF.pb.cc

Large diffs are not rendered by default.

Loading