- $sSQL .= ' ST_LineLocatePoint(linegeo,'.$sPointSQL.') as fraction,';
- $sSQL .= ' startnumber, endnumber, interpolationtype,';
+ $sSQL .= ' (CASE WHEN endnumber != startnumber';
+ $sSQL .= ' THEN (endnumber - startnumber) * ST_LineLocatePoint(linegeo,'.$sPointSQL.')';
+ $sSQL .= ' ELSE startnumber END) as fhnr,';
+ $sSQL .= ' startnumber, endnumber, step,';