Curve Estimation Based on Localised Principal Components - Theory and Applications