]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/reverse.php
polygons.php: print total number of broken polygons
[nominatim.git] / website / reverse.php
index d1c554a454352a79914f2f75a4096c182f8fa490..fd1f5c27c2f7cb43683d4315dee6bc5f67da67d9 100755 (executable)
@@ -1,7 +1,8 @@
 <?php
        @define('CONST_ConnectionBucket_PageType', 'Reverse');
 
-       require_once(dirname(dirname(__FILE__)).'/lib/init-website.php');
+       require_once(dirname(dirname(__FILE__)).'/settings/settings.php');
+       require_once(CONST_BasePath.'/lib/init-website.php');
        require_once(CONST_BasePath.'/lib/log.php');
        require_once(CONST_BasePath.'/lib/PlaceLookup.php');
        require_once(CONST_BasePath.'/lib/ReverseGeocode.php');
                $oPlaceLookup->setPolygonSimplificationThreshold($fThreshold);
 
                $fRadius = $fDiameter = getResultDiameter($aPlace);
-               $aOutlineResult = $oPlaceLookup->getOutlines($aPlace['place_id'],$aPlace['lon'],$aPlace['lat'],$fRadius);
+               $aOutlineResult = $oPlaceLookup->getOutlines($aPlace['place_id'], $aPlace['lon'], $aPlace['lat'], $fRadius);
 
-               $aPlace = array_merge($aPlace, $aOutlineResult);
+               if ($aOutlineResult)
+               {
+                       $aPlace = array_merge($aPlace, $aOutlineResult);
+               }
        }
        else
        {