Vector tiles accuracy: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
()
()
Line 34: Line 34:
|-
|-
|6
|6
|
|2445.9849
|
|152.8741
|-
|-
|7
|7
|
|1222.9925
|
|76.437
|-
|-
|8
|8
|
|611.4962
|
|38.2185
|-
|-
|9
|9
|
|305.7481
|
|19.1093
|-
|-
|10
|10
|
|152.8741
|
|9.5546
|-
|-
|11
|11
|
|76.437
|
|4.7773
|-
|-
|12
|12
|
|38.2185
|
|2.3887
|-
|-
|13
|13
|
|19.1093
|
|1.1943
|-
|-
|14
|14
|
|9.5546
|
|0.5972
|-
|-
|15
|15
|
|4.7773
|
|0.2986
|-
|-
|16
|16
|
|2.3887
|
|0.1493
|-
|-
|17
|17
|
|1.1943
|
|0.0746
|-
|-
|18
|18
|
|0.5972
|
|0.0373
|-
|-
|19
|19
|
|0.2986
|
|0.0187
|}
|}

Revision as of 12:57, 9 December 2022

Vector tiles is the format used in Maria GDK to display vector data. This format is slightly different from other vector formats because coordinates are expressed in a local tile coordinate system, consisting of 4096x4096 units. This means that the vertexes of source data are "snapped" to the nearest unit in a tile, introducing a small amount of error. For each increasing zoom level, each tile is divided into four, reducing the error introduced. Because the vector tile format was concieved for presentation, the size of the tile coordinate system was chosen so that the error should always be smaller than the size of a pixel on the screen. Still, it can be useful to know the maximum accuracy of vector vector tiles at various zoom levels. This does not consider the accuracy of the source data in relation to the real-world objects they represent, which is not relevant in this context.

Maximum accuracy versus zoom levels

This table is based on the tile matrix of a GeoPackage with projection EPSG:3857 and GoogleMapsCompatible tiling. Each zoom level has a stated pixel size in meters, and each tile has a size of 256 x 256 pixels. In Maria GDK, a vector tile has the same size as a raster tile in pixels. We can the calculate the "pixel size" of a vector tile by multiplying the raster tile pixel size with the ratio of 256 / 4096.

Zoom level Raster pixel size Vector pixel size
0 156543.0339 9783.9396
1 78271.517 4891.9698
2 39135.7585 2445.9849
3 19567.8792 1222.9925
4 9783.9396 611.4962
5 4891.9698 305.7481
6 2445.9849 152.8741
7 1222.9925 76.437
8 611.4962 38.2185
9 305.7481 19.1093
10 152.8741 9.5546
11 76.437 4.7773
12 38.2185 2.3887
13 19.1093 1.1943
14 9.5546 0.5972
15 4.7773 0.2986
16 2.3887 0.1493
17 1.1943 0.0746
18 0.5972 0.0373
19 0.2986 0.0187