Recognizing functionally cohesive building groups is crucial for urban analysis, geospatial intelligence, and smart city applications. Traditional methods rely heavily on geometric information and often overlook the functional and semantic coherence of buildings, leading to their incorrect recognition. To overcome these challenges, this study introduces a flow-based community search approach, which models morphological, functional, and spatial relationships with a graph-based representation. The approach consists of graph representation learning, flow-based community generation, and community quality assessment, enabling adaptive building group recognition based on both structural coherence and functional similarity. Experimental results on commercial complex recognition demonstrate that our approach consistently outperforms traditional methods, achieving an improvement of over 5.4% in F1 score compared to the second-best method. Furthermore, its strong performance on limited training datasets highlights its robustness. These findings establish the proposed approach as an effective and reliable tool for recognizing functionally cohesive building groups, with practical viability in urban planning and policy formulation.
Accurate vessel trajectory prediction in complex nearshore waters remains challenging because local traffic patterns are highly heterogeneous and similar observed trajectories may lead to different future route continuations. Although historical Automatic Identification System (AIS) archives contain valuable evidence of previous vessel movements, such information is typically absorbed into model parameters rather than explicitly accessed during prediction. To address this limitation, this study proposes a spatially constrained memory-augmented framework for vessel trajectory prediction. An extensible key–value memory bank is constructed from paired representations of historical past and future trajectory segments. During prediction, geographically relevant candidates are first identified through spatial filtering, and the most similar historical trajectories are retrieved in the learned representation space. The corresponding future representations are then selectively aggregated with the current observed trajectory representation through an attention mechanism conditioned to generate the future trajectory. Experiments on AIS trajectories from the Pearl River Delta and adjacent coastal waters show that the proposed model consistently outperforms baselines over 60, 120, and 180 min horizons, with particularly clear improvements over the long short-term memory (LSTM) prediction backbone without historical trajectory fusion. Ablation results further confirm the effectiveness of spatially constrained retrieval and attention-based memory fusion, particularly for longer-horizon prediction.