GeoPackage standard format |
GeoPackage is the open data format that is set by OGC for storing geographical information. Storage format is platform-independent SQLite database file. GeoPackage can store vector element data as well as raster tile data, such as remote sensing pyramid and map tile matrix set.
Now the latest version of GeoPackage standard format is 1.0, for detail please refer to OGC official website (www.opengeospatial.org), or: http://www.geopackage.org.
For GeoPackage standard Chinese version, please refer to SuperMap open source project: http://github.com/SuperMap/geopackage_cn.
GeoPackage's storage form is the platform-independent SQLite database file, and the filename extension is “.gpkg”. SQLite has advantages such as self-contained, single file, cross-platform and server-unrelated. Therefore storage based on SQLite simplifies GeoPackage file's producing, distribution and using, meanwhile ensures the integrity of GeopPackage file data.
By default SuperMap will store GeoPackage tile in [SuperMap iServer installation directory]\webapps\iserver\output\sqlite\*.gpkg, and filename consists of mapname,EPSG Code, tile width and height, and .gpkg suffix, for example:ChinaProvinces_4326_256X256_PNG.gpkg.
GeoPackage stores data by a series of tables, including tables and views such as coordinate system, content description, feature data, tile data, metadata. Among them, the first two is required, and in GeoPackage there should have at least one feature data table or tile data table.
Now SuperMap only supports tile in GeoPackage, here is a brief introduction to the tile storage.
Coordinate system's coordinate reference system is referenced by content description table and geometrical features list, thereby connecting vectors and tile data of use list with real location on earth.
Content description table provides identifiable and descriptive information, which defines tile and feature table's name, data format and content description.
GeoPackage's tile is organized, stored and indexed according to tile pyramid and exact tile zoom level.
In GeoPackage, you can store multiple raster and tile pyramid datasets in data table or view. Tile pyramid means the pyramid structure consisted of tiles with different resolution which represents different space range in different zoom level, i.e, tile data. GeoPackage's tile pyramid dataset records data such as the zoom level, row and column number of every tile.
Tile matrix set is the definition of the tile pyramid's hierarchy. If GeoPackage has tile pyramid data table, then a table or view of tile matrix set is required to define minimum border and spatial reference system.
Tile matrix is the rows and columns of tiles in a specific zoom level. Every tile pyramid data table can have multiple tile matrix. Tile matrix table or view records the structure of tile matrix in every zoom level, including tile matrix's row and column number, width and height of tile and so on. Here assign (0,0) to the upper-left tile coordinate of tile matrix that is in a random zoom level.
In GeoPacakage, tile matrix layer's zoom level is an integer with the range from 0 to n, and it increase or decrease by 1 between adjacent zoom level. The 0 level scale can display entire current map's smallest scale in a tile, and another level's scale will change at a fixed rate or different rate based on this. As the zoom level increases, the actual space that every tile represents becomes smaller, and the spatial resolution will be higher. In GeoPackage, the tile with coordinate of (0,0) means upper left tile of tile matrix that is in a random zoom level.
iServer implements GeoPackage standard tile by using 0 to 20 level of scale. The 0 level scale can display entire current map's biggest scale in a tile (default pixel is 256*256), and the adjacent layers' scale zoom two times.
Take Web Mercator's (EPSG Code: 3857) coordinate system as example, the default scale level is:
Level | Map scale |
0 | 1/591658710.9091313 |
1 | 1/295829355.45456564 |
2 | 1/147914677.72728282 |
3 | 1/73957338.86364141 |
4 | 1/36978669.431820706 |
5 | 1/18489334.71591035 |
6 | 1/9244667.357955176 |
7 | 1/4622333.678977588 |
8 | 1/2311166.839488794 |
9 | 1/1155583.419744397 |
10 | 1/577791.7098721985 |
11 | 1/288895.85493609926 |
12 | 1/144447.92746804963 |
13 | 1/72223.96373402482 |
14 | 1/36111.98186701241 |
15 | 1/18055.990933506204 |
16 | 1/9027.995466753102 |
17 | 1/4513.997733376551 |
18 | 1/2256.9988666882755 |
19 | 1/1128.4994333441377 |
20 | 1/564.2497166720689 |