]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / lib.php
index b5fbee3e600b08548119d7e076a40fd3a77dd4ed..3db3a825b50603bb606bd6f14de80f2fde71eef4 100644 (file)
@@ -60,54 +60,6 @@ function byImportance($a, $b)
 }
 
 
-function getWordSets($aWords, $iDepth)
-{
-    $aResult = array(array(join(' ', $aWords)));
-    $sFirstToken = '';
-    if ($iDepth < 7) {
-        while (sizeof($aWords) > 1) {
-            $sWord = array_shift($aWords);
-            $sFirstToken .= ($sFirstToken?' ':'').$sWord;
-            $aRest = getWordSets($aWords, $iDepth+1);
-            foreach ($aRest as $aSet) {
-                $aResult[] = array_merge(array($sFirstToken), $aSet);
-            }
-        }
-    }
-    return $aResult;
-}
-
-function getInverseWordSets($aWords, $iDepth)
-{
-    $aResult = array(array(join(' ', $aWords)));
-    $sFirstToken = '';
-    if ($iDepth < 8) {
-        while (sizeof($aWords) > 1) {
-            $sWord = array_pop($aWords);
-            $sFirstToken = $sWord.($sFirstToken?' ':'').$sFirstToken;
-            $aRest = getInverseWordSets($aWords, $iDepth+1);
-            foreach ($aRest as $aSet) {
-                $aResult[] = array_merge(array($sFirstToken), $aSet);
-            }
-        }
-    }
-    return $aResult;
-}
-
-
-function getTokensFromSets($aSets)
-{
-    $aTokens = array();
-    foreach ($aSets as $aSet) {
-        foreach ($aSet as $sWord) {
-            $aTokens[' '.$sWord] = ' '.$sWord;
-            $aTokens[$sWord] = $sWord;
-        }
-    }
-    return $aTokens;
-}
-
-
 function getClassTypes()
 {
     return array(
@@ -632,10 +584,10 @@ function geometryText2Points($geometry_as_text, $fRadius)
         //
         preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/', $aMatch[1], $aPolyPoints, PREG_SET_ORDER);
         //
-    } elseif (preg_match('#MULTIPOLYGON\\(\\(\\(([- 0-9.,]+)#', $geometry_as_text, $aMatch)) {
+/*    } elseif (preg_match('#MULTIPOLYGON\\(\\(\\(([- 0-9.,]+)#', $geometry_as_text, $aMatch)) {
         //
         preg_match_all('/(-?[0-9.]+) (-?[0-9.]+)/', $aMatch[1], $aPolyPoints, PREG_SET_ORDER);
-        //
+        */
     } elseif (preg_match('#POINT\\((-?[0-9.]+) (-?[0-9.]+)\\)#', $geometry_as_text, $aMatch)) {
         //
         $aPolyPoints = createPointsAroundCenter($aMatch[1], $aMatch[2], $fRadius);