A port is a location on a coast or shore containing one or more harbors where ships can dock and transfer people or cargo to or from land. Port locations are selected to optimize access to land and navigable water, for commercial demand, and for shelter from wind and waves. Ports with deeper water are rarer, but can handle larger, more economical ships. Since ports throughout history handled every kind of traffic, support and storage facilities vary widely, may extend for miles, and dominate the local economy. Some ports have an important military role.