Efficient Generation of Gridded Ship Emission Inventories from Massive AIS Data Using Spatial Hashing
Abstract
1. Introduction
2. Materials and Methods
2.1. Data Preprocessing
2.2. Emission Calculation Model (STEAM)
2.3. H-Grid: A High-Throughput Spatial Hashing Algorithm
- Step 1: Coordinate Discretization
- Step 2: Hash Key Generation
2.4. Benchmark Methodologies
2.4.1. Traditional Geometric Method
2.4.2. Spatial Indexing Method
- Node Examination: The algorithm starts at the root node and examines each of its entries. In an internal (non-leaf) node, each entry is a Minimum Bounding Rectangle (MBR) that spatially encloses all data within the child node it points to.
- Recursive Pruning and Traversal: For each entry, a spatial overlap test is performed between its MBR and the query region. If there is no overlap, the entire branch of the tree represented by this entry is pruned and completely ignored by the search. This is the key to the algorithm’s efficiency. If there is an overlap, the algorithm recursively descends to the corresponding child node and repeats the process from Step 1.
- Data Retrieval: This recursive process continues until a leaf node is reached. At the leaf level, the entries are the actual data objects, not bounding boxes. The algorithm then tests each data object against the query region and adds any that overlap to the final result set.
3. Results
3.1. Experimental Setup and Data
3.2. Data Transformation and Gridding Results
4. Discussion
4.1. The Computational Challenge of Skewed Spatial Data
4.2. Micro-Level Performance Analysis in High-Density Grids
- The Traditional Geometric Method: This approach, which relies on a point-in-polygon test for each data point, exhibits a near-linear increase in processing time. Its execution time scales directly with the number of points n, confirming its O(n) complexity and rendering it exceptionally inefficient for the hotspot grids identified in our dataset.
- The PostGIS Method: The database method demonstrates better scalability initially due to its use of spatial indexing. However, as discussed in Section 4.1, the index’s utility diminishes once the target grid cell is located. The database must still process all candidate points within that cell, leading to a significant, albeit sub-linear, increase in query time. The performance drop at 100,000 points and beyond reflects the inherent overhead of the database engine’s query planner, execution context, and memory management when handling a large result set within a single query operation.
- The H-Grid Method: In stark contrast, the H-Grid algorithm maintains exceptional performance, showing only a marginal increase in processing time even when processing one million points. This is because its core operation—transforming a coordinate pair (lon, lat) into a grid ID via simple arithmetic and bitwise operations—has a constant time complexity of O(1) per point. The measured increase in milliseconds is primarily due to the incidental overhead of iterating through the larger dataset in memory, not the gridding logic itself. The results unequivocally demonstrate that H-Grid’s core performance is fundamentally decoupled from the spatial density of the data.
4.3. Macro-Benchmark: End-to-End Scaling at 100 Million Records
4.4. Micro-Mechanism Validation: Skew Robustness and Local Aggregation
- Experiment A: Skew Robustness
- Experiment B: Efficacy of Local Aggregation
4.5. Environmental Interpretation and Policy Relevance of Emission Hotspots
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Asariotis, R.; Assaf, M.; Benamara, H.; Hoffmann, J.; Premti, A.; Rodríguez, L.; Weller, M.; Youssef, F. Review of Maritime Transport 2018; UNCTAD: Geneva, Switzerland, 2018. [Google Scholar]
- Mao, X.L.; Meng, Z.H.; Comer, B.; Decker, T. Greenhouse Gas Emissions and Air Pollution from Global Shipping, 2016–2023. The Internationa Council on Clean Transportation. 2025. Available online: https://globalmaritimehub.com/report-presentation/greenhouse-gas-emissions-and-air-pollution-from-global-shipping-2016-2023 (accessed on 4 November 2025).
- Feng, X.; Ma, Y.P.; Lin, H.P.; Fu, T.M.; Zhang, Y.; Wang, X.L.; Zhang, A.X.; Yuan, Y.P.; Han, Z.M.; Mao, J.B.; et al. Impacts of Ship Emissions on Air Quality in Southern China: Opportunistic Insights from the Abrupt Emission Changes in Early 2020. Environ. Sci. Technol. 2023, 57, 16999–17010. [Google Scholar] [CrossRef]
- Saxe, H.; Larsen, T. Air pollution from ships in three Danish ports. Atmos. Environ. 2004, 38, 4057–4067. [Google Scholar] [CrossRef]
- Song, S. Ship emissions inventory, social cost and eco-efficiency in Shanghai Yangshan port. Atmos. Environ. 2014, 82, 288–297. [Google Scholar] [CrossRef]
- Smyth, T.; Deakin, A.; Pewter, J.; Snee, D.; Proud, R.; Verbeek, R.; Verhagen, V.; Paschinger, P.; Bell, T.; Fishwick, J.; et al. Faster, Better, Cheaper: Solutions to the Atmospheric Shipping Emission Compliance and Attribution Conundrum. Atmosphere 2023, 14, 500. [Google Scholar] [CrossRef]
- Schwarzkopf, D.A.; Petrik, R.; Matthias, V.; Quante, M.; Yu, G.Y.; Zhang, Y. Comparison of the Impact of Ship Emissions in Northern Europe and Eastern China. Atmosphere 2022, 13, 894. [Google Scholar] [CrossRef]
- Merico, E.; Cesari, D.; Gregoris, E.; Gambaro, A.; Cordella, M.; Contini, D. Shipping and air quality in Italian port cities: State-of-the-art analysis of available results of estimated impacts. Atmosphere 2021, 12, 536. [Google Scholar] [CrossRef]
- Dong, X.Y.; Zhang, Y.; Yu, G.Y.; Xiong, Y.Q.; Han, Z.M.; Huo, J.T.; Huang, C.; Kan, H.D.; Zheng, M.; Ning, Z.; et al. Environmental and health impacts of reduced PM2.5 and trace metals from ship emissions under low-sulfur fuel oil policy in Shanghai, China. Environ. Pollut. 2025, 377, 126409. [Google Scholar] [CrossRef]
- IMO MARPOL Annex VI. Regulations for the prevention of air pollution from ships. Resolut. MEPC 2005, 176, 58. [Google Scholar]
- Zhai, J.H.; Yu, G.Y.; Zhang, J.Y.; Shi, S.; Yuan, Y.P.; Jiang, S.L.; Xing, C.B.; Cai, B.H.; Zeng, Y.L.; Wang, Y.X.; et al. Impact of Ship Emissions on Air Quality in the Greater Bay Area in China under the Latest Global Marine Fuel Regulation. Environ. Sci. Technol. 2023, 57, 12341–12350. [Google Scholar] [CrossRef]
- Kim, Y.; Moon, N.; Chung, Y.; Seo, J. Impact of IMO Sulfur Regulations on Air Quality in Busan, Republic of Korea. Atmosphere 2022, 13, 1631. [Google Scholar] [CrossRef]
- Wang, Z.; Ma, Q.C.; Zhang, Z.D.; Li, Z.C.; Qin, C.H.; Chen, J.F.; Peng, C.S. A Study on Monitoring and Supervision of Ship Nitrogen-Oxide Emissions and Fuel-Sulfur-Content Compliance. Atmosphere 2023, 14, 175. [Google Scholar] [CrossRef]
- Mocerino, L.; Murena, F.; Quaranta, F.; Toscano, D. Port Emissions Assessment: Integrating Emission Measurements and AIS Data for Comprehensive Analysis. Atmosphere 2024, 15, 446. [Google Scholar] [CrossRef]
- Han, J.; Peng, D.; Wang, Y.J.; Fu, M.L. Comparison of Inland Ship Emission Results from a Real-World Test and an AIS-Based Model. Atmosphere 2021, 12, 1611. [Google Scholar]
- Liu, Z.M.; Lu, X.H.; Feng, J.L.; Fan, Q.Z.; Zhang, Y.; Yang, X. Influence of Ship Emissions on Urban Air Quality: A Comprehensive Study Using Highly Time-Resolved Online Measurements and Numerical Simulation in Shanghai. Environ. Sci. Technol. 2017, 51, 202–211. [Google Scholar] [CrossRef]
- Marti, S.; Vendela, S.; Axel, H.; Holm, H.; Finnsgård, C. AIS in maritime research. Mar. Policy 2019, 106, 103520. [Google Scholar] [CrossRef]
- Kim, H.Y.; Bui, H.D.; Hong, S.S. Estimation of Air Pollution from Ships in Port Area: A Case Study of Yeosu and Gwangyang Ports in Korea. Atmosphere 2022, 13, 1890. [Google Scholar] [CrossRef]
- Zhu, D.Y.; Huang, M.; Lin, Q.F.; Wang, Y.Y.; Li, S.; Cheng, C.Q. Efficient management of ubiquitous location information using geospatial grid region name. Int. J. Appl. Earth Obs. Geoinf. 2025, 137, 104400. [Google Scholar] [CrossRef]
- Ilba, M. Parallel algorithm for improving the performance of spatial queries in SQL: The use cases of SQLite/SpatiaLite and PostgreSQL/PostGIS databases. Comput. Geosci. 2021, 155, 104840. [Google Scholar] [CrossRef]
- Khan, J.; Kakosimosb, K.; Raaschou-Nielsen, O. Development and performance evaluation of new AirGIS—A GIS based air pollution and human exposure modelling system. Atmos. Environ. 2019, 198, 102–121. [Google Scholar] [CrossRef]
- Markakis, K.; Poupkou, A.; Melas, D.; Zerefos, C. A GIS based anthropogenic PM10 emission inventory for Greece. Atmos. Pollut. Res. 2010, 1, 71–81. [Google Scholar] [CrossRef]
- Yang, X.Y.; Guan, X.F.; Pang, Z.X.; Kui, X.; Wu, H.Y. GridMesa: A NoSQL-based big spatial data management system with an adaptive grid approximation model. Future Gener. Comput. Syst. 2024, 155, 324–339. [Google Scholar] [CrossRef]
- Goodchild, M.F.; Hill, L.L. Introduction to digital gazetteer research. Int. J. Geogr. Inf. Sci. 2008, 22, 1039–1044. [Google Scholar] [CrossRef]
- Mahdavi-Amiri, A.; Alderson, T.; Samavati, F. A survey of digital earth. Comput. Graph 2015, 53, 95–117. [Google Scholar] [CrossRef]
- Masaoud, E.; Stryhn, H. A simulation study to assess the impact missing values on the performance of different statistical methods for analysis of binary repeated measures data with an additional hierarchical structure. J. Stat. Res. 2023, 57, 35–67. [Google Scholar] [CrossRef]
- Chen, R.C.; Liu, C.; Xue, Q.Q.; Rui, R. Research on Fine Ship Sewage Generation Inventory Based on AIS Data and Application on Yangtze River. Water 2022, 14, 3109. [Google Scholar] [CrossRef]
- Li, X.; Zhang, Z.; Ma, B.; Zheng, D.Y.; Yang, W.T.; Yan, Y.W. High spatio-temporal resolution estimation of urban road traffic carbon dioxide emissions and analysis of influencing factors using GPS trajectory data. Environ. Monit. Assess. 2025, 197, 665. [Google Scholar] [CrossRef] [PubMed]
- Maasakkers, J.D.; McDuffie, E.E.; Sulprizio, M.P.; Chen, C.; Schultz, M.; Brunelle, L.; Thrush, R.; Steller, J.; Sherry, C.; Daniel, J.; et al. A Gridded Inventory of Annual 2012–2018 U.S. Anthropogenic Methane Emissions. Environ. Sci. Technol. 2023, 57, 16276–16288. [Google Scholar] [CrossRef]
- Yu, K.A.; Li, M.; Harkins, C.; He, J.; Zhu, Q.D.; Verreyken, B.; Schwantes, R.H.; Cohen, R.C.; McDonald, B.C.; Harley, R.A. Improved Spatial Resolution in Modeling of Nitrogen Oxide Concentrations in the Los Angeles Basin. Environ. Sci. Technol. 2023, 57, 20689–20698. [Google Scholar] [CrossRef]
- Chen, Y.; Lu, Z.; Zheng, Y.; Li, P.; Luo, W.; Kang, S. Deep hashing with mutual information: A comprehensive strategy for image retrieval. Expert Syst. Appl. 2025, 264, 125880. [Google Scholar] [CrossRef]
- Zamora, J.; Mendoza, M.; Allende, H. Hashing-based clustering in high dimensional data. Expert Syst. Appl. 2016, 62, 202–211. [Google Scholar] [CrossRef]
- Xu, D.H.; Deng, Y.W.; Xin, P.; Zhou, X.Q. Path planning for large ships in inland waterways considering risk assessment of AIS data. Ocean Eng. 2025, 342, 122792. [Google Scholar] [CrossRef]
- Sun, Z.C.; Xu, S.D.; Jiang, J. Spatial-temporal characteristics of ship carbon emission based on AIS data. Ocean Coast. Manag. 2025, 265, 107629. [Google Scholar] [CrossRef]
- Jalkanen, J.P.; Brink, A.; Kalli, J.; Pettersson, H.; Kukkonen, J.; Stipa, T. A model-ling system for the exhaust emissions of marine trafficand its application in the Baltic Sea area. Atmos. Chem. Phys. 2009, 9, 9209–9223. [Google Scholar] [CrossRef]
- Jalkanen, J.P.; Johansson, L.; Kukkanen, J.; Brink, A.; Kalli, J.; Stipa, T. Extension of an assessment model of ship traffic exhaust emissions for particulate matter and carbon monoxide. Atmos. Chem. Phys. 2012, 12, 2641–2659. [Google Scholar] [CrossRef]
- Shu, Y.Q.; Hu, A.Y.; Zheng, Y.Z.; Gan, L.X.; Xiao, G.N.; Zhou, C.H.; Song, L. Evaluation of ship emission intensity and the inaccuracy of exhaust emission estimation model. Ocean Eng. 2023, 287, 115723. [Google Scholar] [CrossRef]
- Weng, J.; Shi, K.; Gan, X.; Li, G.R.; Huang, Z. Ship emission estimation with high spatial-temporal resolution in the Yangtze River estuary using AIS data. J. Clean. Prod. 2020, 248, 119297. [Google Scholar] [CrossRef]
- Nunes, R.A.O.; Alvim-Ferraz, M.C.M.; Sousa, S.I.V. Assessment of shipping emissions on four ports of Portugal. Environ. Pollut. 2017, 231 Pt 2, 1370–1379. [Google Scholar] [CrossRef]
- Vutukuru, S.; Dabdub, D. Modeling the effects of ship emissions on coastal air quality: A case study of southern California. Atmos. Environ. 2008, 42, 3751–3764. [Google Scholar] [CrossRef]
- Wan, Z.; Ji, S.; Liu, Y.; Zhang, Q.; Chen, J.H.; Wang, Q. Shipping emission inventories in China’s Bohai bay, Yangtze River Delta, and Pearl River Delta in 2018. Mar. Pollut. Bull. 2020, 151, 110882. [Google Scholar] [CrossRef]
- Topic, T.; Murphy, A.J.; Pazouki, K.; Norman, R. Assessment of ship emissions in coastal waters using spatial projections of ship tracks, ship voyage and engine specification data. Clean. Eng. Technol. 2021, 2, 100089. [Google Scholar] [CrossRef]
- Chen, D.; Zhao, Y.; Nelson, P.; Li, Y.; Wang, X.T.; Zhou, Y.; Lang, J.L.; Guo, X.R. Estimating ship emissions based on AIS data for port of Tianjin, China. Atmos. Environ. 2016, 145, 10–18. [Google Scholar] [CrossRef]
- Zhou, M.; Jiang, W.; Gao, W.; Gao, X.M.; Ma, M.C.; Ma, X. Anthropogenic emission inventory of multiple air pollutants and their spatiotemporal variations in 2017 for the Shandong Province, China. Environ. Pollut. 2021, 288, 117666. [Google Scholar] [CrossRef]
- Zhao, J.; Zhang, Y.; Patton, A.P.; Ma, W.C.; Kan, H.D.; Wu, L.B.; Fung, F.; Wang, S.X.; Ding, D.; Walker, K. Projection of ship emissions and their impact on air quality in 2030 in Yangtze River delta, China. Environ. Pollut. 2020, 263 Pt A, 114643. [Google Scholar] [CrossRef]
- Nguyen, P.N.; Woo, S.-H.; Kim, H. Ship emissions in hotelling phase and loading/unloading in Southeast Asia ports. Transp. Res. Part D Transp. Environ. 2022, 105, 103223. [Google Scholar] [CrossRef]
- Xia, H.L.; Xue, F. A Novel Query Method for Spatial Database Based on Improved K-Nearest Neighbor Algorithm. Int. J. Decis. Support Syst. Technol. 2024, 16, 1–15. [Google Scholar] [CrossRef]
- Islam, M.S.; Shen, B.J.; Wang, C.; Taniar, D.; Wang, J.H. Efficient processing of reverse nearest neighborhood queries in spatial databases. Inf. Syst. 2020, 92, 101530. [Google Scholar] [CrossRef]
- Liu, M.M.; Zhang, M.K. Role of kmax mapping image annotation method combined with R-tree index in civil engineering supervision. Syst. Soft Comput. 2025, 7, 200319. [Google Scholar] [CrossRef]
- Yang, Y.; Bai, P.; Ge, N.; Gao, Z.P.; Qiu, X.S. LAZY R-tree: The R-tree with lazy splitting algorithm. J. Inf. Sci. 2020, 46, 243–257. [Google Scholar] [CrossRef]








| Ship Status | Condition | Assumed Load Factor (LF) (%) | Typical Activity |
|---|---|---|---|
| Berthing | Speed < 1 knot | −2–5 | At dock, loading/unloading, hoteling |
| Mooring | 1 knot ≤ Speed ≤ 3 knots | 5–15 | At anchorage, slow movement in designated areas |
| Port Maneuvering | Speed > 3 knots AND LF < 20% | <20 | Entering/leaving port, navigating channels, docking |
| Low-Speed Navigation | 20% ≤ LF < 65% | 20–65 | Coastal shipping, slow steaming, navigating congested waters |
| Cruise | LF ≥ 65% | ≥65 | Open sea transit at or near service speed |
| Pollutant (s) | Engine Type/IMO Tier | Fuel Sulphur Content (%) | Emission Factor (g/kW·h) |
|---|---|---|---|
| NOx | Slow Speed Diesel/Tier I | - | 17 |
| Slow Speed Diesel/Tier II | - | 14.4 | |
| SOx | All Engines | 0.5% (Global Cap) | 1.8 |
| All Engines | 0.1% (ECA) | 0.36 | |
| PM2.5 | Medium Speed Diesel | 0.5% (Global Cap) | 0.95 |
| Field Name | Example Value | Description |
|---|---|---|
| userId | 356490000 | Vessel’s unique identifier (MMSI) |
| currTime | 20 May 2024 14:22 | Record timestamp |
| longitude | 123.13965 | Geographical longitude in degrees |
| latitude | 37.581733 | Geographical latitude in degrees |
| sog | 14.5 | Speed Over Ground (knots) |
| cog | 307 | Course Over Ground (degrees) |
| naviState | 0 | Navigational Status (‘Under way using engine’) |
| shiptypekey | 1 | Vessel Type (‘Cargo Ship’) |
| Raw AIS Data | |||||
|---|---|---|---|---|---|
| userId | curr_time | longitude | latitude | sog_knots | … |
| 2.02 × 108 | 20 May 2024 10:00 | 122.1512 | 35.8225 | 12.1 | … |
| 2.02 × 108 | 20 May 2024 10:05 | 122.1734 | 35.8451 | 12.2 | … |
| 2.02 × 108 | 20 May 2024 11:30 | 122.1548 | 35.8259 | 10.5 | … |
| 2.02 × 108 | 20 May 2024 11:35 | 122.1791 | 35.8493 | 10.6 | … |
| Calculated Emissions | Gridding | ||||
| so2_total | nox_total | pm2.5_total | … | … | grid_id |
| 1.80 × 10−1 | 1.95 | 1.17 × 10−1 | … | … | 12215_3582 |
| 1.82 × 10−1 | 1.97 | 1.18 × 10−1 | … | … | 12217_3584 |
| 1.50 × 10−1 | 1.65 | 9.80 × 10−2 | … | … | 12215_3582 |
| 1.51 × 10−1 | 1.66 | 9.90 × 10−2 | … | … | 12217_3584 |
| Sub-Region | NOx (Tonnes/Year) | SO2 (Tonnes/Year) | PM2.5 (Tonnes/Year) | NOx Percentage of Total (%) |
|---|---|---|---|---|
| Yellow Sea Main Channel | 18,500 | 2750 | 1150 | 68.5 |
| Qingdao Port Area | 3800 | 600 | 250 | 14.1 |
| Incheon Port Area | 2600 | 350 | 150 | 9.6 |
| Other Areas | 2100 | 300 | 100 | 7.8 |
| Total Study Area | 27,000 | 4000 | 1650 | 100 |
| Points Processed in a Single Grid Cell | Traditional Geometric Method (ms) | PostGIS Method (ms) | H-Grid Method (ms) |
|---|---|---|---|
| 100 | 180 | 150 | 120 |
| 1000 | 250 | 200 | 150 |
| 10,000 | 450 | 300 | 200 |
| 100,000 | 6000 | 4500 | 370 |
| 1,000,000 | 25,000 | 8000 | 620 |
| Data Distribution | Data Concentration | H-Grid I-Method (s) | PostGIS Method (s) | Traditional Method (s) |
|---|---|---|---|---|
| Uniform | 10% in top 10% of cells | 31.5 | 55 | 150.2 |
| Moderately Skewed | 90% in top 1% of cells | 31.8 | 91.4 | 254.8 |
| Highly Skewed | 99% in top 0.1% of cells | 32 | 128 | 320 |
| Aggregation Phase | Total Time (s) |
|---|---|
| Local Aggregation | 30.7 |
| Global Merge | 1.3 |
| Total Time | 32 |
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. |
© 2025 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
Liu, C.; Chen, R.; Sun, S.; Xue, Q.; Li, Z.; Xing, X.; Wang, Z. Efficient Generation of Gridded Ship Emission Inventories from Massive AIS Data Using Spatial Hashing. Atmosphere 2025, 16, 1279. https://doi.org/10.3390/atmos16111279
Liu C, Chen R, Sun S, Xue Q, Li Z, Xing X, Wang Z. Efficient Generation of Gridded Ship Emission Inventories from Massive AIS Data Using Spatial Hashing. Atmosphere. 2025; 16(11):1279. https://doi.org/10.3390/atmos16111279
Chicago/Turabian StyleLiu, Chen, Rongchang Chen, Shuting Sun, Qingqing Xue, Zichao Li, Xinying Xing, and Zhixia Wang. 2025. "Efficient Generation of Gridded Ship Emission Inventories from Massive AIS Data Using Spatial Hashing" Atmosphere 16, no. 11: 1279. https://doi.org/10.3390/atmos16111279
APA StyleLiu, C., Chen, R., Sun, S., Xue, Q., Li, Z., Xing, X., & Wang, Z. (2025). Efficient Generation of Gridded Ship Emission Inventories from Massive AIS Data Using Spatial Hashing. Atmosphere, 16(11), 1279. https://doi.org/10.3390/atmos16111279

