Project file format
Mapboard GIS stores all project information within a Spatialite database. Spatialite is the spatial extension to SQLite, a small but capable database engine used by literally everyone. This open-source, well-documented basis allows project files to be created, read, and modified by outside software. Importantly, Spatialite files are supported natively by QGIS, ArcGIS, and Global Mapper, among other geospatial desktop environments. This means that there can always be a seamless transition between iPad and desktop mapping.
The .mapboard-project
format is designed to support onboard spatial processing.
Although the same file format is used for projects operating in
Tethered mode, the GIS capabilities of Spatialite
are not used. Instead, all spatial information is stored in a remote
PostGIS database. However, the layout of spatial tables
remains much the same.
Motivation and cross-compatibility
The author of the Spatialite library is due a lot of thanks for creating and maintaining the core technology that drives this application. Check out the Spatialite cookbook to learn more about the library.
Using a SQLite-based format for data storage, including for subsidiary
information beyond the core spatial tables, results in a format that is
self-documenting and extensible. This strategy for building app files is
advocated by the SQLite project.
The file must have the extension .mapboard-project
to be recognized as a
Mapboard project.
The .mapboard-project
format can be read by a variety of software for working with SQLite
databases, including graphical applications such as DB Browser for SQLite (recommended)
and SQLite Studio. The Spatialite GUI application
can open the spatial tables in the app. The file format can also be read using the
sqlite3
command-line application and libraries for all major programming languages.
Application package structure
As of version 3.3.3, .mapboard-project
files are organized as an application package
the “file” is actually a directory containing any number of related files. This is an approach common to many Mac and iOS apps,
and it ensures that all files associated with a project are kept together. The .mapboard-project
extension is
used to identify the directory as a Mapboard project, and the mapboard.db
file within the package contains
the SQLite database.
To open a .mapboard-project
database in a client application, you must open the mapboard.db
file contained within it. At the command line and on Windows, application packages will show up as normal
folders. On Mac, internal files can be accessed by right-clicking on the package and selecting Show Package Contents.
Spatialite database structure
The project file structure is anchored by several key tables:
linework
, linework_type
, polygon
, and polygon_type
.
The mapboard_config
table holds project configuration. When files are associated with the project
(currently just the image mode), we use the
SQLite Archive format to store them
within the application database.