Skip to content
Open
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
10 changes: 7 additions & 3 deletions src/overpass_api/data/tag_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#define DE__OSM3S___OVERPASS_API__DATA__TAG_STORE_H


#include "abstract_processing.h"
#include "filenames.h"
#include "../core/datatypes.h"
#include "../../template_db/block_backend.h"
Expand Down Expand Up @@ -249,16 +250,19 @@ void collect_tags_framed
uint32 coarse_index,
Id_Type lower_id_bound, Id_Type upper_id_bound)
{
const std::vector< Id_Type >& ids = ids_by_coarse[coarse_index];
// Most of a cell's tag entries belong to other elements: reject those with one bit test.
Id_Bit_Filter id_filter(ids);
while ((!(tag_it == items_db.range_end())) &&
(((tag_it.index().index) & 0x7fffff00) < coarse_index))
++tag_it;
while ((!(tag_it == items_db.range_end())) &&
(((tag_it.index().index) & 0x7fffff00) == coarse_index))
{
if (!(tag_it.object() < lower_id_bound) &&
if (id_filter.maybe_contains(tag_it.object().val()) &&
!(tag_it.object() < lower_id_bound) &&
(tag_it.object() < upper_id_bound) &&
(binary_search(ids_by_coarse[coarse_index].begin(),
ids_by_coarse[coarse_index].end(), tag_it.object())))
(binary_search(ids.begin(), ids.end(), tag_it.object())))
tags_by_id[tag_it.object()].push_back
(std::make_pair(tag_it.index().key, tag_it.index().value));
++tag_it;
Expand Down