forked from mmd-osm/Overpass-API
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Messdaten zu Laufzeiten gesammelt; Regelprotokolle vorbereitet
- Loading branch information
Showing
27 changed files
with
567 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cgi-bin/add_rule | ||
cgi-bin/get_rule | ||
cgi-bin/interpreter | ||
cgi-bin/update_rule | ||
testfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
add_rule | ||
get_rule | ||
interpreter | ||
update_rule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
conflict | ||
|
||
* desc | ||
The conflict statement adds for every element in the set _from_ the error message which is composed of the text inside the element and the item-subelements within the element. | ||
|
||
* properties | ||
exec:yes | ||
ret_set: | ||
control_flow:no | ||
|
||
* substatements | ||
:item | ||
|
||
* depending_on | ||
input = set:from:nodes,ways,relations | ||
text | ||
|
||
* changes | ||
db:conflicts | ||
|
||
* time | ||
<0.01 + 0.0001*set:from | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
coord_query | ||
|
||
* desc | ||
Returns all the areas for which the provided coordinates are inside. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
db:areas | ||
lat = arg:float[-90.0, 90.0]:lat | ||
lon = arg:float[-180.0, 180.0]:lon | ||
|
||
* changes | ||
output = set:into:areas (nr:areas) | ||
|
||
* time | ||
<0.01 | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
detect_odd_nodes | ||
|
||
* desc | ||
This statement filters from its input the nodes that are contained in an odd number of segments and therefore obstruct the construction of areas or superways. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
input = set:from:nodes,ways | ||
|
||
* changes | ||
output = union set:from set:into:nodes (set:from:nodes) | ||
|
||
* time | ||
<0.001 + 0.00001*set:from | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
foreach | ||
|
||
* desc | ||
Loops for each element in _from_ over its substatements. In particular, it stores in the beginning the elements from the _from_ set, then it runs the loop once for each element and makes this element available in _into_ during the loop. After the last loop, _into_ remains unchanged. | ||
|
||
* properties | ||
exec:yes | ||
ret_set: | ||
control_flow:yes | ||
|
||
* substatements | ||
exec: | ||
|
||
* depending_on | ||
input = set:from | ||
|
||
* changes | ||
output = set:into | ||
(There also might be changes by the substatements to other sets) | ||
|
||
* time | ||
(time_of_substatements * set:into) | ||
|
||
* space | ||
set:from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
id_query | ||
|
||
* desc | ||
The Id-Query returns the node, way or relation specified by the given reference. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
db:nodes,ways,relations | ||
type = arg:[node|way|relation]:type | ||
ref = arg:int:ref | ||
|
||
* changes | ||
output = set:into | ||
|
||
* time | ||
(depending on type) | ||
nodes: 0.4 | ||
ways: 0.3 | ||
relations: 0.2 | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
item | ||
|
||
* desc | ||
The item represents a set so that it can be adressed by statements that use the return set. | ||
|
||
* properties | ||
exec:no | ||
ret_set:set | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
output = set:set | ||
|
||
* changes | ||
|
||
* time | ||
0 | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
make_area | ||
|
||
* desc | ||
The make-area statement produces if possible from the given set of ways and nodes an area, tags it from the item in _tags_ and writes it into the database. The creation of an area is possible if and only if every node referenced by any way is contained in the set, every node that appears as first or last node of a way does so for an even number of times and the tags set contains exactly one item. If it is sucessful it returns the newly created area. | ||
|
||
* properties | ||
exec:yes | ||
ret_set: | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
input = set:from:nodes,ways | ||
tags = set:tags | ||
|
||
* changes | ||
db:areas | ||
output = union set:from set:into:nodes (set:from:nodes) | ||
|
||
* time | ||
1.5 + 0.001*set:into:nodes,ways | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
* desc | ||
The print statement prints the objects in the given set to the output. The format depends on the parameter _mode_. | ||
|
||
* properties | ||
exec:yes | ||
ret_set: | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
db_node_tags,way_tags,relation_tags,area_tags | ||
from = set:from:* | ||
mode = arg:[ids_only:skeleton:body]:mode | ||
|
||
* changes | ||
web: | ||
|
||
* time | ||
mode:ids_only: <0.001 + 0.00005*set:from | ||
mode:skeleton: <0.001 + 0.0002*set:from | ||
mode:body: <0.01 + 0.001*set:from | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
query | ||
|
||
* desc | ||
Queries the database for objects matching the given conditions. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:no | ||
|
||
* substatements | ||
:has_kv | ||
|
||
* depending_on | ||
db:nodes,ways,relations | ||
type = arg:[node,way,relation]:type | ||
:has_kv | ||
|
||
* changes | ||
into = set:nodes,ways,relations:into | ||
|
||
* time | ||
node: 24s + 0.001s*db:nodes | ||
way: 90s + 0.001s*db:ways | ||
relation: 0.1s + 0.001s*db:relations | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
recurse | ||
|
||
* desc | ||
The recurse statement queries for a given set of relations or ways their members. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
from = set:ways,relations:from | ||
type = arg:[way-node,relation-relation,relation-way,relation-node]:type | ||
|
||
* changes | ||
into = union set:from set:into:nodes,ways,relations (set:from:ways,relations) | ||
way-node: 28 nodes per way | ||
relation-relation: 1 relation per relation | ||
relation-way: 22 ways per relation | ||
relation-node: 2 nodes per relation | ||
|
||
* time | ||
way-node: 2s per way | ||
relation-relation: 0.1s per relation | ||
relation-way: 0.1s per relation | ||
relation-node: 0.1s per relation | ||
|
||
* space | ||
0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
$(lowercase) | ||
|
||
* desc | ||
|
||
* properties | ||
exec:yes | ||
ret_set: | ||
control_flow:no | ||
|
||
* substatements | ||
|
||
* depending_on | ||
|
||
* changes | ||
|
||
* time | ||
|
||
* space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
union | ||
|
||
* desc | ||
The union statement collects all the return statements of its substatements in its output. | ||
|
||
* properties | ||
exec:yes | ||
ret_set:into | ||
control_flow:yes | ||
|
||
* substatements | ||
:ret_set != "" | ||
|
||
* depending_on | ||
substatements:ret_set | ||
|
||
* changes | ||
output = union of all substatement:ret_set | ||
|
||
* time | ||
0 | ||
|
||
* space | ||
set:into |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.