- $sSQL .= ' CASE WHEN (class = \'highway\') AND (ST_GeometryType(geometry) = \'ST_LineString\') THEN';
- $sSQL .= ' ST_Y(closest_point)';
- $sSQL .= ' ELSE ST_Y(centroid) ';
- $sSQL .= ' END as centrelat, ';
- $sSQL .= ' CASE WHEN (class = \'highway\') AND (ST_GeometryType(geometry) = \'ST_LineString\') THEN';
- $sSQL .= ' ST_X(closest_point)';
- $sSQL .= ' ELSE ST_X(centroid) ';
- $sSQL .= ' END as centrelon, ';
+ $sSQL .= ' ST_Y(closest_point) as centrelat,';
+ $sSQL .= ' ST_X(closest_point) as centrelon,';