This article developed a new method to obtain optimum urban forms minimizing the moving cost from each point to the central district center with consideration of floor height. By applying the method to linear cities including hierarchical spatial structure, this article aimed to clarify the effect of various factors including floor height on the optimum urban forms, and to verify the differences of the optimal urban forms with consideration of floor height from those without it in the previous studies. This article assumed hierarchical district centers and transportation system according to the stage of life needs. Based on the assumption of compact city system, this article calculated the optimal urban form. The Optimal urban form is defined as the city to minimize the total travel cost from each houses to the central district center via the nearest district center. Conventionally, the urban model to minimize the travel cost was defined without considering the floor height. In order to make the urban model more realistic, we formulated a new urban model considering the floor height and calculated the optimal urban form. When the urban model has multi-layered horizontal floors in the vertical direction, the formula of the travel cost include the integer variable expressing the number of floors. Therefore, we cannot use the integration to cost calculation of height direction and this makes the calculation of the optimal urban form difficult. In order to overcome the difficulties, this study, as the first step, calculated the optimal urban form of a linear city. This linear city can be considered as a city developed along a railway or highway, or as a section of a city. As a result, when the total floor area is given the urban form that minimizes the travel cost was uniquely determined. The result also showed that the obtained optimum urban forms are similar when only the total floor area changes but that they are not similar when the travel cost of the vertical movement or of the bus change. The comparison between the two optimal urban forms, one of which takes into account the floor height and the other of which does not take into account, showed the following three results. First, when we consider the floor height, the height of the city is generally lower than the urban model without considering the floor height. Second, the distance between the district centers of the former model is larger than that of the latter one. Third, because the area from which the central district center is the nearest grows, the population accessing the central district center directly increases. In other words, when considering the floor height, the city is expanded in the horizontal direction. The article left three issues for further study. First, the city model should be extended to the three-dimensional city model. Second, the review of suitable travel cost and other factors suppressing the highest height of actual cities is necessary. The horizontal size compared to the vertical one obtained by this study is extremely smaller than that of the actual cities. By adopting the appropriate travel cost and by considering other factors including the limitations of construction technique or building cost, more realistic urban forms may be obtained. Third, it is necessary to compare the actual city forms with this city model. The factor except the travel costs that decides real city forms may be found by comparing two. With that in mind, it is necessary to indicate the rule of compact city system.