- $sSQL .= " null AS extra_place ";
- $sSQL .= " FROM (";
- $sSQL .= " SELECT ";
- $sSQL .= " osm_id, ";
- $sSQL .= " place_id, ";
- $sSQL .= " country_code, ";
- $sSQL .= " CASE "; // interpolate the housenumbers here
- $sSQL .= " WHEN startnumber != endnumber ";
- $sSQL .= " THEN ST_LineInterpolatePoint(linegeo, (housenumber_for_place-startnumber::float)/(endnumber-startnumber)::float) ";
- $sSQL .= " ELSE ST_LineInterpolatePoint(linegeo, 0.5) ";
- $sSQL .= " END as centroid, ";
- $sSQL .= " parent_place_id, ";
- $sSQL .= " housenumber_for_place ";
- $sSQL .= " FROM (";
- $sSQL .= " location_property_osmline ";
- $sSQL .= " JOIN (values ".$sHousenumbers.") AS housenumbers(place_id, housenumber_for_place) USING(place_id)";
- $sSQL .= " ) ";
- $sSQL .= " WHERE housenumber_for_place >= 0 ";
- $sSQL .= " ) as blub"; //postgres wants an alias here
+ $sSQL .= ' null AS extra_place ';
+ $sSQL .= ' FROM (';
+ $sSQL .= ' SELECT ';
+ $sSQL .= ' osm_id, ';
+ $sSQL .= ' place_id, ';
+ $sSQL .= ' country_code, ';
+ $sSQL .= ' CASE '; // interpolate the housenumbers here
+ $sSQL .= ' WHEN startnumber != endnumber ';
+ $sSQL .= ' THEN ST_LineInterpolatePoint(linegeo, (housenumber_for_place-startnumber::float)/(endnumber-startnumber)::float) ';
+ $sSQL .= ' ELSE ST_LineInterpolatePoint(linegeo, 0.5) ';
+ $sSQL .= ' END as centroid, ';
+ $sSQL .= ' parent_place_id, ';
+ $sSQL .= ' housenumber_for_place ';
+ $sSQL .= ' FROM (';
+ $sSQL .= ' location_property_osmline ';
+ $sSQL .= ' JOIN (values '.$sHousenumbers.') AS housenumbers(place_id, housenumber_for_place) USING(place_id)';
+ $sSQL .= ' ) ';
+ $sSQL .= ' WHERE housenumber_for_place >= 0 ';
+ $sSQL .= ' ) as blub'; //postgres wants an alias here