Legal Foundations of Planning