File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
src/overpass_api/statements Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -287,8 +287,20 @@ void Area_Query_Statement::get_ranges
287287
288288bool Area_Constraint::delivers_data (Resource_Manager& rman)
289289{
290+ int counter = 0 ;
291+
290292 if (!area->areas_from_input ())
291- return false ;
293+ {
294+ Block_Backend< Uint31_Index, Area_Skeleton > area_locations_db
295+ (rman.get_area_transaction ()->data_index (area_settings ().AREAS ));
296+ for (Block_Backend< Uint31_Index, Area_Skeleton >::Flat_Iterator
297+ it (area_locations_db.flat_begin ());
298+ !(it == area_locations_db.flat_end ()); ++it)
299+ {
300+ if (area->get_submitted_id () == it.object ().id .val ())
301+ counter += it.object ().used_indices .size ();
302+ }
303+ }
292304 else
293305 {
294306 map< string, Set >::const_iterator mit = rman.sets ().find (area->get_input ());
@@ -305,8 +317,8 @@ bool Area_Constraint::delivers_data(Resource_Manager& rman)
305317 counter += it2->used_indices .size ();
306318 }
307319
308- return (counter <= 12 );
309320 }
321+ return (counter <= 12 );
310322}
311323
312324
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ class Area_Query_Statement : public Output_Statement
7171 const Statement& query, Resource_Manager& rman);
7272
7373 bool areas_from_input () const { return (submitted_id == 0 ); }
74+ long long get_submitted_id () const { return submitted_id; }
7475 string get_input () const { return input; }
7576
7677 static bool is_used () { return is_used_; }
You can’t perform that action at this time.
0 commit comments