GeohashTile: Vector Geographic Data Display Method Based on Geohash
<p>Schematic diagram of Geohash division and Z-curve index [<a href="#B27-ijgi-09-00418" class="html-bibr">27</a>].</p> "> Figure 2
<p>Functional framework of GeohashTile system.</p> "> Figure 3
<p>A comparison of the data process of preparing the original GeoJSON and the Geohash encoded GeoJSON by the server.</p> "> Figure 4
<p>A sample diagram of Geohash encoded GeoJSON object.</p> "> Figure 5
<p>Geohash vector map display process of client.</p> "> Figure 6
<p>Schematic diagram of client location panning.</p> "> Figure 7
<p>Diagram of Geohash encoding length and screen coordinate precision statistics.</p> "> Figure 8
<p>Comparison of the measured and calculated results of Geohash encoding precision: (<b>a</b>) Singapore; (<b>b</b>) Hainan; (<b>c</b>) Beijing; (<b>d</b>) Heilongjiang.</p> "> Figure 8 Cont.
<p>Comparison of the measured and calculated results of Geohash encoding precision: (<b>a</b>) Singapore; (<b>b</b>) Hainan; (<b>c</b>) Beijing; (<b>d</b>) Heilongjiang.</p> "> Figure 9
<p>Comparison charts of amount of data transmission among GeoTile, GeohashTileNoMerging and GeohashTileFull: (<b>a</b>) Singapore; (<b>b</b>) Hainan; (<b>c</b>) Beijing; (<b>d</b>) Heilongjiang.</p> "> Figure 10
<p>Comparison charts of loading time among GeoTile, GeohashTileNoCahcing and GeohashTileFull: (<b>a</b>) Singapore; (<b>b</b>) Hainan; (<b>c</b>) Beijing; (<b>d</b>) Heilongjiang.</p> ">
Abstract
:1. Introduction
- We design a vector geographic data structure based on Geohash architecture, named GeohashTile, which can use Geohash’s efficient partitioning and one-dimensional indexing of vector geographic data for easy querying.
- We use Geohash to unify geographic coordinate representation and map tile encoding, and organize and store vector geographic data with different granularity and detail, so as to reduce response time and network data transfer. Using relative position projection, we realize the direct conversion of Geohash and screen-pixel coordinates, making it easy to calculate. We also apply the intermediate results caching method to reduce the amount of calculations.
- We further implement the GeohashTile system and evaluate it by extensive experiments. The results show that the GeohashTile system provides efficient vector tile service in a convenient and user-friendly way, which also demonstrates that the GeohashTile system outperforms the GeoTile system in terms of both data transmission amount and loading time.
2. Background and Related Work
2.1. Vector Map
2.2. Spatial Index Technology
2.3. Geohash Encoding
2.4. GeoServer and Leaflet
2.5. Comparison of Related Work
3. GeohashTile System Architecture and Server-Side Design
3.1. Architecture Overview
3.2. Server-Side Design
3.2.1. Geohash Coordinate Conversion and Interface Configuration
- Tile data query. As shown in step ② of Figure 3, the server provides file system caching function, i.e., all the querying tile data will be cached. Compared to the query of the three fields x, y, z (x, y represents the tile encoding, and z represents the zoom level) in the processing of the original GeoJSON data, the processing of the Geohash encoded GeoJSON data only need to query two fields of and z, and thus the query efficiency is increased.
- Tile name conversion. As shown in step ④ of Figure 3, both GeoTile and GeohashTile need to decode the request field obtained from the client, namely the tile name, into a pair of latitude and longitude points representing the rectangular area where the tile is located when entering the server data request stage. There are two cases of GeohashTile name conversion according to whether there is a merged request for GeohashTile: One is that when there is no merge, the client requests a GeohashTile each time, and the name conversion process refers to the decoding process in Section 2.3; the other is that when the request is merged, each time the client delivers the request, there are two Geohash strings in the upper left corner and the lower right corner of the request area. This decoding process will be described in Section 4.2.
- Obtaining latitude and longitude map data. As shown in step ⑤ of Figure 3, we can obtain the geometric object represented by the latitude and longitude in the rectangular area. In this step, the two data acquisition methods are the same. Since the vector map stored in the server still uses latitude and longitude to represent the location of geometric objects, it is necessary to obtain the latitude and longitude map before subsequent conversion. Like most Online map service requirements, our system also follows the idea of LoD (Level of Detail). As the zoom level increases, the more granular geometric objects contained in the tile. The rules refer to the GeoTile. For example, the geometric objects with Category as Highway and Type as Primary will be displayed when the zoom level is 13–17; while the geometric objects with Category as Amenity and Type as Hospital will only appear at the zoom level of 15–17.
- The geometric object coordinate conversion. As shown in step ⑥ of Figure 3, this step is unique for GeohashTile. The obtained latitude and longitude coordinates of the geometric object (e.g., ) are encoded into Geohash coordinates (e.g., ) according to the encoding process introduced in Section 2.3.
- Organizing into GeoJSON format. As shown in step ⑦ of Figure 3, the purpose is to return the GeoJSON data encoded by latitude and longitude or Geohash to the client. Figure 4 shows a set of GeoJSON objects encoded by Geohash. Compared to getting the original GeoJSON data directly, when the server provides GeoJSON encoded by Geohash, the process of converting the latitude and longitude coordinates of geometric objects into Geohash is added. Since this process is executed only once when the data is requested for the first time, subsequent access is directly read from the cache without excessive computation overhead.
3.2.2. Data Precision Setting
4. Client Data Display
4.1. Calculation Process of GeohashTile
4.1.1. Calculating the Size of a Piece of GeohashTile
4.1.2. Calculating the Number of GeohashTile in the Client
4.1.3. Calculating All the GeohashTile Encoding in the Client
Algorithm 1 GeohashTile neighbor searching algorithm |
|
4.2. Merging Process of Map Data Requests Sent to Server
Algorithm 2 GeohashTile request merging algorithm |
|
4.3. Relative Position Projection Process
4.3.1. Data Compression
4.3.2. Calculating Pixel Distance
Algorithm 3 Pixel distance calculation algorithm |
|
4.3.3. Calculating Screen Coordinates
4.4. Intermediate Result Caching Process
5. Experiments and Evaluation
5.1. Experimental Setup and Dataset
5.2. Performance Analysis
5.2.1. Geohash Encoding Length and Precision
5.2.2. Amount of Data Transmission
5.2.3. Loading Time
6. Conclusions
Author Contributions
Funding
Conflicts of Interest
References
- Davis, N.; Raina, G.; Jagannathan, K. Taxi Demand Forecasting: A HEDGE-Based Tessellation Strategy for Improved Accuracy. IEEE Trans. Intell. Transp. Syst. 2018, 19, 3686–3697. [Google Scholar] [CrossRef] [Green Version]
- Li, C.; Lu, H.; Xiang, Y.; Liu, Z.; Yang, W.; Liu, R. Bringing Geospatial Data Closer to Mobile Users: A Caching Approach Based on Vector Tiles for Wireless Multihop Scenarios. Mob. Inf. Syst. 2018, 2018, 5186495. [Google Scholar] [CrossRef] [Green Version]
- Yang, C.P.; Wong, D.W.S.; Yang, R.; Kafatos, M.; Li, Q. Performance-improving techniques in web-based GIS. Int. J. Geogr. Inf. Sci. 2005, 19, 319–342. [Google Scholar] [CrossRef]
- Sagan, H. Space-Filling Curves; Springer: New York, NY, USA, 1994. [Google Scholar]
- OpenLayers 3 Vector Rendering with Topology Simplification. Website. 2014. Available online: https://boundlessgeo.com/2014/03/openlayers-vector-rendering/ (accessed on 21 September 2017).
- Keying Huang, G.L.; Wang, J. Rapid retrieval strategy for massive remote sensing metadata based on GeoHash coding. Remote Sens. Lett. 2019, 10, 111–119. [Google Scholar] [CrossRef]
- Google. Google Map—Tile and Coordinate Specification. Website. Available online: https://developers.google.com/maps/documentation/javascript/maptypes (accessed on 20 May 2020).
- Microsoft. Bing Maps Tile System. Website. Available online: https://docs.microsoft.com/en-us/bingmaps/articles/bing-maps-tile-system (accessed on 29 June 2020).
- Zouhar, F.; Senner, I. Web-Based Visualization of Big Geospatial Vector Data. In Geographic Information Science; Springer: Cham, Switzerland, 2019; pp. 59–74. [Google Scholar]
- Zhou, M.; Chen, J.; Gong, J. A virtual globe-based vector data model: Quaternary quadrangle vector tile model. Int. J. Digit. Earth 2016, 9, 230–251. [Google Scholar] [CrossRef]
- Martín, R.G.; Fernández, J.P.D.C.; Pérez, E.V.; Pérez, M.J.V.; Santos, L.M.R. An OLS regression model for context-aware tile prefetching in a web map cache. Int. J. Geogr. Inf. Sci. 2013, 27, 614–632. [Google Scholar] [CrossRef]
- Wenjuecandidate, J. Implementation of OGC Web Map Service Based on Web Service. Geo-Spat. Inf. Sci. 2004, 7, 148–152. [Google Scholar]
- Guanhua, W. Improving Data Transmission in Web Applications via the Translation between XML and JSON. In Proceedings of the 2011 Third International Conference on Communications and Mobile Computing, Qingdao, China, 18–20 April 2011; pp. 182–185. [Google Scholar]
- Bray, T.; Paoli, J.; Sperbergmcqueen, C.M. Extensible Markup Language (XML). World Wide Web 1997, 2, 27–66. [Google Scholar]
- Lake, R. The application of geography markup language (GML) to the geological sciences. Comput. Geosci. 2005, 31, 1081–1094. [Google Scholar] [CrossRef]
- Nolan, D.; Lang, D.T. Keyhole Markup Language; Springer: New York, NY, USA, 2014; pp. 581–618. [Google Scholar]
- Steiniger, S.; Hunter, A.J.S. Data Structure: Spatial Data on the Web; John Wiley & Sons, Ltd.: Hoboken, NJ, USA, 2017. [Google Scholar]
- GeoJSON. Website. Available online: http://geojson.org/geojson-spec.html (accessed on 29 June 2020).
- Li, W.; Song, M.; Zhou, B.; Cao, K.; Gao, S. Performance improvement techniques for geospatial web services in a cyberinfrastructure environment—A case study with a disaster management portal. Comput. Environ. Urban Syst. 2015, 54, 314–325. [Google Scholar] [CrossRef] [Green Version]
- Li, L.; Hu, W.; Zhu, H.; Li, Y.; Zhang, H. Tiled vector data model for the geographical features of symbolized maps. PLoS ONE 2017, 12, e0176387. [Google Scholar]
- TopoJSON. Website. Available online: https://github.com/topojson/topojson-specification (accessed on 25 May 2020).
- Liu, J.; Li, H.; Yong, G.; Hao, Y.; Dan, J. A geohash-based index for spatial data management in distributed memory. In Proceedings of the International Conference on Geoinformatics, Kaohsiung, Taiwan, 25–27 June 2014. [Google Scholar]
- Nie, Y.; Zhou, W.; Jian, S. Spatial index for tile map service based on Z curve. J. Image Graph. 2012, 2, 286–292. (In Chinese) [Google Scholar]
- Ramos, J.A.S.; Esperana, C.; Clua, E.W.G. A progressive vector map browser for the web. J. Braz. Comput. Soc. 2009, 15, 35–48. [Google Scholar] [CrossRef] [Green Version]
- Wan, L.; Huang, Z.; Peng, X. An Effective NoSQL-Based Vector Map Tile Management Approach. ISPRS Int. J. Geo-Inf. 2016, 5, 215. [Google Scholar] [CrossRef] [Green Version]
- Zhang, J.; Yang, C.; Yang, Q.; Lin, Y.; Zhang, Y. HGeoHashBase: An optimized storage model of spatial objects for location-based services. Front. Comput. Sci. China 2018, 14, 208–218. [Google Scholar] [CrossRef]
- Zhou, Y.; De, S.; Wang, W.; Moessner, K.; Palaniswami, M. Spatial Indexing for Data Searching in Mobile Sensing Environments. Sensors 2017, 17, 1427. [Google Scholar] [CrossRef] [Green Version]
- Deoliveira, J. GeoServer: Uniting the GeoWeb and spatial data infrastructures. In Proceedings of the 10th International Conference for Spatial Data Infrastructure, Beijing, China, 25–29 February 2008. [Google Scholar]
- Blower, J.D.; Gemmell, A.L.; Griffiths, G.H.; Haines, K.; Santokhee, A.; Yang, X. A Web Map Service implementation for the visualization of multidimensional gridded environmental data. Environ. Model. Softw. 2013, 47, 218–224. [Google Scholar] [CrossRef] [Green Version]
- Zavala-Romero, O.; Ahmed, A.; Chassignet, E.P.; Zavala-Hidalgo, J.; Fernández Eguiarte, A.; Meyer-Baese, A. An open source Java web application to build self-contained web GIS sites. Environ. Model. Softw. 2014, 62, 210–220. [Google Scholar] [CrossRef]
- Leaflet-An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps. Website. Available online: https://leafletjs.com/ (accessed on 29 June 2020).
- Edler, D.; Vetter, M. The Simplicity of Modern Audiovisual Web Cartography: An Example with the Open-Source JavaScript Library leaflet.js. KN J. Cartogr. Geogr. Inf. 2019, 69, 51–62. [Google Scholar] [CrossRef] [Green Version]
- Brambilla, G.; Amoretti, M.; Zanichelli, F. Adgt.js: A Web Application Framework for Peer-to-Peer Location-Based Services. In European Conference on Parallel Processing; Springer: Cham, Switzerland, 2016. [Google Scholar]
- Haklay, M.; Weber, P. OpenStreetMap: User-Generated Street Maps. IEEE Pervasive Comput. 2008, 7, 12–18. [Google Scholar] [CrossRef] [Green Version]
Method | Coordinate Representation | Indexing Method | Projection Method | Intermediate Result Caching | Scope of Application |
---|---|---|---|---|---|
Google Map [7] | Latitude and longitude | XYZ Quadtree | Web Mercator | no | All basic vector maps |
Bing Map [8] | Latitude and longitude | Quadkey Quadtree | Web Mercator | no | All basic vector maps |
Zouhar et al. [9] | Latitude and longitude | Inverted Index | Web Mercator | Not mentioned | Polygon |
wan et al. [25] | Latitude and longitude | Quadtree | Not mentioned | Not mentioned | All basic vector maps |
Ramos et al. [24] | Not mentioned | MX-CIF Quadtree | Not mentioned | No | Polygonal lines |
GeoTile [2] | Latitude and longitude | XYZ Quadtree | Web Mercator | No | All basic vector maps |
Proposed Approach | Geohash | Geohash | Relative position | Yes | All basic vector maps |
Location | Longitude Range | Latitude Range | Data Size | Accuracy |
---|---|---|---|---|
Heilongjiang | (121.18, 135.09) | (43.42, 53.56) | 2198 | 100% |
Beijing | (115.42, 117.49) | (39.44, 41.05) | 1431 | 100% |
Hainan | (89.88, 92.48) | (15.65, 18.25) | 1987 | 100% |
Singapore | (99.25, 119.61) | (6.71, 7.65) | 2636 | 100% |
Zoom | GeohashTile_Size | Zoom | GeohashTile_Size | Zoom | GeohashTile_Size |
---|---|---|---|---|---|
1 | 7 | 13 | |||
2 | 8 | 14 | |||
3 | 9 | 15 | |||
4 | 10 | 16 | |||
5 | 11 | 17 | |||
6 | 12 | 18 |
Col 1 | Col 2 | Col 3 | Col 4 | Col 4 | Col 6 | Col 7 |
---|---|---|---|---|---|---|
wrekg | wreku | wrekv | wreky | wrekz | wresb | wrese |
wreke | wreks | wrekt | wrekw | wrekx | wres8 | wres9 |
wrek7 | wrekk | wrekm | wrekq | wrekr | wres2 | wres3 |
wrek5 | wrekh | wrekj | wrekn | wrekp | wres0 | wres1 |
wre7g | wre7u | wre7v | wre7y | wre7z | wreeb | wreee |
© 2020 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 (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhou, C.; Lu, H.; Xiang, Y.; Wu, J.; Wang, F. GeohashTile: Vector Geographic Data Display Method Based on Geohash. ISPRS Int. J. Geo-Inf. 2020, 9, 418. https://doi.org/10.3390/ijgi9070418
Zhou C, Lu H, Xiang Y, Wu J, Wang F. GeohashTile: Vector Geographic Data Display Method Based on Geohash. ISPRS International Journal of Geo-Information. 2020; 9(7):418. https://doi.org/10.3390/ijgi9070418
Chicago/Turabian StyleZhou, Chang, Huimei Lu, Yong Xiang, Jingbang Wu, and Feng Wang. 2020. "GeohashTile: Vector Geographic Data Display Method Based on Geohash" ISPRS International Journal of Geo-Information 9, no. 7: 418. https://doi.org/10.3390/ijgi9070418
APA StyleZhou, C., Lu, H., Xiang, Y., Wu, J., & Wang, F. (2020). GeohashTile: Vector Geographic Data Display Method Based on Geohash. ISPRS International Journal of Geo-Information, 9(7), 418. https://doi.org/10.3390/ijgi9070418