Skip to content

Commit

Permalink
Support multiples relation ids for overpass
Browse files Browse the repository at this point in the history
  • Loading branch information
frodrigo committed Jan 30, 2024
1 parent a08e23c commit c84d07d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datasources/sources/overpass_select.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Settings < OverpassSource::Settings
T::Hash[String, T.any(String, T::Boolean)],
T::Array[T::Hash[String, T.any(String, T::Boolean)]],
))
const :relation_id, T.nilable(Integer)
const :relation_ids, T.nilable(T::Array[Integer])
const :interest, T.nilable(T::Array[String])
end

Expand Down Expand Up @@ -55,10 +55,10 @@ def initialize(job_id, destination_id, name, settings)
end
}.join("\n")
)
area_id = 3_600_000_000 + T.must(settings.relation_id)
area_ids = T.must(settings.relation_ids).collect{ |id| 3_600_000_000 + id }.collect(&:to_s).join(',')
"
[out:json][timeout:25];
area(#{area_id})->.a;
area(id:#{area_ids})->.a;
(
#{query_selectors}
);
Expand Down

0 comments on commit c84d07d

Please sign in to comment.