1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
Feature: Adding nodes to a flex database
Background:
Given the style file 'test_output_flex_node.lua'
And the OSM data
"""
n11 v1 dV Tt1=yes x1 y1
n12 v1 dV Tt2=yes x2 y2
n13 v1 dV Ttboth=yes x3 y3
n14 v1 dV Ttboth=yes x4 y4
r30 v1 dV Tt=ag Mn11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id |
| 12 |
Then table osm2pgsql_test_tboth contains exactly
| node_id |
| 13 |
| 14 |
Scenario: node is not relevant
Given an empty grid
And the OSM data
"""
n10 v1 dV Tt=ag x0 y0
r30 v2 dV Tt=ag Mn10@,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id |
| 12 |
Then table osm2pgsql_test_tboth contains exactly
| node_id |
| 13 |
| 14 |
Scenario: add to t1
Given an empty grid
And the OSM data
"""
n10 v1 dV Tt1=yes x0 y0
r30 v2 dV Tt=ag Mn10@,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 10 |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id |
| 12 |
Then table osm2pgsql_test_tboth contains exactly
| node_id |
| 13 |
| 14 |
Scenario: add to t2
Given an empty grid
And the OSM data
"""
n10 v1 dV Tt2=yes x0 y0
r30 v2 dV Tt=ag Mn10@mark,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id | rel_ids |
| 10 | {30} |
| 12 | {30} |
Then table osm2pgsql_test_tboth contains exactly
| node_id |
| 13 |
| 14 |
Scenario: add to t1 and t2
Given an empty grid
And the OSM data
"""
n10 v1 dV Tt1=yes,t2=yes x0 y0
r30 v2 dV Tt=ag Mn10@mark,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 10 |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id | rel_ids |
| 10 | {30} |
| 12 | {30} |
Then table osm2pgsql_test_tboth contains exactly
| node_id |
| 13 |
| 14 |
Scenario: add to tboth (only stage1)
Given an empty grid
And the OSM data
"""
n10 v1 dV Ttboth=yes x0 y0
r30 v2 dV Tt=ag Mn10@,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id |
| 12 |
Then table osm2pgsql_test_tboth contains exactly
| node_id | rel_ids |
| 10 | NULL |
| 13 | NULL |
| 14 | {30} |
Scenario: add to tboth (stage1 and stage2)
Given an empty grid
And the OSM data
"""
n10 v1 dV Ttboth=yes x0 y0
r30 v2 dV Tt=ag Mn10@mark,n11@,n12@mark,n13@,n14@mark
"""
When running osm2pgsql flex with parameters
| --slim | -a |
Then table osm2pgsql_test_t1 contains exactly
| node_id |
| 11 |
Then table osm2pgsql_test_t2 contains exactly
| node_id |
| 12 |
Then table osm2pgsql_test_tboth contains exactly
| node_id | rel_ids |
| 10 | {30} |
| 13 | NULL |
| 14 | {30} |
|