]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/PlaceLookup.php
adapt to code style conventions
[nominatim.git] / lib / PlaceLookup.php
index e29b6d0ae693aec509a40e590b145e0e09fbc514..f62ca6275a73941c8ad1c7bbde29c6af7c619628 100644 (file)
@@ -6,8 +6,8 @@
                protected $iPlaceID;
 
                protected $sType = false;
                protected $iPlaceID;
 
                protected $sType = false;
-        
-        protected $fTigerFraction =-1;
+
+               protected $fTigerFraction =-1;
 
                protected $aLangPrefOrder = array();
 
 
                protected $aLangPrefOrder = array();
 
                        {
                                $this->setOSMID($details['osm_type'], $details['osm_id']);
                        }
                        {
                                $this->setOSMID($details['osm_type'], $details['osm_id']);
                        }
-            if (isset($details['fraction'])) $this->fTigerFraction = $details['fraction'];
+                       if (isset($details['fraction'])) $this->fTigerFraction = $details['fraction'];
 
                        return $this->lookup();
                }
 
                        return $this->lookup();
                }
                                if ($this->bNameDetails) $sSQL .= " null as names,";
                                $sSQL .= " ST_X(point) as lon, ST_Y(point) as lat from (select *, ST_LineInterpolatePoint(linegeo, (housenumber-startnumber::float)/(endnumber-startnumber)::float) as point from ";
                                $sSQL .= " (select *, ";
                                if ($this->bNameDetails) $sSQL .= " null as names,";
                                $sSQL .= " ST_X(point) as lon, ST_Y(point) as lat from (select *, ST_LineInterpolatePoint(linegeo, (housenumber-startnumber::float)/(endnumber-startnumber)::float) as point from ";
                                $sSQL .= " (select *, ";
-                $sSQL .= " CASE WHEN interpolationtype='odd' THEN floor((".$this->fTigerFraction."*(endnumber-startnumber)+startnumber)/2)::int*2+1";
-                $sSQL .= " WHEN interpolationtype='even' THEN ((".$this->fTigerFraction."*(endnumber-startnumber)+startnumber+1)/2)::int*2";
-                $sSQL .= " WHEN interpolationtype='all' THEN (".$this->fTigerFraction."*(endnumber-startnumber)+startnumber)::int";
-                $sSQL .= " END as housenumber";
-                $sSQL .= " from location_property_tiger where place_id = ".(int)$this->iPlaceID.") as blub1) as blub2";
+                               $sSQL .= " CASE WHEN interpolationtype='odd' THEN floor((".$this->fTigerFraction."*(endnumber-startnumber)+startnumber)/2)::int*2+1";
+                               $sSQL .= " WHEN interpolationtype='even' THEN ((".$this->fTigerFraction."*(endnumber-startnumber)+startnumber+1)/2)::int*2";
+                               $sSQL .= " WHEN interpolationtype='all' THEN (".$this->fTigerFraction."*(endnumber-startnumber)+startnumber)::int";
+                               $sSQL .= " END as housenumber";
+                               $sSQL .= " from location_property_tiger where place_id = ".(int)$this->iPlaceID.") as blub1) as blub2";
                        }
                        else
                        {
                        }
                        else
                        {
 
                        if ($this->bAddressDetails)
                        {
 
                        if ($this->bAddressDetails)
                        {
-                if($this->sType == 'tiger') // to get addressdetails for tiger data, the housenumber is needed
-                    $aAddress = $this->getAddressNames($aPlace['housenumber']);
-                else
-                    $aAddress = $this->getAddressNames();
+                               if($this->sType == 'tiger') // to get addressdetails for tiger data, the housenumber is needed
+                                       $aAddress = $this->getAddressNames($aPlace['housenumber']);
+                               else
+                                       $aAddress = $this->getAddressNames();
                                $aPlace['aAddress'] = $aAddress;
                        }
 
                                $aPlace['aAddress'] = $aAddress;
                        }