Using a geographical scale-free network to describe relations between people in a city, we explain both superlinear and sublinear allometric scaling of urban indicators that quantify activities or performances of the city. The urban indicator Y (N ) of a city with the population size N is analytically calculated by summing up all individual activities produced by person-to-person relationships. Our results show that the urban indicator scales superlinearly with the population, namely, Y (N ) ∝ N β with β > 1, if Y (N ) represents a creative productivity and the indicator scales sublinearly (β < 1) if Y (N ) is related to the degree of infrastructure development. These results coincide with allometric scaling observed in real-world urban indicators. We also show how the scaling exponent β depends on the strength of the geographical constraint in the network formation.