Spacing laws - permitted or constructed

When looking at spacing for a legal sign - what is the measurement based on? If someone has a lease and a permit, do you measure from their permit or can you build your sign first and effectively negate your competitor’s location? If it is based on permit and not constructed sign, what happens when the city goofs and issues you a permit in an illegal location based on a permitted and not constructed sign? Are you then tearing down your new sign for no compensation and you are SOL?