To authorize upon appeal in specific cases such variances from the terms of this chapter as will not be contrary to the public interest, where, owing to special conditions, a literal enforcement of the provisions of this chapter will result in practical difficulty or unnecessary hardship, so that the spirit of this chapter shall be observed, public safety and welfare secured, and substantial justice done.