$sSQL .= " UNION ";
$sSQL .= "SELECT ";
$sSQL .= " 'W' AS osm_type, ";
- $sSQL .= " place_id AS osm_id, ";
+ $sSQL .= " osm_id, ";
$sSQL .= " 'place' AS class, ";
$sSQL .= " 'house' AS type, ";
$sSQL .= " null AS admin_level, ";
$sSQL .= " null AS extra_place ";
$sSQL .= " FROM (";
$sSQL .= " SELECT ";
+ $sSQL .= " osm_id, ";
$sSQL .= " place_id, ";
$sSQL .= " calculated_country_code, ";
$sSQL .= " CASE "; // interpolate the housenumbers here
| startnumber | endnumber | geometry
| 2 | 6 | 0 0, 0 0.001
-
Scenario: addr:street on interpolation way
Given the scene parallel-road
And the place nodes
| object | parent_place_id | startnumber | endnumber
| W10 | W2 | 2 | 6
| W11 | W3 | 12 | 16
+ When sending query "16 Cloud Street"
+ Then results contain
+ | ID | osm_type | osm_id
+ | 0 | N | 4
+ When sending query "14 Cloud Street"
+ Then results contain
+ | ID | osm_type | osm_id
+ | 0 | W | 11
+ When sending query "18 Cloud Street"
+ Then results contain
+ | ID | osm_type | osm_id
+ | 0 | W | 3
Scenario: addr:street on housenumber way
Given the scene parallel-road
| object | parent_place_id | startnumber | endnumber
| W10 | W2 | 2 | 6
| W11 | W3 | 12 | 16
+ When sending query "16 Cloud Street"
+ Then results contain
+ | ID | osm_type | osm_id
+ | 0 | N | 4
+ When sending query "14 Cloud Street"
+ Then results contain
+ | ID | osm_type | osm_id
+ | 0 | W | 11
Scenario: Geometry of points and way don't match (github #253)
Given the place nodes
if ($iParentPlaceID) $iPlaceID = $iParentPlaceID;
}
+// interpolated house numbers
+$iParentPlaceID = chksql($oDB->getOne('SELECT parent_place_id FROM location_property_osmline WHERE place_id = '.$iPlaceID));
+if ($iParentPlaceID) $iPlaceID = $iParentPlaceID;
+
+
if (CONST_Use_Aux_Location_data) {
$iParentPlaceID = chksql($oDB->getOne('SELECT parent_place_id FROM location_property_aux WHERE place_id = '.$iPlaceID));
if ($iParentPlaceID) $iPlaceID = $iParentPlaceID;