In this work, we analyze in detail the problem of piston driven shock waves in planar media. Similarity solutions to the compressible hydrodynamics equations are developed, for a strong shock wave, generated by a time dependent pressure piston, propagating in a non-homogeneous planar medium consisting of an ideal gas. Power law temporal and spatial dependency is assumed for the piston pressure and initial medium density, respectively. The similarity solutions are written in both Lagrangian and Eulerian coordinates. It is shown that the solutions take various qualitatively different forms according to the value of the pressure and density exponents. We show that there exist different families of solutions, for which the shock propagates at a constant speed, accelerates, or slows down. Similarly, we show that there exist different types of solutions, for which the density near the piston is either finite, vanishes, or diverges. Finally, we perform a comprehensive comparison between the planar shock solutions and Lagrangian hydrodynamic simulations, by setting proper initial and boundary conditions. A very good agreement is reached, which demonstrates the usefulness of the analytic solutions as a code verification test problem.