MMSI File Format Schema


MMSI is an image file format that supports reading and modifying extremely large images. The file format uses the concept of pyramid image, which means the image data is stored with different resolutions in the same file to provide high accessing efficiency. Developers are able to read or write image regions from any resolution layer through the MMSI library. A MMSI file is actually a SQLite file with the suffix mmsi. Each file contains three tables, mmsi_props, mmsi_layers and mmsi_tiles. The SQL command can be found at GitLab.


This table stores key-value based string properties of this image. essential properties include image width, image height and etc, developers are also able to add custom properties.


This table stores information of different layers that constitute the pyramid image. The first layer has the same resolution as the original image, and each of the next layers has both the half width and height of the previous layer. This rule is used to simplify the process of passing modification between different layers and to reduce time cost. Each layers contain tiles with successive IDs, and tile_start_id is the ID of the first tile in this layer. tile_x_count and tile_y_count indicates how many tiles are there in this layer.

All the data in this table are generated when the mmsi file is created. These data will not be modified once they have been created.


This table stores tile data of all layers include tile position, image data and the lazy flag. The four columns start_x, end_x, start_y and end_y indicate the position of this tile. The lazy flag indicates whether modifications applied to layers with lower resolutions have been applied to current tile, and is automatically managed by the MMSI library. The column data and mask contains the image data, which is compressed with ZLIB library to save disk space.

results matching ""

    No results matching ""