168
Views
0
CrossRef citations to date
0
Altmetric
Report

Generation and optimisation of colour-shaded relief maps using neural networks

, , , , &
Article: 2322085 | Received 12 Dec 2023, Accepted 16 Feb 2024, Published online: 06 Mar 2024

Abstract

Shaded relief is a primary tool used to effectively portray three-dimensional terrain on a two-dimensional plane surface. Colour-shaded relief maps use colour variations to effectively represent elevation changes and even capture the natural hues of surface landscapes. This study evaluates and proposes methods for creating colour-shaded relief maps using neural networks. Four distinct neural network shading models were trained using a dataset composed of slices from ‘digital elevation model (DEM)–manual colour-shaded relief maps’. The aim was to generate colour-shaded relief maps based on DEM data specific to the mapped area. The experimental results suggest that all four types of network-based shaded relief maps models effectively depict the primary terrain features within the mapped area. The CGAN (UNet generator) model yields the most optimal results, showcasing the superior cartographic generalisation of relief and delineation of terrain structures compared with the other models. Specialised training was conducted for the CGAN (UNet generator) shaded relief model to improve the clarity and authenticity of colour-shaded relief maps.

1. Introduction

Owing to its visual clarity and readability, shaded relief continues to be one of the most effective tools for portraying terrain on two-dimensional maps. Despite remarkable advances in computer cartography techniques, computer-generated shaded relief maps do not match the quality of manual shaded relief maps.

In recent years, the application of deep learning techniques in creating shaded relief maps has yielded promising research outcomes (Jenny et al. Citation2021; Li et al. Citation2022; Yin et al. Citation2023). Training models using manually created shaded relief map samples has resulted in maps that closely resemble the effects of manual relief shading, surpassing the quality achieved through conventional cartography and GIS software. In Jenny’s study (Jenny et al. Citation2021), the UNet model was trained using both manual shaded relief maps and digital elevation model (DEM) data from the same geographic area. Subsequently, the trained network model could generate greyscale-shaded relief maps for any given area by inputting DEM data. Based on assessments from cartography experts, the generated shaded relief maps closely emulate the artistic style of manual shaded relief maps used for training and demonstrate notable terrain generalisation effects. Expanding on this foundation, Li et al. (Citation2022) trained a model utilising conditional generative adversarial networks (CGANs) to generate greyscale-shaded relief maps. The model’s ability to generate shaded relief maps across different scales has been improved by consistently optimising network parameters through the interplay of ‘generation–discrimination’. In addition, Yin et al. (Citation2023) proposed a ResUNet-based shading model, combining residual structures with UNet. Greyscale-shaded relief maps based on this model had superior visual effects, offering a potential solution to terrain generalisation issues encountered in producing shaded relief maps at smaller scales.

Previously used learning samples were all manual greyscale-shaded relief maps. This prompted use to ponder the following: Is it viable to use manually crafted coloured relief maps in training the model to produce colour-shaded relief maps? Can the neural network model used for generating greyscale-shaded relief maps be applied to produce colour-shaded relief maps? If applicable, do the outcomes of these models significantly differ? Are any enhanced methodologies available to achieve superior results in the production of colour-shaded relief maps?

The aim of this study was to address these questions and identify techniques and methods that can be used to produce colour-shaded relief maps using neural network models. Initially, preprocessing and slicing procedures were applied to both manually created colour-shaded relief maps and DEM data, thereby creating an image pair training set termed ‘DEM–manual colour-shaded relief maps’. Subsequently, we developed four shading models: UNet, ResUNet, CGAN (UNet generator) and CGAN (ResUNet generator). These models underwent training using the established dataset to fine-tune their parameters and achieve the capability to produce colour-shaded relief maps using DEM data from diverse geographical regions. Ultimately, an evaluation was conducted to compare and analyse the performance of diverse shading models in producing colour-shaded relief maps across various geographical regions. Subsequently, suggestions for optimisation methods were put forth based on the results.

2. Related work

The UNet, CGAN and ResUNet models yielded promising experimental results with respect to creating greyscale-shaded relief maps using neural networks. Based on these models, the fundamental principles involved in the manual creation of shaded relief maps could be successfully learned: fine-tuning lighting locally to vividly portray the primary topography; highlighting the contrast in terrain structure on either side of ridges through greyscale variations; adapting the sharpness or smoothness of ridges based on varying perspectives; and generalising terrain by removing less critical aspects to reduce visual complexity. In most experimental instances, shaded relief maps generated by the UNet model accurately delineate primary topographic features, without indications of fictitious or non-existent terrain features. However, when handling pixel sizes smaller than the data used for training, generated shaded relief maps tend to lack detailed terrain features (Jenny et al. Citation2021). In contrast to the UNet model, shaded relief maps generated by the CGAN model highlight the ridge morphology and exhibit a stronger adaptability to varying scales, effectively managing situations in which pixel sizes differ from the training model (Li et al. Citation2022). In addition, the adaptability of the ResUNet model to DEMs of different resolutions surpasses that of the UNet model and is more conducive to crafting shaded relief maps at smaller scales (Yin et al. Citation2023).

Compared with greyscale-shaded relief maps, colour-shaded relief maps have broader applications. Colour-shaded relief maps leverage colour variations to better depict changes in elevation and even the natural hues of surface landscapes, which can enrich and truly reflect the terrain features, while meeting people’s visual perception and have higher readability.

Currently, the colouration in colour-shaded relief maps in cartography and GIS software is typically DEM-derived, using hypsometric tints based on surface elevation (Imhof Citation1982). The effectiveness of colour design strongly relies on the experience and expertise of cartographers, along with their familiarity with the mapped area, making it suitable for experienced and professional cartographers. For instance, Guo et al. (Citation2004) investigated the colour design of visual-based colour-shaded relief maps, proposing a hypsometric tinting scheme based on the design of shaded relief maps for different Chinese provinces. Chen and Zhu (Citation2006) developed a comprehensive colouration scheme for colour-shaded relief maps and proposed a multi-mode colour design approach. Based on this methodology, appropriate colour modes are automatically selected based on the elevation range within DEM data, enabling the generation of specialised colour-shaded relief maps. To enhance colour richness and achieve smoother transitions, scholars have established mapping models for surface features derived from DEM data and visual spatial colour components. For example, Li et al. (Citation1999) established a series of mapping models that translate terrain elevation, slope and surface normal directions into Hue, Saturation, Value (HSV) colour space components and used ARC/INFO to realize colour shading processing of DEM data. Xiao et al. (Citation2013) computed the H and S components of the HSV colour space using elevation data and introduced digital shading algorithms to calculate terrain shading, which represents the reflected light intensity of surface points. By utilising the reflected light intensity, they calculated the V component within the HSV colour space. This process resulted in a set of mapping models ranging from elevation and reflected light intensity to HSV colour space components. They used Visual C++ to process DEM data to generate colour-shaded relief maps.

To address the discrepancy between the colour design in shaded relief maps and the actual surface landscape, scholars have integrated elevation information with environmental data. They used continuous gradient colour bands instead of segmented intervals for colouring landscape. Based on temperature and precipitation conditions, Patterson and Jenny (Citation2011) divided the globe into four environmental regions and established false-colour masks for respective areas. Different colour bands were assigned to various environmental regions. These masks were blended and overlaid onto light-coloured terrain shading, resulting in shaded relief maps that effectively simulate natural landscapes. Jenny and Hurni (Citation2006) used a colour lookup table to configure shaded relief maps. During the creation of coloured relief shading, the elevation for each pixel was derived from the DEM, whereas greyscale values were determined from the original relief shading. Based on these two values, corresponding colours were extracted from the colour lookup table. Darbyshire and Jenny (Citation2017) used the aforementioned cross-blended hypsometric tinting method and created smaller-scale colour-shaded relief maps using DEM and precipitation data with the same resolution. The investigative studies demonstrated that using the cross-blended hypsometric tinting method effectively communicates geographical and environmental information (Patterson and Jenny Citation2014).

Among existing methods for colouring shaded relief maps, fixed colour schemes are more prevalent. However, these schemes cannot be adjusted according to specific regional characteristics, limiting their ability to effectively reflect the unique features of different areas. Although colour mapping and cross-blending for colouring can avoid the problem of overly monotonous colours and inconsistency with regional environments, they require manual colour design during the colouring process, thus placing a relatively high demand on cartographers. Considering that deep learning techniques are effective for producing greyscale-shaded relief maps, we aimed to apply a deep learning network to learn the colour design of high-quality, manually created coloured relief maps and realize the production of colour-shaded relief maps for any area.

3. Data and methodology

3.1. Data and preprocessing

In this study, 90 m resolution ‘Swiss Style’ manual colour-shaded relief map products produced by Switzerland’s national mapping agency (Swisstopo, Wabern, Switzerland) were used as the experimental dataset for constructing the training set along with the corresponding Shuttle Radar Topography Mission (SRTM) 90 m resolution DEM data of the geographic region (). The experimental dataset covered a geographical area ranging from 5°E to 13.3°E longitude and 45°N to 48.7°N latitude, encompassing Switzerland and its surrounding regions. The terrain elevation ranged between −26 and 4783 m, predominantly comprising mountainous, hilly and plain terrains.

Figure 1. Experimental data.

Figure 1. Experimental data.

Before constructing the image pair training set termed ‘DEM–manual colour-shaded relief maps,’ both manual-shaded relief maps and DEM data were pre-processed (Jenny et al. Citation2021; Li et al. Citation2022; Yin et al. Citation2023). This involved standardising coordinate systems (the World Geodetic System 1984 (WGS84) geographic coordinate system) and resampling raster images (0.001°). Jenny et al. (Citation2021), Li et al. (Citation2022) and Yin et al. (Citation2023) normalised DEM data, which is conducive to improving the convergence speed. When generating shaded relief using this approach, the elevation of the mapping area must be adjusted according to the actual situation. For example, if the terrain of the mapping area is gentle and the maximum elevation is considerably lower than the maximum elevation of the sample data, the elevation of the mapping area must be scaled to [0,kmax, kmax1; kmax represents the maximum elevation of the mapping area, which can be set according to the actual situation. For example, Jenny et al. (Citation2021) set the maximum elevation of lowland or round hill area to 20% in Cartographic Relief Shading with Neural Networks. If the terrain of the mapping area is steep and the lowest elevation is markedly higher than the lowest elevation of the sample data, the elevation of the mapping area must be scaled to [kmin,1,kmin0; kmin represents the minimum elevation of the mapping area, which can be set according to the actual situation. However, this method is limited by the high subjectivity associated with defining kmax and kmin. If the elevation of the mapping area is not processed when normalized and non-normalized data are applied for model training and hill shading generation, the training and generation effect of non-normalized data are superior. Moreover, the colour mapping of colour-shaded relief maps generated by non-normalized data are more accurate, with clearly defined high-altitude features (). In contrast, the normalized data stretches the elevation values of the mapping area and blurs the high altitude features. Therefore, to facilitate operation and suitability for terrain with different elevation ranges, we opted to not normalize the DEM data.

Figure 2. Comparison of colour-shaded relief maps generated based on non-normalised and normalised data.

Figure 2. Comparison of colour-shaded relief maps generated based on non-normalised and normalised data.

After data pre-processing, manual shaded relief maps and DEM data were sliced into 256 × 256 pixel-sized image patches. Patches that could not be completely sliced were discarded. Image pairs were then established based on the corresponding relationship of the slices, generating 556 pairs of ‘DEM–manual colour-shaded relief maps’ as the training set. Processing during the training set construction did not alter change the original data format, i.e. GeoTiff format.

3.2. Network architecture

By referring to neural networks previously used in existing literature for generating greyscale-shaded relief maps, four typical neural networks, that is, UNet, ResUNet, CGAN (UNet generator) and CGAN (ResUNet generator), were analysed in this study by applying them for the automatic generation of colour-shaded relief maps.

3.2.1. UNet

UNet (Ronneberger et al. Citation2015) is a fully convolutional neural network with a U-shaped symmetrical structure. Its left half encodes the target by using convolutional operations and downsampling to extract deep features, whereas the right half decodes features by using upsampling and transposed convolution operations to obtain the output results. Skip connections are used between the encoding and decoding stages to enable the fusion of shallow image features and multi-scale deep features during the upsampling process within the same stage. This integration allows for precise segmentation and accurate localisation of boundary information. UNet requires a small training set and provides high segmentation accuracy. Initially proposed for precise segmentation in biomedical imaging, the results of subsequent studies also demonstrated its advantages in geographical raster image segmentation (Heitzler and Hurni Citation2020). Building upon the network of Jenny et al. (Citation2021) comprising five down- and upsampling processes proposed in 2021, the network structure was modified in this study: the encoder doubles the number of channels with each convolution and reduces the image size by half with each downsampling; the decoder doubles the image size with each upsampling and halves the number of channels with each convolution; the final output consists of three channels ().

Figure 3. Modified UNet model.

Figure 3. Modified UNet model.

3.2.2. ResUNet

ResUNet (He et al. Citation2016) is a U-shaped deep learning network that incorporates residual connections into its architecture. Including residual connections allows the model to mitigate issues such as vanishing or exploding gradients during the training process, consequently enhancing the stability and facilitating network convergence.

Compared with the traditional U-shaped network, ResUNet has the following advantages. First, it improves the feature representation capability. By introducing residual connections, ResUNet captures both local and global features within images, thereby enhancing the model’s feature representation capability. Second, it has a strong generalisation ability because it can adapt effectively to different datasets and tasks.

The ResUNet model architecture used in this study for generating colour-shaded relief maps is depicted in . The residual structure used in this model follows an approach proposed in the literature (He et al. Citation2016) based on which batch normalisation layers (Ioffe and Szegedy Citation2015) and activation layers are placed before the weight layers. If the number of channels in the two branches of the residual structure is different, a 1 × 1 convolution is used in the shortcut connection to adjust the number of channels before adding feature maps. All convolutional layers in this model, except for the output layer, use the ReLU activation function, whereas the output layer is activated by the Sigmoid function.

Figure 4. Modified ResUNet model.

Figure 4. Modified ResUNet model.

3.2.3. CGAN

The GAN is a deep learning framework proposed by Goodfellow et al. (Citation2014). The main concept involves two neural networks working collaboratively to generate realistic images, audio or other data. Specifically, one neural network serves as the generator, responsible for producing fake data, whereas the other acts as the discriminator, determining the authenticity of the data. Based on continuous ‘generation–discrimination’ iterations, the generator’s produced data becomes more similar to the actual data.

The primary advantage of GAN is its ability to generate high-quality, realistic images, videos and other data. Therefore, it is widely applied in computer vision, image processing and related fields. In addition, GAN can be used for tasks such as data augmentation, image restoration and image style transfer. However, GAN also has drawbacks, including training instability and mode collapse, which require further improvements. To better constrain GAN, Mirza and Osindero (Citation2014) introduced additional information ‘y’ as a condition in both the generator and the discriminator of GAN, resulting in CGAN, as illustrated in . The objective function of CGAN can be formulated as shown in EquationEq. (1), representing a conditional probability in a two-player minimax game. (1) minGmaxDVD,G=ExpdataxlogDx|y+Ezpdatazlog1DGz|y(1)

The two CGANs used in this experiment use UNet and ResUNet architectures as generators, while PatchGAN discriminators are used (Isola et al. Citation2017). The network structures are illustrated in .

Figure 5. Modified CGAN model.

Figure 5. Modified CGAN model.

3.3. Network training and output

The hardware environment for model training consisted of an Ubuntu 18.04 system with 64 GB of memory and a Quadro A2000 graphics card with 6 GB of VRAM. PyTorch 1.10, an open-source deep learning library, along with Python 3.9, were used for model construction and training.

During the model training, weight initialisation was performed using the method proposed by He et al. (Citation2015). The Adam optimizer (Kingma and Adam Citation2017) was selected for training optimisation. Based on the experimental conditions, the batch size was set to 4; that is, four pairs of images were used to train the network each time. All model parameters were updated each time. The training iterations were set to 1000, and the learning rate was 0.001.

In general, it is necessary to train a deep learning model with many samples to create a model with good generalization. If it is difficult to increase the sample data volume by expanding the collection scope during the data acquisition stage, data augmentation (DA) can be performed on the sample data to expand the sample size. Due to the relative lack of high-quality manual colour-shaded relief maps, this study mirrored and rotated the samples; although the number of samples increased, the effect of shading generated by the network was overtly reduced. Therefore, 556 pairs of ‘DEM–manual colour-shaded relief maps’ were used as experimental data; all were used for training without dividing the verification set.

Due to the lack of standard reference images for comparative calculation, using the loss function or other similar indicators to quantitatively evaluate the colour relief shading effect proved challenging. Therefore, visual qualitative analysis was used to evaluate differences in colour relief shading.

In the CGAN (UNet) shading model training process, the shading effect generated by sample DEM was continuously optimized and gradually approached the sample shading effect (). Meanwhile, shows better shading slices generated by UNet, ResUNet, CGAN (UNet generator) and CGAN (ResUNet generator) training. Indeed, the effect of the CGAN model was markedly superior to that of the UNet and ResUNet models.

Figure 6. CGAN (UNet) training process.

Figure 6. CGAN (UNet) training process.

Figure 7. Shading output during training.

Figure 7. Shading output during training.

When a trained network shading model is used to generate colour relief shading based on DEM, the DEM of the mapped area must be sliced before inputting it into the network shading model. Considering that the parameters of the model’s convolutional layers are independent of the input image size, the input DEM size can be adjusted to other power-of-two dimensions, such as 512 × 512 or 1024 × 1024 pixels, based on hardware constraints. During the process of manually creating shaded relief maps, cartographers often adjust the local shading effect based on the surrounding terrain information, such as light direction and intensity, to enhance the cartographic representation. However, the network models used for shading relief on slices do not adequately consider the terrain information beyond the edges of the slices. Therefore, we selected only the central region of each shaded relief slice as the final output slice. In this study, the selected slice size was 256 × 256 pixels, with the central area measuring 156 × 156 pixels.

Slice data are input into and produced by, the network shading model; hence, the produced data must be stitched into an image before output. To avoid seam lines when directly concatenating shaded relief map slices, we incorporated overlap regions between adjacent DEM slices (the overlap width was set to 20 pixels) and used alpha blending techniques for processing the overlapping areas during concatenation (Yin et al. Citation2023). Assuming shaded relief maps slice A overlaps with slice B, where A is the left slice and B is the right slice, Vi,j(O), the value of pixel j of row i in the overlap region, can be calculated as follows: (2) Vi,j(O)=njnVi,j(A)+jnVi,j(B),(2) where Vi,j(A) and Vi,j(B) represent the value of pixel j of the row i in the overlap region between slices A and B, respectively and ‘n’ denotes the width of the overlap region. The same method is applied for concatenating slices that overlap vertically.

4. Results and analysis

To further validate the model’s effectiveness, experiments were conducted on five regions within China known for their typical landform features, selected from the ‘Geomorphological Atlas of the People’s Republic of China’ (The Editorial Committee for the Geomorphologic Atlas of the People’s Republic of China Citation2009). Details of each experimental area are listed in . The 90 m resolution DEM data for each experimental area and colour-shaded relief maps generated using different network models based on the DEM data are depicted in . For ease of comparison, the images have been scaled to varying degrees.

Figure 8. Comparison of colour-shaded relief map outcomes across different terrain types and various network models.

Figure 8. Comparison of colour-shaded relief map outcomes across different terrain types and various network models.

Table 1. Test area details.

To facilitate better comparative analysis of the colour-shaded relief maps, we construct four similar networks with the same structure, parameters and weights as the four colour relief hill shading models and train them with 90 m resolution DEM data and manual grey relief hill shading data, respectively. The greyscale-shaded relief maps of different terrain types generated by trained different grey relief shading models are shown in .

Figure 9. Comparison of greyscale-shaded relief map outcomes across different terrain types and various network models.

Figure 9. Comparison of greyscale-shaded relief map outcomes across different terrain types and various network models.

Region 1 is the eastern segment of the Tianshan Mountains in Xinjiang, characterised by steep terrain, deep gorges and numerous perennial snow-capped areas at the mountain summits. Region 2 is situated in the northwestern part of the Hubei Province, characterised by fluvial landforms. As a result of the downcutting and lateral erosion caused by water flow, it has developed an extensive system of gullies and river valleys in hilly and mountainous areas. Region 3 is in the Loess Plateau, displaying distinct gully erosion typical of the loess landform. Region 4 lies in the eastern fold mountain area of the Sichuan Basin in which ridges and valleys are parallel and interspersed. Region 5 is situated at the southwestern edge of the Inner Mongolia Plateau, featuring interconnected sand dunes in the desert region. The four different network models’ generated colour-shaded relief maps depicted in exhibit a fundamental similarity and effectively illustrate the distinct terrain features across various regions. In terms of colour reproduction, shaded relief maps generated by different network models almost perfectly replicate the colour combinations of manually created colour-shaded relief map samples. For instance, bright shades of blue and purple represent snowy mountain ranges, brown hues depict steep ridges and valleys and green shades illustrate flat terrains. Colour gradients allow for the smooth transition between distinct terrain features. Consequently, the overall effect aligns closely with manual colour-shaded relief map samples, indicating that using neural network-based methods for generating colour-shaded relief maps is feasible.

The comparison of colour and greyscale shaded relief maps generated using the same network model shows that the colour-shaded relief maps enhance the map’s readability and better illustrate terrain features. For instance, in plateau regions in which mountain peaks are cloaked in perennial ice and snow, a distinctive high-mountain glacial landscape is shaped, which is characterised by sharp peaks, serrated ridges and expansive glacial valleys. Using colour shading techniques enhances the portrayal of high-mountain glacial terrains. Assigning distinct colours to snow and ice, exposed bedrock and typical mountainous features allows for a representation that captures the cold geographic ambiance using cold-toned colour effects. In areas with fluvial landforms characterised by lower elevation and gentle terrain changes, greyscale relief shading tends to produce a relatively blurry effect with less pronounced variations in brightness. By using colour shading techniques, it becomes feasible to use a more detailed spectrum of colour tones to distinguish such similar terrains, thereby enhancing the visualisation of the topographic landscape.

After zooming in for comparison, it becomes evident that considerable differences persist in the specific performance of different network models. The UNet model may result in the partial loss of certain landform features, particularly in flat areas. shows that the right section of Region 2 lacks minute terrain features. In contrast, the ResUNet model tends to enhance representations of minute terrain features. However, the abundance of terrain detail leads to a complex and cluttered depiction of the overall topographical structure within the region. This is evident in , which is an enlarged view of the central area of Region 2 in , demonstrating an excessive portrayal of intricate terrain details. The CGAN (ResUNet Generator) model exhibits improved relief shading effects compared with the standalone ResUNet model. CGAN generalises fragmented terrain details, reducing the overall complexity of the image, thereby alleviating visual burden, as depicted in . The relief shading effects of the CGAN (UNet Generator) model are optimal, displaying a superior cartographic generalisation, highlighting ridge morphology, thereby enhancing topographic clarity and readability (). These performances align closely with the respective performances of the network models during the generation of greyscale-shaded relief maps, indicating that the CGAN (UNet Generator) model consistently yields superior results, whether generating grey or colour-shaded relief maps.

Figure 10. Comparison of local shaded relief map outcomes across different network models.

Figure 10. Comparison of local shaded relief map outcomes across different network models.

However, the following issues need to be resolved:

  1. Issues with colour: Due to the colour setting, which is mainly based on elevation in manual shaded relief map samples, discrepancies can arise in colours due to the inconsistency in elevation data ranges. Currently, the elevation of sample data ranges between -26–4783 m and the colour scheme was designed according to Switzerland’s terrain and elevations. However, the terrain types, latitudes and elevation ranges in mapped areas often differ from those in the sample region, resulting in colour deviations in shaded relief maps. For example, in Region 1, with an elevation range of 1324 to 6038 m, extensive shades of blue–purple appear in high-altitude areas. However, this type of colouration is typically reserved for areas above the snow line in colour-shaded relief maps, which does not align with the actual conditions.

  2. Issue of insufficiently clearly defined terrain structures: Colour affects the clarity of topography to some extent. For example, as depicted in , when comparing greyscale and colour-shaded relief maps generated by the same network, resolution and region, the relief structures in greyscale-shaded relief maps exhibit clearer topographic features. This might be due to several reasons: first, it is related to the limited richness of current manual colour-shaded relief map sample data; second, compared to greyscale images, colour images have pixel values controlled by more numerical values. In grey images, the greyscale value of each pixel ranges between 0–255 in a single channel, whereas colour-shaded relief maps contain three channels (R, G, B), each ranging between 0–255. Therefore, the principles of colour-shaded relief maps are challenging to acquire because they entail both the nuances of shading gradients and the intricacies of colour design.

Figure 11. Grey and colour relief shading generated by the same network, resolution and area.

Figure 11. Grey and colour relief shading generated by the same network, resolution and area.

5. Optimisation and improvement

In response to the aforementioned issues, optimisation and improvement methods were investigated in this study, using the CGAN (UNet generator) network model, which has yielded the most promising experimental results.

5.1. Colour optimisation method

Given that the elevation range of the mapping area does not correspond to the elevation range of the sample data, resulting in colour setting issues, we conducted an interval experiment. The DEM data of the mapping area was interval processed, and the elevation range was compressed into the sample data range (EquationEq. (3)). Since the elevation of the sample data ranged from −26 to 4783 m, and the minimum elevation of the mapping area was generally above −26 m, we only considered the case where the maximum elevation of the mapping area exceeded the elevation range of the sample data. (3) hmodified=hhminhmaxhmin(Hmaxhmin)+hmin(3) where h represents the elevation value of any grid in the mapped area, hmin represents the minimum elevation value of the mapped area, hmax represents the maximum elevation value of the mapped area, Hmax represents the maximum elevation value of the sample data, that is, 4783 m, and hmodified represents the adjusted elevation value. Through the transformation of EquationEq. (3), the elevation value of each grid in the mapped area was scaled to [hmin,Hmax], corresponding to the elevation range of the sample data.

Map region 1 is a glacial landform with an elevation range of 1324 to 6038 m, and the maximum elevation is much larger than the sample data range. It is, therefore, necessary to carry out interval processing for its elevation. illustrates glacier-shaded relief maps obtained through different processing methods. illustrates the colour-shaded relief results generated by the network shading model without any processing applied to the mapped area data. This outcome predominantly displays most of the mapped area in blue–purple shades, which does not align with the actual conditions, potentially leading to misunderstandings among the readers. demonstrates the results obtained after applying the interval processing proposed in this study to the data of the mapped area before conducting the shading. The results reveal a significantly smaller area above the snow line, which is more consistent with the actual geomorphology and more reliable.

Figure 12. Shaded relief maps of glacial landscapes obtained from different elevation processing methods.

Figure 12. Shaded relief maps of glacial landscapes obtained from different elevation processing methods.

After interval processing, the generated area above the snow line (i.e. the blue–purple area) remained large. Analysis revealed that the average elevation of the snow line in the sample data was 3000 m; thus, the average snow line elevation in the mapped area could be adjusted to match this value. Region 1 represents the Tianshan Mountain range with an average snow line elevation of 4000 m, which can correspond to 3000 m. Thus, the elevation of each grid in Region 1 was adjusted by EquationEq. (4). Subsequently, utilising the network’s relief shading model, the shaded relief map exhibited a closer match to the actual geographical landscape (). Therefore, in the actual map production, if conditions permit, the geographical area can be analysed to set the appropriate snow line elevation correspondence to achieve a good colouring effect. (4) hmodified=30004000×h(4) where h represents the elevation value of any grid in the mapped area and hmodified represents the adjusted elevation value.

Figure 13. Colouration effect of glacial landforms after snow line correspondence.

Figure 13. Colouration effect of glacial landforms after snow line correspondence.

5.2. Method to enhance the clarity of terrain structures

To address the blurriness in shaded relief maps arising from unclearly defined terrain features, we enhanced the topographic features. Ridge and valley lines, as demarcations for variations in terrain undulation (skeleton lines), are vital for manual shaded relief map production. Therefore, we considered integrating ridge and valley lines into the model’s feature elements to improve the sharpness of mountain contours in shaded relief maps. Considering that ridge lines manifest as watershed lines and valley lines depict convergence lines, the extraction of ridge and valley lines involves identifying watershed and convergence lines. Hence, we conducted hydrological analysis on DEM data using ArcGIS software to extract these lines.

To integrate the original DEM data with ridge and valley features for use in shaded relief map production, we experimented with two methods: uniform overlay and elevation-segmented overlay.

5.2.1. Direct overlay of terrain features

Ridge and valley line data were directly superimposed onto the original DEM data using specific numerical values, as demonstrated by EquationEqs. (5) and Equation(6), where ‘m’ and ‘n’ represent adjustment parameters. The adjusted DEM data was then combined with manually produced shaded relief maps for training. The training results are shown in . As ‘m’ and ‘n’ increase from 0 to 2, the terrain structure lines in the generated colour-shaded relief maps become more distinct and well-defined. However, when ‘m’ and ‘n’ further increase, the terrain structure lines in the resulting colour-shaded relief maps begin to lose clarity. (5) hridge_modfied=hridge+m(5) (6) hvalley_modified=hvalleyn(6)

Figure 14. Relief shading results with terrain features directly overlaid with different values.

Figure 14. Relief shading results with terrain features directly overlaid with different values.

5.2.2. Overlaying terrain features based on landforms

Based on the conventional standards for the elevation division of China’s regional landforms (200, 500, 1000, 3500 and 5000 m), they can be categorised into plains, hills, low mountains, medium mountains, high mountains and extremely high mountains. Considering different elevation ranges, we applied distinct weighting parameters to overlay ridge and valley line feature data onto original DEM data. Subsequently, adjusted DEM data were used in training alongside manual shaded relief maps. After conducting comparative experiments, the weight parameter settings illustrated in achieved favourable shaded relief maps effects. The training outcomes are depicted in . By overlaying terrain feature lines on DEMs from various landform types using this approach and using the optimised model to generate colour-shaded relief maps, the shaded relief map effect could be significantly improved compared with that of the original model ().

Figure 15. Relief shading results with terrain features overlaid based on landforms.

Figure 15. Relief shading results with terrain features overlaid based on landforms.

Figure 16. Comparison between original and optimised shaded relief maps for different landform types.

Figure 16. Comparison between original and optimised shaded relief maps for different landform types.

Table 2. Different weight parameters for various ridge heights.

5.3. Integrated application of optimisation methods

First, five types of landforms were overlaid with ridge and valley feature lines; then, snow lines were processed accordingly. Next, the CGAN (UNet Generator) model, trained after the overlay of landform topographic features, was used to generate colour-shaded relief maps. The results are depicted in , showcasing evident improvements in colouration and topographic clarity across all regions. Particularly notable is the exceptional performance in areas with lower terrain such as fluvial landforms.

Figure 17. Comparison between grey and colour relief shading effects for various types of landforms.

Figure 17. Comparison between grey and colour relief shading effects for various types of landforms.

6. Conclusion

To produce colour-shaded relief maps using neural network methods, we used four typical neural network models: UNet, ResUNet, CGAN (UNet generator) and CGAN (ResUNet generator). These models were trained using ‘Swiss style’ manual colour-shaded relief maps and corresponding DEM data. The objective was to train these models to acquire the ‘Swiss style’ colour-shaded relief map technique. After extensive training, all four neural network models could generate ‘Swiss Style’ colour-shaded relief maps based on DEM data from any given area, displaying typical landform features of the region. Compared with greyscale-shaded relief maps, generated colour-shaded relief maps not only portray topographic elevation using colour but can also provide a vivid depiction of the natural surface landscape colouring, thus providing a richer and more authentic representation of terrain features with enhanced readability. When assessing the shaded relief produced by the four network models, the CGAN (UNet generator) model stands out because it produces the most superior colour-shaded relief maps. Its cartographic generalisation of relief and clearer delineation of terrain structures surpasses those of the other three models.

To address the colour issue, we initially processed areas in which elevations exceeded the sample data range by performing interval transformation. Subsequently, we generated colour-shaded relief maps for the mapping region. Despite the enhanced accuracy of modified shaded relief maps in depicting the actual terrain, several discrepancies from the reality remained. Considering the varied average snow line elevations in different regions, we used a snow line correspondence method. This involved aligning the average snow line elevation of the mapped area with that of the sample data. Following this adjustment, the colouration of the shaded relief maps better matched that of actual terrain features.

To tackle the issue of unclearly defined terrain structures, we enhanced the terrain feature representation. Initially, we extracted ridge and valley characteristics from DEM data using ArcGIS software. Subsequently, we superimposed these features onto DEM data using various methods and then trained the model with manual colour-shaded relief maps. The training results revealed that the terrain structures become more clearly defined by applying suitable weighting parameters based on different landform types, leading to an enhanced shaded relief output.

Colour shaded relief can be coloured by elevation or by terrain type (such as loess landform, desert landform) and land cover. Of course, elevation often has a strong relationship with terrain type or land cover. Due to the limitations of the sample, we mainly study the Swiss manual shaded relief maps sample and its corresponding elevation, so the elevation is mainly used to imitate the Swiss colour-shaded relief maps. In addition, in order to experiment with the effect of the deep learning network, we used a variety of landforms, in fact, it is not reasonable to apply the colour scheme designed for Switzerland to some special terrain. In our future research, we intend to expand the dataset by incorporating more manual shaded relief maps samples with various colouration effects to further enrich the colouration styles used in colour shaded relief maps. We also plan to experiment with new neural network models for creating colour shaded relief maps, aiming to enhance their efficacy in producing high-quality shaded relief maps.

Author contributions

Conceptualisation, Chenglin Bian and Shaomei Li; methodology, Chenglin Bian; software, Chenglin Bian and Guangzhi Yin; validation, Jingzhen Ma, Bowei Wen and Linghui Kong; formal analysis, Jingzhen Ma; investigation, Bowei Wen; resources, Shaomei Li; data curation, Linghui Kong; writing—original draft preparation, Chenglin Bian; writing—review and editing, Chenglin Bian, Shaomei Li, Jingzhen Ma and Guangzhi Yin; visualisation, Jingzhen Ma; supervision, Shaomei Li; project administration, Shaomei Li; funding acquisition, Shaomei Li, Jingzhen Ma and Bowei Wen. All authors have read and agreed to the published version of the manuscript.

Acknowledgements

The authors would like to thank the editors and anonymous reviewers for their valuable comments and suggestions.

Data availability statement

The shaded relief images used for the study are copyright by Swisstopo and available at https://www.swisstopo.admin.ch by purchase. The data generated during the study can be obtained from the corresponding author.

Disclosure statement

The authors report there are no competing interests to declare.

Additional information

Funding

This research was funded by the National Natural Science Foundation of China under Grant [numbers 42101454, 42101455].

References

  • Chen W, Zhu Q. 2006. Design of multi-model colour in colored hill-shading for terrain 3D visualization. J Geomatic. 31(6):47–49.
  • Darbyshire JE, Jenny B. 2017. Natural-color maps via coloring of bivariate grid data. Comp Geosci. 106:130–138. doi: 10.1016/j.cageo.2017.06.004.
  • Goodfellow IJ, Pouget-Abadie J, Mirza M, Xu B, Warde-Farley D, Ozair S, Courville A, Bengio Y. 2014. Generative adversarial nets. NIPS.
  • Guo L, Li L, Zhang Y. 2004. Color design of the hillshading map based on the visual image. Geomatic Info Sci Wuhan Univ. 29(6):492–495.
  • Heitzler M, Hurni L. 2020. Cartographic reconstruction of building footprints from historical maps: a study on the Swiss Siegfried map. Trans GIS. 24(2):442–461. doi: 10.1111/tgis.12610.
  • He K, Zhang X, Ren S, et al. 2016. Deep residual learning for image recognition. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), NV, USA: Las Vegas, 2016, pp. 770–778.
  • He K, Zhang X, Ren S, et al. 2016. Identity mappings in deep residual networks [M/OL]. Vol. 05027. http://arxiv.org/abs/1603.
  • He KM, Zhang XY, Ren SQ, et al. 2015. Delving deep into rectifiers: surpassing human-level performance on ImageNet classification [C/OL]. 2015 IEEE International Conference on Computer Vision (ICCV). Santiago, Chile. doi: 10.1109/ICCV.2015.123.
  • Imhof E. 1982. Cartographic relief presentation. Berlin and New York: Walter de Gruyter.
  • Ioffe S, Szegedy C. 2015. Batch normalization: accelerating deep network training by reducing internal covariate shift [M/OL]. http://arxiv.org/abs/1502.03167.
  • Isola P, Zhu JY, Zhou T, et al. 2017. Image-to-image translation with conditional adversarial networks. Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, p. 1125–1134.
  • Jenny B, Heitzler M, Singh D, Farmakis-Serebryakova M, Liu JC, Hurni L. 2021. Cartographic relief shading with neural networks. IEEE Trans Vis Comput Graph. 27(2):1225–1235. doi: 10.1109/TVCG.2020.3030456.
  • Jenny B, Hurni L. 2006. Swiss-style colour relief shading modulated by elevation and by exposure to illumination. Cartograph J. 43(3):198–207. doi: 10.1179/000870406X158164.
  • Kingma DP, Adam BJ. 2017. A method for stochastic optimization [J/OL]. http://arxiv.org/abs/1412.6980.
  • Li S, Yin G, Ma J, Wen B, Zhou Z. 2022. Generation method for shaded relief based on conditional generative adversarial nets. IJGI. 11(7):374. doi: 10.3390/ijgi11070374.
  • Li H, Zhai Z, Tang S. 1999. Making terrain shading map with ARC/INFO. Comp Eng. 25(8):66–68.
  • Mirza M, Osindero S. 2014. Conditional generative adversarial nets. arXiv arXiv:1411.1784.
  • Patterson T, Jenny B. 2011. The development and rationale of cross-blended hypsometric tints. CP. 69(69):31–46. doi: 10.14714/CP69.20.
  • Patterson T, Jenny B. 2014. Evaluating cross-blended hypsometric tints: a user study in the United States, Switzerland, and Germany. CP. 75(75):5–17. doi: 10.14714/CP75.578.
  • Ronneberger O, Fischer P, Brox T. 2015. UNet: convolutional networks for biomedical image segmentation. Munich, Germany: Medical Image Computing and Computer-Assisted Intervention.
  • The Editorial Committee for the Geomorphologic Atlas of the People’s Republic of China. 2009. The geomorphologic atlas of the People’s Republic of China (1:1,000,000). Beijing: science Press.
  • Xiao X, Zhang C, Guo B, et al. 2013. Colored hillshading map based on HSV color model [Application]. Res Comp. 30(12):3824–3827.
  • Yin G, Li S, Ma J, et al. 2023. A hill-shading generation method based on ResUNet. Geomatics and Information Science of Wuhan University. doi: 10.13203/J.whugis20220532.