  Coding in the projective space has received recently a lot of attention due
to its application in network coding. Reduced row echelon form of the linear
subspaces and Ferrers diagram can play a key role for solving coding problems
in the projective space. In this paper we propose a method to design
error-correcting codes in the projective space. We use a multilevel approach to
design our codes. First, we select a constant weight code. Each codeword
defines a skeleton of a basis for a subspace in reduced row echelon form. This
skeleton contains a Ferrers diagram on which we design a rank-metric code. Each
such rank-metric code is lifted to a constant dimension code. The union of
these codes is our final constant dimension code. In particular the codes
constructed recently by Koetter and Kschischang are a subset of our codes. The
rank-metric codes used for this construction form a new class of rank-metric
codes. We present a decoding algorithm to the constructed codes in the
projective space. The efficiency of the decoding depends on the efficiency of
the decoding for the constant weight codes and the rank-metric codes. Finally,
we use puncturing on our final constant dimension codes to obtain large codes
in the projective space which are not constant dimension.
