]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/details.php
Merge pull request #1752 from mtmail/new-oo-shell-class
[nominatim.git] / website / details.php
index 44d4956b4d2845e166dcd8dfac32d8d815a5c9f0..39fa0afa901ff01ab8531b5df31896fac8be3ed9 100644 (file)
@@ -44,6 +44,16 @@ if ($sOsmType && $iOsmId > 0) {
     $sSQL .= ' ORDER BY class ASC';
     $sPlaceId = $oDB->getOne($sSQL, array(':type' => $sOsmType, ':id' => $iOsmId));
 
+
+    // Nothing? Maybe it's an interpolation.
+    // XXX Simply returns the first parent street it finds. It should
+    //     get a house number and get the right interpolation.
+    if (!$sPlaceId && $sOsmType == 'W' && (!$sClass || $sClass == 'place')) {
+        $sSQL = 'SELECT place_id FROM location_property_osmline'
+                .' WHERE osm_id = :id LIMIT 1';
+        $sPlaceId = $oDB->getOne($sSQL, array(':id' => $iOsmId));
+    }
+
     // Be nice about our error messages for broken geometry
 
     if (!$sPlaceId) {