Manuscript Offprint

arXiv:2610.18342

CityCode: Building Agent-Operable 3D Cities from Sparse Aerial Observations

Jiahui Sun, Ran Bi, Yifei Liu, Xiaolong Zhou, Yishuo Xu, Yuanqi Li, Congcong Zhu, Lei Yang, Yanwen Guo, Zhihang Zhong, Hongjie Zhang

ABSTRACT

Urban spatial intelligence calls for 3D cities that agents can measure, interpret, and modify across successive tasks. Maintaining such cities as persistent, code-based states requires lightweight acquisition and support for consistent state updates without repeated dense reconstruction. We therefore formulate a new setting for grounded urban world construction: generating large-scale, instance-level parameterized 3D cities from one low-altitude aerial RGB image per region and known camera parameters, while recovering metrically scaled buildings and explicit road geometry and connectivity. We introduce CityCode, an agent-operable representation that unifies metric geometry, urban topology, visual semantics, and 3D assets through persistent entity identities, with dependency-aware versioned execution for validated updates and historical restoration. We further develop Air2Code to construct this representation by combining visual structure extraction with adapted metric depth estimation. To address occlusion and incomplete coverage, recovered structure and observed appearance guide generative completion and subsequent structure-aware 3D generation for buildings and backgrounds. Experiments on CitySample-Aerial and UrbanScene3D demonstrate substantially more accurate metric structure recovery and superior visual fidelity to the target cities compared with the evaluated baselines. Across 50 task chains of 50 steps each, CityCode supports continued querying, editing, planning, and historical restoration over evolving city states. Together, CityCode and Air2Code turn sparse aerial observations into persistent, agent-operable urban worlds for long-horizon urban spatial intelligence.

1 INTRODUCTION

Urban spatial intelligence calls for agents that can understand and act on 3D environments across successive tasks. For a specific city, this includes locating buildings, measuring their geometry, reasoning about road access, and modifying layouts, etc. These operations require connecting the city's metric geometry, road connectivity, and visual semantics, etc. (Zhang et al., 2026; Caldarelli et al., 2023). As edits accumulate, subsequent queries and plans must remain consistent with the updated entities and spatial relationships. These needs motivate constructing agent-operable 3D cities: structured environments built from observations of a target city and maintained across tasks for continued spatial reasoning and action.

A key challenge is constructing such worlds from limited input. Design-driven approaches, including CityGenAgent, CityCraft, and MajutsuCity, generate programs, layouts, and assets from user

Figure

Figure 1: From sparse aerial observations to agent-operable 3D cities. The city is assembled by fusing patch outputs in a shared metric frame. CityCode unifies metric building instances, road and block topology, and generated appearance through persistent entity identities. The highlighted building links visual evidence, a geometric proxy, and a 3D asset. The sequence illustrates extension, editing, retrieval, and planning over a shared city state. See the supplementary video for city generation results and long-horizon spatial interaction.

requirements (Liu et al., 2026; Deng et al., 2024; Huang et al., 2025). Other methods, including the UrbanWorld series and layout-conditioned generative models, use maps, building geometry, semantic layouts, or height information to guide construction (Shang et al., 2024; Wang et al., 2025b;c; Xie et al., 2025; Chung et al., 2026). These inputs provide structural control, but synthesized layouts need not correspond to a target city, while maps may have incomplete coverage, missing heights, or outdated geometry (Herfort et al., 2023; Bernard et al., 2022; Juhász, 2021). Sparse aerial observations offer a lightweight and timely source of visual evidence about a target city (Remondino et al., 2011), allowing its structure to be recovered for generation and spatial operations.

Image-conditioned methods such as Sat2City v2, Sat2Density++, Sat3DGen, MagicCity, and SceneFuse-3D generate or reconstruct urban scenes from aerial or satellite imagery (Hua et al., 2026; Qian et al., 2026a;b; Yao et al., 2025; Zheng et al., 2025). Their primary focus is scene-level synthesis or reconstruction, rather than jointly recovering metrically parameterized building instances, explicit road connectivity, and entity-linked assets for subsequent spatial operations. Sparse aerial views leave substantial facade appearance and occluded geometry unobserved. Constructing a usable city from these views requires coordinating structure recovery with generative completion: synthesized details must remain compatible with recovered massing, location, and metric scale.

We introduce a new setting for grounded urban world construction: generating instance-level parameterized 3D cities from sparse aerial observations for continued spatial reasoning and action. Given one low-altitude aerial RGB image per region and known camera parameters, the goal is to jointly construct measurable building geometry, explicit road connectivity, and detailed appearance (Figure 1). Our central idea is to use recovered metric entities as a common interface between observations, generated assets, and spatial operations. Each building retains one identity linking its visual evidence, metric structure, and generated asset across construction and subsequent tasks.

To realize this idea, we introduce CityCode, an agent-operable representation linking metric urban structure, observation evidence, visual semantics, and 3D assets through persistent entity identities.

Air2Code constructs this representation by combining visual structure extraction with adapted metric depth estimation (Figure 2). Its structure-and-observation-guided generation completes geometry and appearance from sparse observations, combining appearance completion and structure-aware 3D generation for buildings with height-guided background generation. During subsequent interaction, CityCode's dependency-aware versioned execution validates supported edits, updates affected records, and enables queries, planning, and historical restoration.

Experiments on synthetic and real-world-derived scenes demonstrate improved metric geometry and leading visual quality on CitySample-Aerial (CS-Aerial) and UrbanScene3D among the evaluated baselines. Ablations examine the contributions of depth adaptation, scale calibration, and structural guidance in generation. We further evaluate continued city-state use across 50 task chains of 50 steps each, covering construction, editing, querying, planning, and historical restoration. All 2,500 steps pass their task checks under the documented execution protocol, with operations continuing after restoration. Together, CityCode and Air2Code construct grounded urban worlds with accurate metric geometry and leading visual quality, providing persistent, agent-operable environments for long-horizon urban spatial intelligence.

References (42)