Visualizing Large Volumes of Spatial Data in Map Applications
How to keep maps fast, accurate, and user-friendly—even with massive datasets?
The Scenario
Finding spatial data requires an interface that allows users to explore information visually within a map. A typical workflow starts with a query to a spatial database (e.g., PostGIS), which then feeds data into an OGC service such as WFS (Web Feature Service) or WMS (Web Map Service). The web application consumes these services and displays the resulting data on top of a base map or other layers. (see picture below)
The Challenge
When the selected area contains large amounts of spatial data, the data volume transferred from the database to the service—and in the case of WFS, all the way to the client—can become very large. This introduces significant latency.
To mitigate this, requests often include a limit on the number of features returned. While this keeps response times low, it can also lead to incomplete map views: when zooming in, additional data suddenly appears that had been omitted earlier.
Increase the limit too much, and the map becomes slow or even unusable. Both outcomes are undesirable.
Indices Are Your Friend
To keep data volume manageable—without hiding important information—you can rely on two key concepts:
1) Spatial Indexing
A spatial index aggregates raw data by counting features within predefined spatial cells. This means that, for example, 1,000 raw points in an area can be represented by a single aggregated value. Aggregated values can also be calculated if the raw data are other geometric shapes, like e.g. a polygon or a line.
There are various approaches to spatial indexing; in our case, we use the H3 index, which you can see illustrated in the image.
Spatial indices offer several advantages:
Recommended by LinkedIn
This ensures that, at any given zoom level, the application only loads a manageable amount of data—keeping latency low while still reflecting the true data distribution.
In spatial services you can also define styling rules—for example, coloring H3 cells based on their counts. In our example, red cells indicate areas with more raw data, while transparent cells indicate fewer.
2) Layer Visibility Management
Both the raw data and the indexed data for different zoom levels are exposed to the map application as separate layers. For a seamless user experience, the user shouldn’t have to toggle these layers manually. Instead, the application should automatically switch between them based on the zoom level.
The Benefit
This approach ensures that users never miss important data when zoomed out, while still enjoying smooth interactions and fast responses when exploring the map in detail.
Have you faced similar challenges in map applications? I’d be interested to hear how you approached them—or if you used different strategies altogether.
Aurelius Enterprise #GIS #SpatialData #Mapping #H3Index #PostGIS #LocationIntelligence #DataEngineering #Geospatial #GeospatialAnalysis #Geodata #BigData #SpatialIndexing #GeospatialEngineering