Mapper  0.9.0
API documentation
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
OpenOrienteering::WorldFile Struct Reference

Handles pixel-to-world transformations given by world files. More...

#include <world_file.h>

Public Member Functions

 WorldFile () noexcept
 Creates an default world file. More...
 
 WorldFile (double xw, double xh, double yw, double yh, double dx, double dy) noexcept
 Creates a world file with the given parameters (in-order). More...
 
 WorldFile (const QTransform &wld) noexcept
 Creates a world file from a QTransform. More...
 
 WorldFile (const WorldFile &) noexcept=default
 
 WorldFile (WorldFile &&) noexcept=default
 
 ~WorldFile ()=default
 
WorldFileoperator= (const WorldFile &) noexcept=default
 
WorldFileoperator= (WorldFile &&) noexcept=default
 
 operator QTransform () const
 Returns a QTransform from pixels to projected coordinates, with (0,0) being the top-left corner of the top left pixel. More...
 
bool load (const QString &path)
 Tries to load the given path as world file. More...
 
bool save (const QString &path) const
 Writes the world file to the given path. More...
 
bool tryToLoadForImage (const QString &image_path)
 Tries to find and load a world file for the given image path. More...
 

Static Public Member Functions

static QString pathForImage (const QString &image_path)
 Returns the proposed world file path for the given image path. More...
 

Public Attributes

double parameters [6]
 The six world file parameters, order as in the text file. More...
 

Detailed Description

Handles pixel-to-world transformations given by world files.

See also
https://en.wikipedia.org/wiki/World_file

Constructor & Destructor Documentation

◆ WorldFile() [1/5]

OpenOrienteering::WorldFile::WorldFile ( )
noexcept

Creates an default world file.

◆ WorldFile() [2/5]

OpenOrienteering::WorldFile::WorldFile ( double  xw,
double  xh,
double  yw,
double  yh,
double  dx,
double  dy 
)
noexcept

Creates a world file with the given parameters (in-order).

◆ WorldFile() [3/5]

OpenOrienteering::WorldFile::WorldFile ( const QTransform wld)
explicitnoexcept

Creates a world file from a QTransform.

◆ WorldFile() [4/5]

OpenOrienteering::WorldFile::WorldFile ( const WorldFile )
defaultnoexcept

◆ WorldFile() [5/5]

OpenOrienteering::WorldFile::WorldFile ( WorldFile &&  )
defaultnoexcept

◆ ~WorldFile()

OpenOrienteering::WorldFile::~WorldFile ( )
default

Member Function Documentation

◆ load()

bool OpenOrienteering::WorldFile::load ( const QString path)

Tries to load the given path as world file.

Returns true on success and sets loaded to true or false.

◆ operator QTransform()

OpenOrienteering::WorldFile::operator QTransform ( ) const

Returns a QTransform from pixels to projected coordinates, with (0,0) being the top-left corner of the top left pixel.

◆ operator=() [1/2]

WorldFile& OpenOrienteering::WorldFile::operator= ( const WorldFile )
defaultnoexcept

◆ operator=() [2/2]

WorldFile& OpenOrienteering::WorldFile::operator= ( WorldFile &&  )
defaultnoexcept

◆ pathForImage()

QString OpenOrienteering::WorldFile::pathForImage ( const QString image_path)
static

Returns the proposed world file path for the given image path.

◆ save()

bool OpenOrienteering::WorldFile::save ( const QString path) const

Writes the world file to the given path.

◆ tryToLoadForImage()

bool OpenOrienteering::WorldFile::tryToLoadForImage ( const QString image_path)

Tries to find and load a world file for the given image path.

Member Data Documentation

◆ parameters

double OpenOrienteering::WorldFile::parameters[6]

The six world file parameters, order as in the text file.


The documentation for this struct was generated from the following files: