A nonlinear regression is a signal that has a specified property (which may be different from linearity) and that optimally approximates a given signal. Such properties are given in the domain of the signal (e.g. time, space) and are called shape constraints. The optimality of the approximation is measured with a semimetric defined on the space of signals under consideration. Finite-length discrete signals are well modeled as point in n-dimensional real space Rn. Thus, for example, a linear regression of a signal is a signal, in the subspace of linear signals, that is closest (usually under the Euclidean metric) to the given signal. Four shape constraints considered in the paper; piecewise constancy, local monotonicity, piecewise linearity and local convex/concavity. They are constraints of smoothness and in this respect, local convex/concavity has the advantage over local monotonicity that a sine wave of small frequency may be locally concave/convex but not locally monotonic. 2D signals defined on quadrille tessellations and on hexagonal tessellations are considered briefly; local monotonicity of degree 3 is defined for 2D signals. A technique for obtaining locally monotonic approximations of 2D signals is presented.