|Data Access / Supported Data Sources|
Spectrum Spatial supports the GeoPackage data provider for Windows and Linux. GeoPackage is a spatial extension to the SQLite database technology. The GeoPackage standard, adopted by OGC, allows for multiple tables, their relationships, and relevant metadata to be self-contained within a single file. It is useful for large datasets and for working around character set and data size limitations in MapInfo Professional.
Spectrum Spatial treats GeoPackage as a read-write data source.
Spectrum Spatial's support for GeoPackage was designed to be as compliant as possible with the OGC specification. However, other implementations that support it (either for reading, writing, or creating) may not be entirely compliant.
Spectrum Spatial considers a GeoPackage table compliant if it:
A GeoPackage file has an extension of .gpkg and is essentially a database that contains tables. To access GeoPackage data with Spectrum Spatial, create a file-system named connection using Spatial Manager. A connection to a GeoPackage file is a path, similar to TAB and shapefiles. Once the connection is created, you can create named tables that use it. You use GeoPackage named tables as you would any other data provider named tables. A GeoPackage table should have a spatial index to work with Spectrum Spatial. Sample data for GeoPackage is available in the /Samples/NamedTables folder in the repository (WorldGeoPackageTable). The older version of the Map Uploader (for MapInfo Pro versions prior to 16.0), does not support GeoPackage.
The GeoPackage data source provider follows the same rules as generic JDBC when mapping a non-spatial JDBC type to Spectrum Spatial’s type system. The gpkg_geometry_columns table is consulted for the name of the spatial column and the coordinate system.
The geometry and geography data types are the spatial data equivalents to Spectrum Spatial's supported data types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection.
The GeoPackage specification identifies the column in the table that serves as the primary key. This column will be marked as read-only since it is an auto-increment column.
Insert, update and delete operations are supported on a GeoPackage data source provider. The Write Ahead Logging (WAL) journal mode of SQLite is used to allow concurrent read and write for GeoPackage, with these limitations:
For more details about WAL, including its advantages and limitations, see http://www.sqlite.org/wal.html.
For more information see the appendix Delegation to Data Source Providers.
For GeoPackage, volatility is any change to the table's schema, such as adding or dropping a column or changing an index on a column. If it has changed, Spectrum Spatial will flush the metadata about the table from the cache and reload it before proceeding with the data access operation. See Data Source Volatility for more information.
GeoPackage supports a Cartesian spatial reference system (SRS) when the SRID is -1 and a geographic SRS when the SRID is 0. If a GeoPackage table has an SRID of -1, use column hints to define a Cartesian SRS in the named table. If the SRID is 0, use column hints to define a geographic SRS. If these column hints are not set or are set incorrectly, the system will throw an exception. These column hints must be added manually to a named table definition using WebDAV or a text editor to add a <DBDataSourceMetadata> attribute to the XML file:
For a Cartesian SRS:
<DBDataSourceMetadata> <FeatureGeometryAttribute srsName="epsg:3857">geom</FeatureGeometryAttribute> </DBDataSourceMetadata>For a geographic SRS:
<DBDataSourceMetadata> <FeatureGeometryAttribute srsName="epsg:4326">geom</FeatureGeometryAttribute> </DBDataSourceMetadata