To improve the efficiency of query the map, you need to understand the factors that affect the performance of a map. If data query takes a long time, it is mostly associated with the dataset structure. To improve the read efficiency of datasets, you can start from the following aspects, data encoding, pyramids, spatial index, and cache. Vector data differs from the structure of the image data. Vector and image data query time optimization will be introduced below.
Vector dataset
- Spatial Index
- R-tree Index
Advantages: Generally with highest query performance. However, for some data with special data organization, tile index + local cache will offer best speed.
Disadvantages: Poor support of concurrency, therefore, only applicable to exclusive file datasource, not database datasource which requires concurrent editing. High maintenance cost. Time cost for indexing is long.
Note: For static data, R-tree index is a good choice.
- Quadtree Index
Advantages: Good support for concurrency and fast to create index.
Disadvantages: Query performance is lower than R-tree.
It is suggested to replace Quadtree index with dynamic index.
- Dynamic Index
Advantages: Good support for concurrency and fast to create index. You can customize the cell size fore each level and it is not limited by the bounds of the dataset. It is applicable to database datasource and it has better performance when the data amount is huge and the data is readonly.
- Tile Index
In SuperMap SDX+, the spatial objects are classified according to one attribute field or a given range (sheet length and width). The spatial objects are managed by the index to improve the query speed. As shown in the figure below shows the map of the administrative boundaries of the Chinese municipal administrative boundaries, according to the given range to create the tile index, showing h4708. The tile index is very useful for the display and query of the vast amounts of data (i.e., the number of objects is more than one million). After the establishment of the index, it only shows what you need to see so as to greatly shorten the display time. In SuperMap SDX+, the spatial objects are classified according to one attribute field or a given range (sheet length and width). The spatial objects are managed by the index to improve the query speed. As shown in the figure below shows the map of the administrative boundaries of the Chinese municipal administrative boundaries, according to the given range to create the tile index, showing h4708. The tile index is very useful for the display and query of the vast amounts of data (i.e., the number of objects is more than one million). After the establishment of the index, it only shows what you need to see so as to greatly shorten the display time.
- Data Encoding
- Map cache
Spatial indexing is used to promote the query and access speed of geospatial data. Spatial indexes of GIS are on the basis of field indexes. Since traditional field indexes cannot manage with the fast locating the spatial data that is spatially related, spatial indexes are necessary to improve the access speed of spatially related data (File datasource can only support R tree index).
The picture shown below is the electronic map for an area. The performance before and after creating spatial index for the map is different. Before creating spatial index, the refresh time for the map is 800ms. After creating spatial index (R-tree index), the time cost for refresh once is 780ms. Map browsing efficiency, especially query efficiency can be greatly enhanced after creating spatial index.
Encoding data can reduce the data size. The decrease of data size can improve the efficiency of reading disks and network transmission. You can change the data encoding by some features like creating a dataset, copying a dataset, importing a dataset, or exporting a dataset. Four encode types are supported for vector dataset including single-byte, double-byte, triple-byte, and four-byte. The CAD dataset and tabular dataset do not support encoding.
Most of maps browsed nowadays are tiled maps for improving the browse efficiency greatly. Publishing a workspace needs to read the position of each image. While publishing map cache will read the image directly. Therefore, publishing map cache rather than the original workspace is recommended.
Grid Dataset
- Image Pyramids
Pyramids can speed up the display of image data by returning only the data at a specified resolution that is required for the display. When you add an image dataset to a map, the system will ask you whether to build an image pyramid or not. Select Yes to create an image pyramid for your image dataset and then display on the map. For example, before creating the image pyramid, the refresh time for an image is 500ms. After creating an image pyramid, the time of refreshing the map is only 120ms at the same scale and view, greatly enhancing the map display performance.
![]() |
Comparison for performance before and after creating image pyramids |
Resample
For example, when you check a line for a road that is actually very sharp. There might be too many redundant vertices when you check the vertices of the line. You can resample to reduce redundant vertices.
After resample, only necessary vertices are retained. You can check the time cost for refreshing the road data at s certain scale via map diagnosis function. We found time cost before resampling was 34s, while time cost after resampling. Resampling reduces time for map drawing, not for query.