Qt Virtual Chart Table (QVCT)
|
Generic GDAL-based dataset. More...
#include <charts/CChartGDAL.hpp>
Public Types | |
enum | EColorEncoding { GRAY , GRAY_U16 , GRAY_S16 , GRAY_U32 , GRAY_S32 , GRAY_F32 , GRAY_F64 , PALETTE_GRAY , PALETTE_RGB , PALETTE_CMYK , PALETTE_HSL , ARGB , RGB , YUV } |
Underlying GDAL dataset color encoding IDs. More... | |
Public Member Functions | |
QVCT::EStatus | getStatus () const |
Returns the chart internal status (after constructing object) More... | |
QString | getFileName () const |
Returns the chart (GDAL dataset) file name. More... | |
QRect | getDatGeometry () const |
Returns the chart (GDAL dataset) geometry (size) More... | |
EColorEncoding | getColorEncoding () const |
Returns the chart (GDAL dataset) color encoding. More... | |
QPointF | getDatPosition () const |
Returns the last drawn chart (GDAL dataset) center pixel position. More... | |
double | getZoom () const |
Returns the last drawn chart (GDAL dataset) zoom factor. More... | |
CDataPosition | toGeoPosition (const QPointF &_rqPointFDatPosition) const |
Converts the given chart pixel position to geographical position. More... | |
QPointF | toDatPosition (const CDataPosition &_roGeoPosition) const |
Converts the given (geographical) position [long,lat,elev] to chart (GDAL dataset) point [px]. More... | |
double | getResolution (const QPointF &_rqPointFDatPosition) const |
Returns the resolution at given chart (GDAL dataset) point [px], in meters per pixel [m/px]. More... | |
void | draw (QPainter *_pqPainter, const QPointF &_rqPointFDatPosition, double _fdZoom) |
Draws chart, centered on given chart (GDAL dataset) point [px] and zoomed according to given factor. More... | |
void | move (const QPointF &_rqPointFDatPosition, double _fdZoom) |
Moves the chart, centered on given chart (GDAL dataset) point [px] and zoomed according to given factor. More... | |
Protected Member Functions | |
CChartGDAL () | |
virtual | ~CChartGDAL () |
void | open (const QString &_rqsFileName) |
Opens the underlying GDAL dataset. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< quint16 > &_rqVector) const |
Rasterizes UInt16 buffer. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< qint16 > &_rqVector) const |
Rasterizes Int16 buffer. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< quint32 > &_rqVector) const |
Rasterizes UInt32 buffer. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< qint32 > &_rqVector) const |
Rasterizes Int32 buffer. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< float > &_rqVector) const |
Rasterizes Float32 buffer. More... | |
virtual void | rasterBuffer (QImage *_pqImage, const QVector< double > &_rqVector) const |
Rasterizes Float64 buffer. More... | |
Protected Attributes | |
QVCT::EStatus | eStatus |
Chart internal status. More... | |
QString | qsFileName |
Chart (GDAL dataset) file name. More... | |
QRect | qRectGeometry |
Chart (GDAL dataset) geometry (size) More... | |
EColorEncoding | eColorEncoding |
Chart (GDAL dataset) color encoding. More... | |
QPointF | qPointFDatPositionWished |
Last drawn chart (GDAL dataset) center pixel position (requested by user) More... | |
QPointF | qPointFDatPositionActual |
Last drawn chart (GDAL dataset) center pixel position (actually rendered) More... | |
double | fdZoomWished |
Last drawn chart (GDAL dataset) zoom factor (requested by user) More... | |
double | fdZoomActual |
Last drawn chart (GDAL dataset) zoom factor (actually rendered) More... | |
GDALDataset * | poGDALDataset |
Underlying GDAL dataset. More... | |
void * | pGDALProjectionTransformer |
Underlying GDAL dataset projection transformer (to internal WGS84) More... | |
int * | piGDALBandMap |
Underlying GDAL dataset band mapping (for ARGB/RGB/YUV color encodings) More... | |
QPixmap | qPixmapBuffer |
Pixmap buffer where the chart (GDAL dataset) is rendered (rasterized) More... | |
QVector< QRgb > | qColorTable |
Color table (for GRAY/PALETTE_* color encodings) More... | |
Generic GDAL-based dataset.
This class defines the generic resources to wrap a GDAL dataset and use it as a chart along Qt drawing resources (QPainter, QImage, etc.).
The GDAL dataset internal projection data are used to convert pixel to geographical coordinates and vice-versa (using QVCT internal Longitude/Latitude WGS84 reference).
In order to improve I/O performances, rendering (rasterization) is performed only when necessary (the rendering buffer being cached between calls to the drawing primitive).
Definition at line 52 of file CChartGDAL.hpp.
Underlying GDAL dataset color encoding IDs.
Enumerator | |
---|---|
GRAY | |
GRAY_U16 | |
GRAY_S16 | |
GRAY_U32 | |
GRAY_S32 | |
GRAY_F32 | |
GRAY_F64 | |
PALETTE_GRAY | |
PALETTE_RGB | |
PALETTE_CMYK | |
PALETTE_HSL | |
ARGB | |
RGB | |
YUV |
Definition at line 61 of file CChartGDAL.hpp.
|
protected |
Definition at line 47 of file CChartGDAL.cpp.
|
protectedvirtual |
Definition at line 54 of file CChartGDAL.cpp.
|
protected |
Opens the underlying GDAL dataset.
Definition at line 61 of file CChartGDAL.cpp.
|
inline |
Returns the chart internal status (after constructing object)
Definition at line 132 of file CChartGDAL.hpp.
|
inline |
Returns the chart (GDAL dataset) file name.
Definition at line 134 of file CChartGDAL.hpp.
|
inline |
Returns the chart (GDAL dataset) geometry (size)
Definition at line 136 of file CChartGDAL.hpp.
|
inline |
Returns the chart (GDAL dataset) color encoding.
Definition at line 138 of file CChartGDAL.hpp.
|
inline |
Returns the last drawn chart (GDAL dataset) center pixel position.
Definition at line 140 of file CChartGDAL.hpp.
|
inline |
Returns the last drawn chart (GDAL dataset) zoom factor.
Definition at line 142 of file CChartGDAL.hpp.
CDataPosition CChartGDAL::toGeoPosition | ( | const QPointF & | _rqPointFDatPosition | ) | const |
Converts the given chart pixel position to geographical position.
Definition at line 356 of file CChartGDAL.cpp.
QPointF CChartGDAL::toDatPosition | ( | const CDataPosition & | _roGeoPosition | ) | const |
Converts the given (geographical) position [long,lat,elev] to chart (GDAL dataset) point [px].
Definition at line 368 of file CChartGDAL.cpp.
double CChartGDAL::getResolution | ( | const QPointF & | _rqPointFDatPosition | ) | const |
Returns the resolution at given chart (GDAL dataset) point [px], in meters per pixel [m/px].
Definition at line 383 of file CChartGDAL.cpp.
void CChartGDAL::draw | ( | QPainter * | _pqPainter, |
const QPointF & | _rqPointFDatPosition, | ||
double | _fdZoom | ||
) |
Draws chart, centered on given chart (GDAL dataset) point [px] and zoomed according to given factor.
Definition at line 392 of file CChartGDAL.cpp.
void CChartGDAL::move | ( | const QPointF & | _rqPointFDatPosition, |
double | _fdZoom | ||
) |
Moves the chart, centered on given chart (GDAL dataset) point [px] and zoomed according to given factor.
Definition at line 683 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes UInt16 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 690 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes Int16 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 699 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes UInt32 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 708 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes Int32 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 717 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes Float32 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 726 of file CChartGDAL.cpp.
|
protectedvirtual |
Rasterizes Float64 buffer.
Reimplemented in CChartGDALElevation.
Definition at line 735 of file CChartGDAL.cpp.
|
protected |
Chart internal status.
Definition at line 75 of file CChartGDAL.hpp.
|
protected |
Chart (GDAL dataset) file name.
Definition at line 77 of file CChartGDAL.hpp.
|
protected |
Chart (GDAL dataset) geometry (size)
Definition at line 79 of file CChartGDAL.hpp.
|
protected |
Chart (GDAL dataset) color encoding.
Definition at line 81 of file CChartGDAL.hpp.
|
protected |
Last drawn chart (GDAL dataset) center pixel position (requested by user)
Definition at line 83 of file CChartGDAL.hpp.
|
protected |
Last drawn chart (GDAL dataset) center pixel position (actually rendered)
Definition at line 85 of file CChartGDAL.hpp.
|
protected |
Last drawn chart (GDAL dataset) zoom factor (requested by user)
Definition at line 87 of file CChartGDAL.hpp.
|
protected |
Last drawn chart (GDAL dataset) zoom factor (actually rendered)
Definition at line 89 of file CChartGDAL.hpp.
|
protected |
Underlying GDAL dataset.
Definition at line 96 of file CChartGDAL.hpp.
|
protected |
Underlying GDAL dataset projection transformer (to internal WGS84)
Definition at line 98 of file CChartGDAL.hpp.
|
protected |
Underlying GDAL dataset band mapping (for ARGB/RGB/YUV color encodings)
Definition at line 100 of file CChartGDAL.hpp.
|
protected |
Pixmap buffer where the chart (GDAL dataset) is rendered (rasterized)
Definition at line 107 of file CChartGDAL.hpp.
|
protected |
Color table (for GRAY/PALETTE_* color encodings)
Definition at line 109 of file CChartGDAL.hpp.