In this paper we analyze some variants of the classical uncapacitated facility location problem with a ratio as an objective function. Using basic concepts and results of fractional programming, we identify a class of one-level fractional location problems which can be solved in polynomial time in terms of the size of the problem. We also consider the fractional two-echelon location problem, which is a special case of the general two-level fractional location problem. For this two-level fractional location problem we identify cases for which its solution involves decomposing the problem into several one-level fractional location problems.