Flow past a single small planar or three-dimensional roughness mounted on a smooth surface is investigated theoretically for various edge steepnesses, the oncoming planar motion being within a boundary layer or other near-wall shear. Nonlinear edge properties at large Reynolds numbers largely control the flow responses at the three-dimensional roughness wing-tips and the impacts of separation(s), among other features. From analysis and computation, criteria are found for the generation of nonlinear upstream influence, downstream influence and separations, for two-and three-dimensional roughnesses, as well as wing-tip separations. In particular, it is predicted that with a severe edge (e.g. a 90 degrees forward-facing step) the ratio of the upstream separation distance over the roughness edge height is a constant times Re-W(1/4) in two dimensions, the constant being approximately 0.142 and the Reynolds number Re-W being based on the roughness edge height and the incident velocity slope at the surface. In three dimensions Re-W is multiplied by sin psi, as expected physically, where psi is the tangent angle of the roughness planform. The ratio prediction above is very general, applying not only for any incident shear flow, but also for any front-edge geometry. Other separation and reattachment properties, extensions and a comparison with an experiment, are also discussed.