![]() |
Mapper
0.9.0
API documentation
|
An Exporter to geospatial vector data supported by OGR. More...
#include <ogr_file_format_p.h>
Public Types | |
enum | OgrQuirk { GeorefOptional = 0x01, NeedsWgs84 = 0x02, SingleLayer = 0x04, UseLayerField = 0x08 } |
Quirks for OGR drivers. More... | |
Public Member Functions | |
OgrFileExport (const QString &path, const Map *map, const MapView *view) | |
A type which handles OR-combinations of OGR driver quirks. More... | |
~OgrFileExport () override | |
bool | supportsQIODevice () const noexcept override |
Returns true when the importer/exporter supports QIODevice. More... | |
bool | exportImplementation () override |
Actual implementation of the export. More... | |
![]() | |
Exporter (const QString &path, const Map *map, const MapView *view) | |
Creates a new Exporter with the given path, map, and view. More... | |
~Exporter () override | |
Destroys the current Exporter. More... | |
bool | doExport () |
Exports the map and view. More... | |
![]() | |
ImportExport (QIODevice *device=nullptr) | |
Creates a new importer or exporter with the given IO device. More... | |
ImportExport (const ImportExport &)=delete | |
ImportExport (ImportExport &&)=delete | |
virtual | ~ImportExport () |
Destroys an importer or exporter. More... | |
QIODevice * | device () const noexcept |
Returns the input device if it has been set or created. More... | |
void | setDevice (QIODevice *device) |
Sets a custom input device to be used for import. More... | |
void | setOption (const QString &name, const QVariant &value) |
Sets an option in this importer or exporter. More... | |
QVariant | option (const QString &name) const |
Retrieves the value of an option in this instance. More... | |
void | addWarning (const QString &str) |
Adds a string to the current list of warnings. More... | |
const std::vector< QString > & | warnings () const noexcept |
Returns the current list of warnings collected by this object. More... | |
Protected Member Functions | |
std::vector< const Symbol * > | symbolsForExport () const |
void | addPointsToLayer (OGRLayerH layer, const std::function< bool(const Object *)> &condition) |
void | addTextToLayer (OGRLayerH layer, const std::function< bool(const Object *)> &condition) |
void | addLinesToLayer (OGRLayerH layer, const std::function< bool(const Object *)> &condition) |
void | addAreasToLayer (OGRLayerH layer, const std::function< bool(const Object *)> &condition) |
OGRLayerH | createLayer (const char *layer_name, OGRwkbGeometryType type) |
void | populateStyleTable (const std::vector< const Symbol *> &symbols) |
void | setupGeoreferencing (GDALDriverH po_driver) |
void | setupQuirks (GDALDriverH po_driver) |
Static Protected Member Functions | |
static QByteArray | symbolId (const Symbol *symbol) |
Additional Inherited Members | |
![]() | |
const QString | path |
The output path. More... | |
const Map *const | map |
The Map to import or export. More... | |
const MapView *const | view |
The MapView to import or export. More... | |
An Exporter to geospatial vector data supported by OGR.
OGR needs to know the filename. As well, it doesn't use a QIODevice, but rather uses the filename directly.
Quirks for OGR drivers.
Each quirk shall use a distinct bit so that they may be OR-combined.
OpenOrienteering::OgrFileExport::OgrFileExport | ( | const QString & | path, |
const Map * | map, | ||
const MapView * | view | ||
) |
A type which handles OR-combinations of OGR driver quirks.
|
overridedefault |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
overridevirtual |
Actual implementation of the export.
Exporters which support input from QIODevice shall use the device(). They must not open or close the device.
If information might be lost in the export, a message shall be recorded by calling addWarning() with a translated, useful description of the issue. If a fatal error is encountered, then this method may either throw an exception, or log an error message with addWarning() and return false.
There is no default implementation.
Implements OpenOrienteering::Exporter.
|
protected |
|
protected |
Only certain drivers work without georeferencing info. GeorefOptional based on http://www.gdal.org/ogr_formats.html as of March 5, 2018
|
protected |
|
overridevirtualnoexcept |
Returns true when the importer/exporter supports QIODevice.
The default implementation returns true
. Some exporters or importers might wish to use other ways of accessing the output/input path. In these cases, the default implementation should be overwritten to return false
.
Reimplemented from OpenOrienteering::ImportExport.
|
inlinestaticprotected |
|
protected |