![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class encapsulates the functionality associated with reading geopackage(.gpkg) files.
The geopackage reader can read both vector and raster data from the geopackage, along with any associated metadata.
If a geopackage contains the gpkg_rtree_index extension, this will be used when performing vector data queries.
Other geopackage extensions are not currently supported.
Information from the optional gpkg_data_columns and gpkg_data_column_ constraints tables will not be read.
Public Member Functions | |
TSLGeoPackage () | |
TSLGeoPackage (const char *filename) | |
virtual | ~TSLGeoPackage () |
bool | hasMetadata () const |
bool | isOpen () const |
int | numberOfContentTables () const |
bool | open (const char *filename) |
const TSLGPkgMetadataContainer * | queryAllMetadata () const |
const TSLGPkgExtensionContainer * | queryExtensions () const |
const TSLGPkgContentTableContainer * | queryContents () |
const TSLGPkgSpatialRefSysContainer * | querySpatialReferenceSystems () |
TSLGeoPackage::TSLGeoPackage | ( | ) |
Constructor.
TSLGeoPackage::TSLGeoPackage | ( | const char * | filename | ) |
Constructor
filename | The geopackage file to open. If an invalid file is specified, the isOpen() method will return false. |
|
virtual |
Destructor.
bool TSLGeoPackage::hasMetadata | ( | ) | const |
Query whether the geopackage contains the gpkg_metadata and gpkg_metadata_ reference tables.
Returns true if the geopackage contains metadata tables, or false otherwise.
bool TSLGeoPackage::isOpen | ( | ) | const |
Returns true if the GeoPackage is open and valid.
int TSLGeoPackage::numberOfContentTables | ( | ) | const |
Query the number of content tables present in the geopackage.
This method queries the contents table directly for the number of entries it contains. It does not perform any validation.
Return the number of entries in the gpkg_contents table.
bool TSLGeoPackage::open | ( | const char * | filename | ) |
Open a geopackage(.gpkg) file.
Any existing open file will be closed.
Returns true if the file was opened, or false otherwise.
const TSLGPkgMetadataContainer * TSLGeoPackage::queryAllMetadata | ( | ) | const |
Query the metadata container object for the geopackage.
This object provides access to the contents of the gpkg_metadata and gpkg_ metadata_reference tables.
Returns the metadata container, or NULL if no metadata is present in the geopackage.
const TSLGPkgContentTableContainer * TSLGeoPackage::queryContents | ( | ) |
Query the content table contained object for the geopackage.
This object provides access to the gpkg_contents table. This object will only contain valid entries. Entries may be invalid if the corresponding feature/tiles table is missing, or if the definition does not reference a valid entry from the gpkg_spatial_ref_sys table.
Returns the content table object, or NULL if the contents table is empty.
const TSLGPkgExtensionContainer * TSLGeoPackage::queryExtensions | ( | ) | const |
Query the extension container object for the geopackage.
This object provides access to the gpkg_extensions table.
Returns the extension container object, or NULL if no extensions are used by the geopackage.
const TSLGPkgSpatialRefSysContainer * TSLGeoPackage::querySpatialReferenceSystems | ( | ) |
Query the spatial reference system container for the geopackage.
This object provides access to the contents of the gpkg_spatial_ref_sys table.
Returns the spatial reference system container, or NULL if an error occurred.