Skip to content

Commit

Permalink
Fix indexing nodes when basezoom>14 (#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
systemed authored Jun 9, 2024
1 parent d5ded3b commit eab08d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions include/tile_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ class TileDataSource {

virtual void populateMultiPolygon(MultiPolygon& dst, NodeID objectID);

unsigned int getIndexZoom() const { return indexZoom; }
inline size_t getId(NodeID id) const {
return id & (~(~0ull << (TILE_DATA_ID_SIZE - shardBits)));
}
Expand Down
2 changes: 1 addition & 1 deletion src/osm_lua_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ bool OsmLuaProcessing::setNode(NodeID id, LatpLon node, const TagMap& tags) {
}

if (!this->empty()) {
TileCoordinates index = latpLon2index(node, this->config.baseZoom);
TileCoordinates index = latpLon2index(node, osmMemTiles.getIndexZoom());

for (auto &output : finalizeOutputs()) {
osmMemTiles.addObjectToSmallIndex(index, output, originalOsmID);
Expand Down

0 comments on commit eab08d1

Please sign in to comment.