1#ifndef OSMSCOUT_AREAAREAINDEX_H
2#define OSMSCOUT_AREAAREAINDEX_H
63 std::array<FileOffset, 4> children;
69 struct IndexCacheValueSizer :
public IndexCache::ValueSizer
71 size_t GetSize(
const IndexCell& value)
const override
75 memory+=
sizeof(value);
87 CellRef(FileOffset offset,
99 std::string datafilename;
100 mutable FileScanner scanner;
105 mutable IndexCache indexCache;
107 mutable std::mutex lookupMutex;
110 bool GetIndexCell(uint32_t level,
112 IndexCell& indexCell,
113 FileOffset& dataOffset)
const;
115 bool ReadCellData(
const TypeConfig& typeConfig,
116 const TypeInfoSet& types,
117 FileOffset dataOffset,
118 std::vector<DataBlockSpan>& spans)
const;
120 void PushCellsForNextLevel(
double minlon,
124 const IndexCell & cellIndexData,
125 const CellDimension& cellDimension,
128 std::vector<CellRef>& nextCellRefs)
const;
135 bool Open(
const std::string& path,
bool memoryMappedData);
139 return scanner.IsOpen();
148 const GeoBox& boundingBox,
150 const TypeInfoSet& types,
151 std::vector<DataBlockSpan>& spans,
152 TypeInfoSet& loadedTypes)
const;
#define OSMSCOUT_API
Definition CoreImportExport.h:45
AreaAreaIndex(size_t cacheSize)
static const char *const AREA_AREA_IDX
Definition AreaAreaIndex.h:55
bool Open(const std::string &path, bool memoryMappedData)
bool IsOpen() const
Definition AreaAreaIndex.h:137
std::string GetFilename() const
Definition AreaAreaIndex.h:142
bool GetAreasInArea(const TypeConfig &typeConfig, const GeoBox &boundingBox, size_t maxLevel, const TypeInfoSet &types, std::vector< DataBlockSpan > &spans, TypeInfoSet &loadedTypes) const
uint64_t FileOffset
Definition OSMScoutTypes.h:46
std::shared_ptr< AreaAreaIndex > AreaAreaIndexRef
Definition AreaAreaIndex.h:159