We describe an algorithm for constructing an algebraic stratification of the space of holomorphic foliations on CP 2 of degree d with respect to the action of Aut(CP 2 ) by change of coordinates. The strata are non-singular, locally-closed algebraic varieties. We show that these varieties parameterize foliations with certain type of degenerate singular points. We give the explicit form of the foliation in some strata. We also obtain the dimension of these varieties.