Texture analysis methods offer substantial advantages and potential in examining macro-topographic features of dunes. Despite these advantages, comprehensive approaches that integrate digital elevation model (DEM) with quantitative texture features have not been fully developed. This study introduced an automatic classification framework for dunes that combines texture and topographic features and validated it through a typical coastal aeolian landform, namely, dunes in the Namib Desert. A three-stage approach was outlined: (1) segmentation of dune units was conducted using digital terrain analysis; (2) six texture features (angular second moment, contrast, correlation, variance, entropy, and inverse difference moment) were extracted from the gray-level co-occurrence matrix (GLCM) and subsequently quantified; and (3) texture–topographic indices were integrated into the random forest (RF) model for classification. The results show that the RF model fused with texture features can accurately identify dune morphological characteristics; through accuracy evaluation and remote sensing image verification, the overall accuracy reaches 78.0% (kappa coefficient=0.72), outperforming traditional spectral-based methods. In addition, spatial analysis reveals that coastal dunes exhibit complex texture patterns, with texture homogeneity being closely linked to dune-type transitions. Specifically, homogeneous textures correspond to simple and stable forms such as barchans, while heterogeneous textures are associated with complex or composite dunes. The complexity, periodicity, and directionality of texture features are highly consistent with the spatial distribution of dunes. Validation using high-resolution remote sensing imagery (Sentinel-2) further confirms that the method effectively clusters similar dunes and distinguishes different dune types. Additionally, the dune classification results have a good correspondence with changes in near-surface wind regimes. Overall, the findings suggest that texture features derived from DEM can accurately capture the dynamic characteristics of dune morphology, offering a novel approach for automatic dune classification. Compared with traditional methods, the developed approach facilitates large-scale and high-precision dune mapping while reducing the workload of manual interpretation, thus advancing research on aeolian geomorphology.