Constructor
new Filter(query)
Parameters:
Name | Type | Description |
---|---|---|
query |
string | object |
Methods
isSupersetOf(Filter)
compare this filter with an other filter.
Parameters:
Name | Type | Description |
---|---|---|
Filter |
other the other filter. |
Returns:
boolean true, if the current filter is equal other or a super-set of other.
match(ob) → {boolean}
Check if an object matches this filter
Parameters:
Name | Type | Description |
---|---|---|
ob |
OverpassNode | OverpassWay | OverpassRelation | an object from Overpass API |
Returns:
- Type
- boolean
properties() → {number}
Returns:
properties which are required for this filter
- Type
- number
toLokijs(optionsopt) → {object}
Convert query to LokiJS query for local database. If the property 'needMatch' is set on the returned object, an additional match() should be executed for each returned object, as the query can't be fully compiled (and the 'needMatch' property removed).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
object |
<optional> |
Additional options |
Returns:
- Type
- object
toQl(optionsopt) → {string}
Convert query to Overpass QL
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
Additional options
Properties
|
Returns:
- Type
- string
toString() → {string}
Convert query to a string representation
Returns:
- Type
- string