Near-field and far-field modeling of scattered surface waves. Application to the apertureless scanning near-field optical microscopy