Along with the continuous advancement of agricultural modernization, the traditional agricultural production mode is changing structurally, and the balance between the spatial structure of original urban-village system and the mode of agricultural production has been broken. The large-scale agriculture production, the transformation of life-style, and the man-land relationship imbalance make the traditional urban-village system space urgently need to be optimized. Although modern agriculture has been popularized in most towns, the technologies and approaches have not been implemented into spatial planning. Based on the research of the mechanism between agricultural production mode and urban-village system, this paper presents an idea of spatial optimization of urban-village system. Taking Longchi Town in Pucheng County, Weinan City, Shanxi Province as an example, it considers the characteristics and requirements of agricultural production, and uses the methods of ArcGIS location-allocation and potential evaluation to optimize the urban-village special structure. Finally, it gets the result of one central rural community and four general rural communities, then it guides the different development of villages in the communities.