Up to biholomorphic change of variable, local invariants of a quadratic differential at some point of a Riemann surface are the order and the residue if the point is a pole of even order. Using the geometric interpretation in terms of flat surfaces, we solve the Riemann-Hilbert type problem of characterizing the sets of local invariants that can be realized by a pair (X,q) where X is a compact Riemann surface and q is a meromorphic quadratic differential. As an application to geometry of surfaces with positive curvature, we give a complete characterization of the distributions of conical angles that can be realized by a cone spherical metric with dihedral monodromy.