Oleksandr Matsibora. Web-GIS application of historic buildings in United Kingdom developed with Discrete Global Grid System (DGGS) H3 and Tippecanoe vector tiles
Web-GIS application “Historic buildings in UK” is an example of successful integration of the different technologies, CLI tools, libraries and approaches to data visualization with deployment to cloud storage:
-
Quasar Framework
-
MapLibre GL JS
-
Tippecanoe
-
PMTiles
-
Discrete Global Grid System (DGGS) H3
-
Storj decentralized storage platform
-
Cloudflare CDN proxy
Suggested serverless architecture is unified and could be considered as a prototype of the client side web-GIS application for visualization and management of huge amounts of spatial vector data (such as web-atlases, etc).
1. Dataset. To combine and implement so much different technologies and to demonstrate efficiency of the such approach we needed a large dataset with a hundreds of thousands of points. Also, those objects should have a different density in different regions. That is why we created a dataset of the historic buildings in United Kingdom (493734 points) by joining of 4 different layers (England, Scotland, Wales and Northern Ireland) from different providers (all links of original data are available in online version of web-GIS). The biggest problem was that all layers had a different structure of the attributes, but homogeneity and spatial distribution of those objects are most important for the needs of this solution.
2. Visualization. We used DGGS H3 to show the density of historic buildings in UK on different scale levels. The most informative H3 resolutions for current dataset are: 4, 5, 6, 7, 8. So, five geoJSON files of hexagons were generated with h3.js library. The quantity of historic buildings of the each hexagon was calculated by aggregation with SQL-query. Later it will give an ability to build a choropleth map for all H3 resolutions (4-8).
3. Vector tiles. GeoJSON files are built for different H3 resolutions (4-8) including different hexagons quantity. For example, there are only 255 hexagons at level 4, but at resolution 8 this parameter is 96094. Rendering of a huge number of vector polygons is a complicating challenge for a web-browser. All geoJSON files were converted to vector tiles with Tippecanoe CLI in order to solve it. We used PMTiles CLI and created a single file with all layers inside to avoid serving of thousands of a small tiles. It means that we have served only one .pmtiles file but it is possible to make queries and get data which is necessary at the moment.
4. Deployment. In case of serving a large files (.pmtiles > 1GB) one of the best option in terms of performance is Storj cloud object storage. It has native and easy to use CLI tool for files uploading – Uplink. Together with Cloudflare CDN proxy it provides secured (HTTPS) and reliable service.
5. Useful links:
-
YouTube short demonstration: https://www.youtube.com/watch?v=mYqmu8-8v50
-
Online web-GIS application: https://historic-places-uk.web.app/