MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLGeoPackage Class Reference

Detailed Description

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 TSLGPkgMetadataContainerqueryAllMetadata () const
 
const TSLGPkgExtensionContainerqueryExtensions () const
 
const TSLGPkgContentTableContainerqueryContents ()
 
const TSLGPkgSpatialRefSysContainerquerySpatialReferenceSystems ()
 

Constructor & Destructor Documentation

◆ TSLGeoPackage() [1/2]

TSLGeoPackage::TSLGeoPackage ( )

Constructor.

◆ TSLGeoPackage() [2/2]

TSLGeoPackage::TSLGeoPackage ( const char * filename)

Constructor

Parameters
filenameThe geopackage file to open. If an invalid file is specified, the isOpen() method will return false.

◆ ~TSLGeoPackage()

virtual TSLGeoPackage::~TSLGeoPackage ( )
virtual

Destructor.

Member Function Documentation

◆ hasMetadata()

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.

◆ isOpen()

bool TSLGeoPackage::isOpen ( ) const

Returns true if the GeoPackage is open and valid.

◆ numberOfContentTables()

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.

◆ open()

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.

◆ queryAllMetadata()

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.

◆ queryContents()

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.

◆ queryExtensions()

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.

◆ querySpatialReferenceSystems()

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.