![]() |
MapLink Pro 11.1.2.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
This class encapsulates the functionality associated with a geopackage feature table.
It provides the ability to query vector data from the table, information about the table structure, and allows an application to access raw data from the table via the TSLGPkgFeatureIterator class.
Geometry queries can be filtered based on a supplied extent, or by directly providing an SQL statement to execute.
Public Member Functions | |
const char * | getAttributeColumnNameAt (int index) const |
TSLGPkgFeatureIterator * | getFeatureIterator (double tmcPerMU, TSLDataHandler *dataHandler=NULL) const |
TSLEntitySet * | getGeometryBySQL (const char *sqlStatement, double tmcPerMU, TSLGPkgFeatureCallback *featureCallback=NULL, TSLDataHandler *dataHandler=NULL, TSLMUExtent *extent=NULL) const |
TSLEntitySet * | getGeometryByExtent (const TSLMUExtent &extent, double tmcPerMU, TSLGPkgFeatureCallback *featureCallback=NULL, TSLDataHandler *dataHandler=NULL) const |
int | numberOfItems () const |
int | numberOfAttributeColumns () const |
![]() | |
const char * | name () const |
const char * | description () const |
const TSLMUExtent & | getMUExtent () const |
const char * | lastChange () const |
const char * | identifier () const |
const TSLGPkgMetadataContainer * | queryMetadata () const |
const TSLCoordinateSystem * | querySpatialReferenceSystem () const |
TSLGPkgContentTableTypeEnum | type () const |
const char * TSLGPkgFeatureTable::getAttributeColumnNameAt | ( | int | index | ) | const |
Query the name of an attribute column.
The mandatory ID and Geometry columns are not excluded from this query.
index | The index of the column to query. |
TSLGPkgFeatureIterator * TSLGPkgFeatureTable::getFeatureIterator | ( | double | tmcPerMU, |
TSLDataHandler * | dataHandler = NULL ) const |
Returns an iterator that allows the application to iterate through the contents of the feature table.
The iterator is owned by the application and should be deleted when no longer required.
tmcPerMU | The TMC->Map Unit scaling factor to use when converting the geometry to a TSLEntity. |
dataHandler | An optional data handler. If provided, the iterator will populate the TSLDataSet of each geometry item returned from the iterator with any attribute columns present in the feature table. If the data handler provided does not contain definitions for any of the attribute columns present in the feature table they will be automatically added to the data handler. |
TSLEntitySet * TSLGPkgFeatureTable::getGeometryByExtent | ( | const TSLMUExtent & | extent, |
double | tmcPerMU, | ||
TSLGPkgFeatureCallback * | featureCallback = NULL, | ||
TSLDataHandler * | dataHandler = NULL ) const |
Returns all geometry in the feature table that intersects the given extent. If no geometry is within the extent, this method returns NULL.
The application owns the returned entity set.
extent | The extent to return geometry for. |
tmcPerMU | The scaling factor to use to use when converting geometry from the GeoPackage native format to MapLink entity geometry types. For data in lat/lon a value of approximately 5,000,000 is reasonable, while for data in a world-scale meter-based coordinate system a value of 50 is reasonable. |
featureCallback | An optional callback that will be invoked for each geometry item read from the database. This can be used to alter the geometry as it is loaded from the GeoPackage. |
dataHandler | An optional data handler. If provided, the iterator will populate the TSLDataSet of each geometry item returned from the iterator with any attribute columns present in the feature table. If the data handler provided does not contain definitions for any of the attribute columns present in the feature table they will be automatically added to the data handler. |
TSLEntitySet * TSLGPkgFeatureTable::getGeometryBySQL | ( | const char * | sqlStatement, |
double | tmcPerMU, | ||
TSLGPkgFeatureCallback * | featureCallback = NULL, | ||
TSLDataHandler * | dataHandler = NULL, | ||
TSLMUExtent * | extent = NULL ) const |
Executes the SQL statement contained in the parameter string and returns the matching geometry from this feature table as a TSLEntitySet. If the query returns with no results, NULL is returned.
The application owns the returned entity set.
sqlStatement | The SQL statement to execute on the GeoPackage. |
tmcPerMU | The scaling factor to use to use when converting geometry from the GeoPackage native format to MapLink entity geometry types. For data in lat/lon a value of approximately 5,000,000 is reasonable, while for data in a world-scale meter-based coordinate system a value of 50 is reasonable. |
featureCallback | An optional callback that will be invoked for each geometry item read from the database. This can be used to alter the geometry as it is loaded from the GeoPackage. |
dataHandler | An optional data handler. If provided, the iterator will populate the TSLDataSet of each geometry item returned from the iterator with any attribute columns present in the feature table. If the data handler provided does not contain definitions for any of the attribute columns present in the feature table they will be automatically added to the data handler. |
extent | An optional query extent. If provided, only geometry that intersects the given extent will be returned. |
int TSLGPkgFeatureTable::numberOfAttributeColumns | ( | ) | const |
Returns the number of columns in the feature table.
Each table has an mandatory ID column and a Geometry column. Additional column entries represent Attribute data describing the feature.
The contents of these columns may be queried via the feature iterator.
int TSLGPkgFeatureTable::numberOfItems | ( | ) | const |
Returns the number of Items in the feature table.