Enroute Flight Navigation
A navigation app for VFR pilots
FileFormats::VACCollection Class Reference

Collection of visual approach charts. More...

#include <VACCollection.h>

Inheritance diagram for FileFormats::VACCollection:
FileFormats::DataFileAbstract

Public Member Functions

 VACCollection (const QString &fileName)
 Standard constructor.
 ~VACCollection ()
 Standard destructor.
QList< GeoMaps::VACcharts () const
 Charts contained in the collection.
QString attribution () const
 Attribution for the charts of this collection.
QString name () const
 Name of the collection.
QByteArray imageData (const QString &chartName)
 Retrieve raster data for a single chart.
Public Member Functions inherited from FileFormats::DataFileAbstract
bool isValid () const
 Validity check.
QString error () const
 Error string.
QStringList warnings () const
 Warnings.

Additional Inherited Members

Static Public Member Functions inherited from FileFormats::DataFileAbstract
static QSharedPointer< QFile > openFileURL (const QString &fileName)
 Open file, file URL or Android content URL.

Detailed Description

Collection of visual approach charts.

This class reads collections of visual approach charts, as distributed by the enroute data server. Internally, these collections are SQLite databases with the following schema.

  • Table 'metadata', with columns 'key' and 'value'. The required entries are ('schemaVersion', '1') and ('name', <collection name>). The optional entry ('attribution', <html>) names the source of the charts.
  • Table 'charts', with columns 'name', 'topLeftLat', 'topLeftLon', 'topRightLat', 'topRightLon', 'bottomLeftLat', 'bottomLeftLon', 'bottomRightLat', 'bottomRightLon' and 'image'. The column 'image' contains webp-encoded raster data.

The constructor reads the chart index, but no raster data, and is therefore lightweight even for large collections.

Definition at line 52 of file VACCollection.h.

Constructor & Destructor Documentation

◆ VACCollection()

FileFormats::VACCollection::VACCollection ( const QString & fileName)

Standard constructor.

Constructs an object from a VAC collection file. The file is supposed to exist and remain intact throughout the existence of this class instance.

Parameters
fileNameName of the VAC collection file

Member Function Documentation

◆ attribution()

QString FileFormats::VACCollection::attribution ( ) const
inlinenodiscard

Attribution for the charts of this collection.

Collections distributed by the enroute data server name the agency that publishes the charts, along with the license under which the charts are distributed. The attribution is set by the data server and is therefore not translated.

Returns
A human-readable HTML string with attribution, or an empty string if the collection file does not specify one.

Definition at line 89 of file VACCollection.h.

◆ charts()

QList< GeoMaps::VAC > FileFormats::VACCollection::charts ( ) const
inlinenodiscard

Charts contained in the collection.

The VACs returned here have their member 'fileName' set to the file name of the collection file, and their member 'collection' set to the name of this collection. Use imageData() to obtain raster data.

Returns
List of VACs, or an empty list on error.

Definition at line 77 of file VACCollection.h.

◆ imageData()

QByteArray FileFormats::VACCollection::imageData ( const QString & chartName)
nodiscard

Retrieve raster data for a single chart.

Parameters
chartNameName of the chart, as found in charts()
Returns
A QByteArray with webp-encoded raster data, or an empty QByteArray on error.

◆ name()

QString FileFormats::VACCollection::name ( ) const
inlinenodiscard

Name of the collection.

Returns
Human-readable name (e.g. "France"), or an empty string on error.

Definition at line 96 of file VACCollection.h.


The documentation for this class was generated from the following file: