Optical generation and control of spatial Riemann waves