Procedure for applying for a building permit