NDEVR
API Documentation
GeoTiffFactory

Reads and writes GeoTIFF files (elevation, orthophoto, multispectral) using the IOFactory interface. More...

Inheritance diagram for GeoTiffFactory:
[legend]
Collaboration diagram for GeoTiffFactory:
[legend]

Public Member Functions

bool canRead (const FactoryParameters &file) override
 Checks whether the given factory parameters describe a readable GeoTIFF.
bool canRead (const File &file) override
 Checks whether the given file can be read as a GeoTIFF.
FactoryOptions defaultReadOptions (const FactoryParameters &file) const override
 Returns the default read options for GeoTIFF files.
FactoryFeatures factoryFeatures (const FactoryParameters &file, bool is_read) const override
 Returns the supported factory features for the given file.
void getSupportedFormats (Buffer< FileFormat > &formats, bool is_read) override
 Populates the list of supported GeoTIFF file formats.
virtual bool isAutoEnabled () const
 Checks whether this factory is automatically enabled.
bool readFile (FactoryParameters &file) override
 Reads a GeoTIFF file into the design model.
bool writeFile (FactoryParameters &file) override
 Writes design data to a GeoTIFF file.
Public Member Functions inherited from IOFactory
 IOFactory (const StringView &factory_name)
 Constructs an IOFactory with the given factory name.
virtual ~IOFactory ()
 Virtual destructor.
virtual bool canRead (const FileFormat &file)
 Checks whether this factory can read the given file format.
virtual bool canWrite (const FactoryParameters &file)
 Checks whether this factory can write using the given FactoryParameters.
virtual bool canWrite (const File &file)
 Checks whether this factory can write the given file.
virtual bool canWrite (const FileFormat &file)
 Checks whether this factory can write the given file format.
virtual FactoryOptions defaultWriteOptions (const FactoryParameters &file) const
 Returns the default write options for the given factory parameters.
virtual bool determineExtension (const File &file, String &extension)
 Attempts to determine the file extension for the given file.
String factoryReadAppFeature () const
 Returns the application feature string required for read operations.
String factoryWriteAppFeature () const
 Returns the application feature string required for write operations.
virtual Buffer< UUIDfilterModelsToExport (Buffer< UUID > models_to_check, const DesignObjectLookup *lookup, const FileFormat &export_format) const
 Filters a list of model UUIDs to only those that can be exported in the given format.
virtual String getIcon (const File &file)
 Returns the icon name associated with the given file type.
void getSupportedFormats (Buffer< FileFormat > &formats)
 Populates the given buffer with all supported file formats (both read and write).
virtual void getSupportedFormats (Buffer< FileFormat > &formats, const File &file)
 Populates the given buffer with formats supported for the specified file.
virtual void getSupportedFormats (Buffer< FileFormat > &formats, DesignObjectLookup *lookup, const Buffer< UUID > &models)
 Populates the given buffer with formats supported for writing the specified models.
virtual void getSupportedFormatsByModelType (Buffer< FileFormat > &formats, bool is_read, const StringView &model_type)
 Populates the given buffer with formats matching a specific model type.
virtual void getSupportedFormatsForExtension (Buffer< FileFormat > &formats, bool is_read, const StringView &extension)
 Populates the given buffer with formats matching a specific file extension.
virtual bool isFactoryEnabled (bool is_read) const
 Checks whether this factory is enabled for reading or writing.
const Stringname () const
 Returns the name of this factory.
Buffer< UUIDreadFileWithDefaultSettings (const File &file, DesignObjectLookup *lookup)
 Reads a file using default settings and returns the UUIDs of the created models.
Buffer< ScenereadScenesFromFile (const File &file)
 Reads scenes from a file and returns them as a buffer of Scene objects.
void throwIfNotEnabled (bool is_read)
 Throws an exception if the factory is not enabled for the given operation direction.
virtual bool updateFromFile (const FactoryParameters &file, const FactoryOptions &old_options)
 Updates the factory parameters from a file, comparing against old options.
bool writeScenesToFile (const File &file, const Buffer< Scene > &scene)
 Writes a buffer of scenes to a file.

Static Public Member Functions

static GeoTiffFactory * DefaultFactory ()
 Returns the singleton GeoTiffFactory instance.
static constexpr StringView FactoryID ()
 Returns the unique identifier string for this factory.
static bool HasGeoTiffTags (TIFF *tif)
 Checks whether the given TIFF handle contains GeoTIFF tags.
static GeoTiffInfo ParseGeoTiffTags (TIFF *tif)
 Parses GeoTIFF tags from a TIFF handle.
static UUID ResolveProjection (const GeoTiffInfo &info)
 Resolves the coordinate reference system projection from GeoTIFF info.
Static Public Member Functions inherited from IOFactory
static void EnableExtension (const StringView &extension, const StringView &read_password, const StringView &write_password)
 Enables a specific file extension with the given read and write passwords.
static void EnableFactory (const StringView &factory, const StringView &read_password, const StringView &write_password)
 Enables a factory by name with the given read and write passwords.
static void EnableFactory (IOFactory *factory, const StringView &read_password, const StringView &write_password)
 Registers an IOFactory instance with the system, enabling it for read and/or write.

Detailed Description

Reads and writes GeoTIFF files (elevation, orthophoto, multispectral) using the IOFactory interface.


Definition at line 101 of file GeoTiffFactory.h.

Member Function Documentation

◆ canRead() [1/2]

bool GeoTiffFactory::canRead ( const FactoryParameters & file)
overridevirtual

Checks whether the given factory parameters describe a readable GeoTIFF.

Parameters
[in]fileThe factory parameters to check.
Returns
True if readable.

Reimplemented from IOFactory.

◆ canRead() [2/2]

bool GeoTiffFactory::canRead ( const File & file)
overridevirtual

Checks whether the given file can be read as a GeoTIFF.

Parameters
[in]fileThe file to check.
Returns
True if the file is a readable GeoTIFF.

Reimplemented from IOFactory.

◆ DefaultFactory()

GeoTiffFactory * GeoTiffFactory::DefaultFactory ( )
static

Returns the singleton GeoTiffFactory instance.

Returns
A pointer to the default factory.

◆ defaultReadOptions()

FactoryOptions GeoTiffFactory::defaultReadOptions ( const FactoryParameters & file) const
overridevirtual

Returns the default read options for GeoTIFF files.

Parameters
[in]fileThe factory parameters for context.
Returns
The default FactoryOptions for reading.

Reimplemented from IOFactory.

◆ factoryFeatures()

FactoryFeatures GeoTiffFactory::factoryFeatures ( const FactoryParameters & file,
bool is_read ) const
overridevirtual

Returns the supported factory features for the given file.

Parameters
[in]fileThe factory parameters for context.
[in]is_readWhether features are for reading (true) or writing (false).
Returns
The FactoryFeatures descriptor.

Implements IOFactory.

◆ FactoryID()

constexpr StringView GeoTiffFactory::FactoryID ( )
inlinestaticconstexpr

Returns the unique identifier string for this factory.

Returns
The factory ID string.

Definition at line 141 of file GeoTiffFactory.h.

◆ getSupportedFormats()

void GeoTiffFactory::getSupportedFormats ( Buffer< FileFormat > & formats,
bool is_read )
overridevirtual

Populates the list of supported GeoTIFF file formats.

Parameters
[in]formatsThe buffer to populate.
[in]is_readWhether to list read formats (true) or write formats (false).

Implements IOFactory.

◆ HasGeoTiffTags()

bool GeoTiffFactory::HasGeoTiffTags ( TIFF * tif)
static

Checks whether the given TIFF handle contains GeoTIFF tags.

Parameters
[in]tifThe TIFF handle to check.
Returns
True if GeoTIFF tags are present.

◆ isAutoEnabled()

virtual bool GeoTiffFactory::isAutoEnabled ( ) const
virtual

Checks whether this factory is automatically enabled.

Returns
True if auto-enabled.

Reimplemented from IOFactory.

◆ ParseGeoTiffTags()

GeoTiffInfo GeoTiffFactory::ParseGeoTiffTags ( TIFF * tif)
static

Parses GeoTIFF tags from a TIFF handle.

Parameters
[in]tifThe TIFF handle to parse.
Returns
The parsed GeoTiffInfo structure.

◆ readFile()

bool GeoTiffFactory::readFile ( FactoryParameters & file)
overridevirtual

Reads a GeoTIFF file into the design model.

Parameters
[in]fileThe factory parameters describing the file to read.
Returns
True on success.

Implements IOFactory.

◆ ResolveProjection()

UUID GeoTiffFactory::ResolveProjection ( const GeoTiffInfo & info)
static

Resolves the coordinate reference system projection from GeoTIFF info.

Parameters
[in]infoThe parsed GeoTIFF metadata.
Returns
The UUID of the resolved projection.

◆ writeFile()

bool GeoTiffFactory::writeFile ( FactoryParameters & file)
overridevirtual

Writes design data to a GeoTIFF file.

Parameters
[in]fileThe factory parameters describing the output.
Returns
True on success.

Implements IOFactory.


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