A GPU-Based Integration Method from Raster Data to a Hexagonal Discrete Global Grid
Abstract
:1. Introduction
2. Related Work
2.1. Encoding Methods of DGGSs
2.2. Integration Methods from Raster Data to DGGSs
2.3. GPU-Based Raster Data Integration and Organization
2.4. Summary of the Current Status of the Research
3. Basic Idea and Overall Design
- (1)
- Structural Design: Given the distribution characteristics of a hexagonal DGGS on an icosahedron, the basic rhombic surfaces of the icosahedron are used to define a kind of data structure to organize hexagonal cells so as to achieve the organization of hexagons by rhombuses.
- (2)
- Organization and Encoding Method: The rhombus-based hexagonal DGGS data organization scheme is then defined based on the constructed data structure, and the rhombus data as well as the hexagonal cells inside the rhombus are encoded as shown in Figure 2, where the hexagonal DGGS data are organized in a way that approximates the rhombic tiles of the rhombus, and the codes of the hexagonal cells are encoded in a relative coordinate system with respect to the tile codes of the rhombus.
- (3)
- Scheduling Strategy and Resampling Algorithm: The geospatial extent of the rhombic tiles based on the level of hexagonal DGGS data and the encoding of the rhombic tiles is determined, and then the raster data are scheduled in the corresponding spatial extent based on the spatial extent of the rhombic tiles. After completing the scheduling, the rhombic tile data and the raster data corresponding to the spatial range are passed into the GPU, where the decoding of tile data is performed, and the raster data are resampled into the tile data.
- (4)
- Pipeline Scheduling: Finally, in order to optimize the performance of the CPU and GPU, a parallel computing architecture of the GPU is designed to reduce its delay of the GPU in data reading and computation, and the operations in the whole process are divided into IO-intensive and compute-intensive parts according to the type of application, with IO-intensive applications executed in the CPU and compute-intensive applications executed in the GPU, so as to give full play to the parallel computing performance of the GPU, which is specifically used to achieve an efficient GPU-based conversion algorithm from raster data to hexagonal DGGS data.
4. Methodology
4.1. Representation of a Hexagonal DGGS in the GPU
4.1.1. The Hexagonal Organization Method Based on Rhombic Tiles
4.1.2. Encoding of Hexagonal Cells and Rhombic Tiles
- Step1: Determine whether the grid level is greater than the threshold .
- Step2: If the grid level is greater than , skip to step 4, and, if the grid level is less than or equal to , the rhombic tiles are encoded without the space-filling curve code . They will simply be encoded as = · L.
- Step3: The hexagonal cells inside the rhombic tiles are global coordinates when the grid level is less than the threshold , and = .
- Step4: If the grid level is greater than , based on the tile code = ·L·S, the encoding range (, ) and (, ) of the hexagonal cells inside the rhombic tile is first calculated using Equations (2) and (3). Then, the encoding of the hexagonal cells with respect to the coordinate values of the rhombic tile origin is calculated: = , = , = .
- Step5: Repeat the above steps until all the encodings of the hexagonal cells have been converted to the encodings relative to the rhombic tile. Output the list of converted encodings, i.e.,
4.1.3. Decoding of Hexagonal DGGS Data in the GPU
- Step1: Generate a list of encodings in the CPU for the rhombic tiles whose spatial extent intersects the target spatial extent space, then traverse the list and pass the encodings to the GPU.
- Step2: After the GPU receives the codes, it first decodes the rhombic tile to obtain the number of the underlying rhombic surface where the rhombic tile is located and carries out some calculations to obtain the relative coordinate ranges and of the hexagonal cells inside the tile.
- Step3: Based on the calculated basic rhombic surface numbers and the relative coordinate ranges, the hexagonal cells inside the rhombic tiles are decoded to obtain the q2di codes of the hexagonal cells.
- Step4: The q2di codes are converted to geospatial coordinates, and the next loop is performed until all hexagonal cell codes have been converted to geospatial coordinates. Then, the next pieces of rhombic tile data are decoded, until all tile data have been decoded, as shown in Figure 7. A pseudo-code that describes the process of decoding is given in Figure A2.
4.2. Raster Data Scheduling and Resampling in the GPU
4.2.1. The Scheduling Strategy for Raster Data in the GPU
4.2.2. Raster Data Resampling Based on the Hexagonal Grid
4.3. Asynchronous Collaboration Method of the CPU and the GPU
- Step1: After hexagonal DGGS data are transferred from the CPU to the GPU in the form of a texture, they are first decoded to obtain their spatial extent as well as the geographic coordinates of the hexagonal cells. Whenever the decoding of tile data is completed, it is saved in the tile data-decoding buffer, and a signal is sent to activate the thread used for raster scheduling.
- Step2: The raster-scheduling thread first traverses the tile data-decoding buffer, and, whenever it obtains tile data, it schedules the raster data in the corresponding spatial range, saves the completed raster data and tile data in the raster-resampling buffer, and sends a signal to activate the raster-resampling thread at the beginning of the thread.
- Step3: The raster-resampling thread continuously checks the raster data buffer for unfinished raster data and tile data and then resamples the raster data and assigns values to the tile data after obtaining the data. After the assignment is completed, the raster-resampling thread saves the tile data to the data output buffer and sends a signal to activate the data output thread at the beginning of the thread.
- Step4: The data output thread continuously checks the raster-resampling buffer and sets the threshold. When the amount of data in the buffer reaches the threshold, all the tiles in the buffer will be output from the GPU to the disk to avoid the performance loss caused by multiple transfers.
5. Results
5.1. Integration Accuracy of the Algorithm
5.2. Integration Efficiency of the Algorithm
5.2.1. Scheduling Schemes for the Raster Data and the Tile Data
5.2.2. Thread Combination in the GPU
5.2.3. Decoding Efficiency Comparison between the CPU and the GPU
5.2.4. The Overall Efficiency
6. Discussion
6.1. Encoding and Decoding Methods
6.2. Impact of the Coding Method Proposed in this Paper on Bandwidth and Raster Integration Efficiency
6.3. Scalability of the Proposed Method
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Appendix A
References
- Sahr, K.; White, D.; Kimerling, A.J. Geodesic Discrete Global Grid Systems. Cartogr. Geogr. Inf. Sci. 2013, 30, 121–134. [Google Scholar] [CrossRef]
- Goodchild, M.F. Discrete Global Grids: Retrospect and prospect. Geogr. Geo-Inf. Sci. 2012, 28, 1–6. [Google Scholar]
- Zhou, C.; Ou, Y.; Ma, T. Progresses of geographical grid systems researches. Prog. Geogr. 2009, 28, 657–662. (In Chinese) [Google Scholar]
- Wang, L.; Ai, T.; Burghardt, D.; Shen, Y.; Yang, M. A hexagon-based method for polygon generalization using morphological operators. Int. J. Geogr. Inf. Sci. 2023, 37, 88–117. [Google Scholar] [CrossRef]
- Wang, R.; Ben, J.; Zhou, J.; Zheng, M. Indexing Mixed Aperture Icosahedral Hexagonal Discrete Global Grid Systems. Int. J. Geo-Inf. 2020, 9, 171. [Google Scholar] [CrossRef]
- Li, M.; McGrath, H.; Stefanakis, E. Multi-resolution topographic analysis in hexagonal Discrete Global Grid Systems. Int. J. Appl. Earth Obs. Geoinf. 2022, 113, 102985. [Google Scholar] [CrossRef]
- Rawson, A.; Sabeur, Z.; Brito, M. Intelligent geospatial maritime risk analytics using the Discrete Global Grid System. Big Earth Data 2021, 6, 295–322. [Google Scholar] [CrossRef]
- Ji, C.; Li, Y.; Qiu, W.; Awada, U.; Li, K. Big Data Processing in Cloud Computing Environments. In Proceedings of the 2012 International Symposium on Pervasive Systems. Algorithms, and Networks, I-SPAN 2012, San Marcos, TA, USA, 13–15 December 2012; pp. 17–23. [Google Scholar]
- Keckler, S.W.; Dally, W.J.; Khailany, B.; Garland, M.; Glasco, D. GPUs and the future of parallel computing. IEEE Micro 2011, 31, 7–17. [Google Scholar] [CrossRef]
- Stojanovic, N.; Stojanovic, D. High performance processing and analysis of geospatial data using CUDA on GPU. Adv. Electr. Comput. Eng. 2014, 14, 109–114. [Google Scholar] [CrossRef]
- Mahdavi-Amiri, A.; Alderson, T.; Samavati, F. A Survey of Digital Earth. Comput. Graph. 2015, 53, 96–117. [Google Scholar] [CrossRef]
- Tong, X.; Ben, J.; Qing, Z.; Zhang, Y. The hexagonal discrete global grid system appropriate for remote sensing spatial data. In Proceedings of the Geoinformatics 2008 and Joint Conference on GIS and Built Environment: Advanced Spatial Data Models and Analyses, Guangzhou, China, 10 November 2008. [Google Scholar]
- Vince, A.; Zheng, X. Arithmetic and Fourier transform for the PYXIS multi-resolution digital Earth model. Int. J. Digit. Earth 2009, 2, 59–79. [Google Scholar] [CrossRef]
- White, D. Global grids from recursive diamond subdivisions of the surface of an octahedron or icosahedrons. Environ. Monit. Assess. 2000, 64, 93–103. [Google Scholar] [CrossRef]
- Tong, X.; Ben, J.; Wang, Y.; Zhang, Y.; Pei, T. Efficient encoding and spatial operation scheme for aperture 4 hexagonal discrete global grid system. Int. J. Geogr. Inf. Sci. 2013, 27, 898–921. [Google Scholar] [CrossRef]
- Ben, J.; Li, Y.; Zhou, C.; Wang, R.; Du, L. Algebraic encoding scheme for aperture 3 hexagonal discrete global grid system. Sci. China Earth Sci. 2018, 61, 215–227. [Google Scholar] [CrossRef]
- Mahdavi-Amiri, A.; Alderson, Y.; Samavati, F. Geospatial Data Organization Methods with Emphasis on Aperture-3 Hexagonal Discrete Global Grid Systems. Cartographica 2019, 54, 30–50. [Google Scholar] [CrossRef]
- Mahdavi-Amiri, A.; Harrison, E.; Samavati, F. Hierarchical grid conversion. Comput.-Aided Des. 2016, 79, 12–26. [Google Scholar] [CrossRef]
- Wang, J.; Shi, Y.; Qin, Z.; Chen, Y.; Cao, Z. A three-dimensional buffer analysis method based on the 3D Discrete Global Grid System. Int. J. Geo-Inf. 2021, 10, 520. [Google Scholar] [CrossRef]
- Mahdavi-Amiri, A.; Harrison, E.; Samavati, F. Hexagonal Connectivity Maps for Digital Earth. Int. J. Digit. Earth 2014, 8, 750–769. [Google Scholar] [CrossRef]
- Tan, L.; Wan, G.; Li, F.; Chen, X.; Du, W. GPU based contouring method on grid DEM data. Comput. Geosci. 2017, 105, 129–138. [Google Scholar] [CrossRef]
- Lubbe, R.; Xu, W.J.; Wilke, D.N.; Pizette, P.; Govender, N. Analysis of parallel spatial partitioning algorithms for GPU based DEM. Comput. Geotech. 2020, 125, 103708. [Google Scholar] [CrossRef]
- Kamewar, A.S. Processing geospatial images using GPU. In Proceedings of the 2017 International Conference on Emerging Trends & Innovation in ICT (ICEI), Pune, India, 3–5 February 2017; pp. 27–32. [Google Scholar]
- Lu, M.; Wang, J.Y.; Lu, G.; Tao, W.D.; Wang, J.C. Research of raster data spatial analysis under CPU/GPU heterogeneous hybrid parallel environment-take terrain factors analysis as an example. Comput. Eng. Appl. 2017, 53, 172–177. [Google Scholar]
- Lin, B. Research on the parallel computing and novel methodology of marine data visualization linear integral convolution algorithm based on GPU. In Proceedings of the 2015 Conference on Informatization in Education, Management and Business (IEMB-15), Guangzhou, China, 12–13 September 2015; Volume 20, pp. 96–101. [Google Scholar]
- Stojanović, N.; Stojanović, D. Performance Improvement of viewshed analysis using GPU. In Proceedings of the International Conference on Telecommunications in Modern Satellite, Cable and Broadcasting Services, Nis, Serbia, 16–19 October 2013; Volume 1, pp. 397–400. [Google Scholar]
- Sherlock, M.J.; Hasan, F.; Samavati, F. Interactive data styling and multifocal visualization for a multigrid web-based Digital Earth. Int. J. Digit. Earth 2020, 14, 288–310. [Google Scholar] [CrossRef]
- Yao, X.; Mokbel, M.F.; Ye, S.; Li, G.; Alarabi, L.; Eldawy, A.; Zhao, Z.; Zhao, L.; Zhu, D. LandQv2: A MapReduce-Based System for Processing Arable Land Quality Big Data. ISPRS Int. J. Geo-Inf. 2018, 7, 271. [Google Scholar] [CrossRef]
- STCL (discreteglobalgrids.org). Available online: https://www.discreteglobalgrids.org/software/ (accessed on 3 June 2024).
- Stough, T.; Cressie, N.; Kang, E.L.; Michalak, A.M.; Sahr, K. Spatial analysis and visualization of global data on multi resolution hexagonal grids. Jpn. J. Stat. Data Sci. 2020, 3, 107–128. [Google Scholar] [CrossRef]
- Snyder, J.P. An Equal-area Map Projection for Polyhedral Globes. Cartographica 1992, 29, 10–21. [Google Scholar] [CrossRef]
- Middleton, L.; Sivaswamy, J. Hexagonal Image Processing: A Practical Approach; Springer Science & Business Media: Berlin/Heidelberg, Germany, 2006. [Google Scholar]
First Character of the Code | Second Character of the Code | Subsequent Bytes of the Code |
---|---|---|
Decimal form of the basic rhombic surface numbering: 0–9, N, S. | Level of the grid, using thirty-sixth decimal representation. | Unique identification of the binary code using space-filling curves. |
The Output of Tiles | The Scheduling of Raster Data | The Decoding of Tiles | The Resampling of Raster Data |
---|---|---|---|
Location | Space Range | Number of Hexagonal Cells | Average Error of Grid Integration (m) | Max Error of Grid Integration (m) | Min Error of Grid Integration (m) |
---|---|---|---|---|---|
Great Canyon of Yarlung Tsangpo | 30–35°N, 90–95°E | 104,857,600 | 1.068 | 120.530 | 0.412 |
Dead Sea | 30–32°N, 36–36°E | 8,388,608 | 0.859 | 0.747 | 0.316 |
Mount Everest | 27–28°N, 86–87°E | 4,194,304 | 1.481 | 209.548 | 0.383 |
Whole Earth | 0°N–90°S, 0°E–180°W | 687,194,767,362 | 0.257 | 209.548 | 0.001 |
Coding Method | A Large Number of Logical Judgments | Requires Calculation Table | Requires Multiple Decodes |
---|---|---|---|
PYXIS | √ | √ | × |
HQBS | × | √ | × |
Hierarchical grid conversion | × | × | √ |
Proposed in this paper | × | × | × |
Topological Type | Level | Number of Cells | Time Consumption (s) |
---|---|---|---|
Triangle | 17 | 687,194,767,360 | 158.81 |
Rhombus | 18 | 687,194,767,360 | 134.57 |
Hexagon | 18 | 687,194,767,362 | 143.06 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zheng, S.; Zhou, L.; Lu, C.; Lv, G. A GPU-Based Integration Method from Raster Data to a Hexagonal Discrete Global Grid. Remote Sens. 2024, 16, 2022. https://doi.org/10.3390/rs16112022
Zheng S, Zhou L, Lu C, Lv G. A GPU-Based Integration Method from Raster Data to a Hexagonal Discrete Global Grid. Remote Sensing. 2024; 16(11):2022. https://doi.org/10.3390/rs16112022
Chicago/Turabian StyleZheng, Senyuan, Liangchen Zhou, Chengshuai Lu, and Guonian Lv. 2024. "A GPU-Based Integration Method from Raster Data to a Hexagonal Discrete Global Grid" Remote Sensing 16, no. 11: 2022. https://doi.org/10.3390/rs16112022
APA StyleZheng, S., Zhou, L., Lu, C., & Lv, G. (2024). A GPU-Based Integration Method from Raster Data to a Hexagonal Discrete Global Grid. Remote Sensing, 16(11), 2022. https://doi.org/10.3390/rs16112022