In order to have an effective solar generation system, your roof must receive enough sunlight. Your property should have clear, unobstructed access to the sun for most of the day and throughout the year. Because shading will reduce the amount of electricity your system will produce, photovoltaic panels should be installed in a location that is not shaded by trees, chimneys or nearby structures.
In California the sun is in the southern half of the sky. The best orientation for a photovoltaic system therefore is on a south- or southwest-facing roof. Flat roofs can also work because the photovoltaic array can be mounted on frames tilting south or southwest. Photovoltaic array can also be mounted on the ground.