Roof mounting clearance solar panels you want to mount on a roof must have at least 3 inches but 4 to 6 inches is better distance between the roof and solar panels frame.
Pv clearance from edge of roof.
Of course those in cyclone areas have the strictest laws and are not allowed to be any closer than 1 metre from the edge or apex of a roof.
Conventional fall protection guardrail fall restraint or fall arrest system is required.
Not sure if you found the answer but in the publication planning and installation photovoltaic system 2nd edition p276 7 2 1 it states in order to reduce the wind load the array should be a sufficient distance from the edge of the roof rule of thumb.
So if you have a 50mm high gap between panel and roof 100mm minimum distance panel from the roof edge.
60mm gap 120mm from roof edge 70mm gap 140 mm from roof edge etc.
Panels with a minimum distance between the panel and roof edge of 2s where s is the gap between the underside of the panel and the roof surface.
Between 6 feet and 15 feet from the edge.
How far should the solar panels be from the edges of the roof.
No solar pv systems should extend beyond the edges of the roof.
Panels and modules installed on dwellings with roof hips or valleys shall not be located less than 18 inches 457 mm from a hip or valley where panels or modules are to be placed on both sides of a hip or valley.
Conventional fall protection guardrail fall restraint or fall arrest system is required.
Depending on where you live different laws exist as to how close solar panels are allowed to be from a roof edge.
For general industry working at a 4 foot height or a low sloped roof osha requires.
Where panels are to be located on one side only of a hip or valley that is of equal length the 18 inch.
Five times the distance between the modules and the roof surface.