I am looking for a rigorous book on both 2d and 3d euclidean geometry, and also how analytic geometry can be developed from synthetic geometry. I haven't really found such a book yet. I would be very glad if someone could reference such a book.
Hilbert's "Foundations of Geometry" for a purely synthetic development (and more).
E. Moise's "Elementary Geometry from an Advanced Standpoint" for a hybrid approach based on metric notions for distance and angle measure.
I believe "Euclid and Beyond" (Hartshorne) is likely relevant here, but haven't read it.
If you can read german: W. Schwabhäuser, W Szmielew, A. Tarski Metamathematische Methoden in der Geometrie
is an extremely rigorous reference based on the axioms of Tarski. It contains the detailed proof of how analytic geometry can be developed from the geometrical axioms.
We are formalized a large part of this book using a computer system: http://dpt-info.u-strasbg.fr/~narboux/tarski.html