Skip to content

Commit c73ffbe

Browse files
author
gsherman
committedJan 11, 2008
Merge of raster transparency branch
git-svn-id: http://svn.osgeo.org/qgis/trunk@7926 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 15bd5a9 commit c73ffbe

23 files changed

+6082
-3273
lines changed
 

‎CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROJECT(qgis0.9.2)
1+
PROJECT(qgis0.9.1-raster)
22

33
# TODO:
44
# - install includes for libs

‎debian/changelog‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<<<<<<< .trabalho
2+
qgis (0.9.1raster+svn20071111) gutsy; urgency=low
3+
4+
* Initial test build for gutsy
5+
6+
-- Tim Sutton <tim@linfiniti.com> Sun, 11 Nov 2007 13:20:54 -0200
7+
8+
=======
19
qgis (0.9.1) gutsy; urgency=low
210

311
* This is a bug fix release
@@ -10,6 +18,7 @@ qgis (0.9.1) gutsy; urgency=low
1018

1119
-- Tim Sutton <tim@linfiniti.com> Fri, 07 Dec 2007 01:36:55 -0200
1220

21+
>>>>>>> .mesclagem-direita.r7786
1322
qgis (0.9.0) gutsy; urgency=low
1423

1524
* Quantum GIS 0.9.0 'Ganymede' release

‎debian/files‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
qgis_0.9.0_i386.deb science extra
2-
libqgis1_0.9.0_i386.deb science extra
3-
libqgis1-dev_0.9.0_i386.deb science extra
4-
qgis-plugin-grass_0.9.0_i386.deb science extra
1+
qgis_0.9.1raster+svn20071111_i386.deb science extra
2+
libqgis1_0.9.1raster+svn20071111_i386.deb science extra
3+
libqgis1-dev_0.9.1raster+svn20071111_i386.deb science extra
4+
qgis-plugin-grass_0.9.1raster+svn20071111_i386.deb science extra

‎debian/rules‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ CMakeCache.txt: CMakeLists.txt
3030
# Add here commands to configure the package.
3131
uudecode -o $(CURDIR)/src/plugins/georeferencer/pencil.png $(CURDIR)/debian/pencil.uu
3232
cmake -D CMAKE_INSTALL_PREFIX=/usr \
33-
-D GDAL_INCLUDE_DIR=/usr/include/gdal \
34-
-D GDAL_LIBRARY=/usr/lib/libgdal1.3.2.so \
3533
.
3634

3735
build: patch build-stamp

‎python/core/core.sip‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
%Include qgscolortable.sip
1515
%Include qgscontexthelp.sip
1616
%Include qgscontinuouscolorrenderer.sip
17+
%Include qgscontrastenhancement.sip
18+
%Include qgscontrastenhancementfunction.sip
1719
%Include qgscoordinatetransform.sip
1820
%Include qgsdataprovider.sip
1921
%Include qgsdatasourceuri.sip
@@ -39,6 +41,9 @@
3941
%Include qgsrasterdataprovider.sip
4042
%Include qgsrasterlayer.sip
4143
%Include qgsrasterpyramid.sip
44+
%Include qgsrastershader.sip
45+
%Include qgsrastershaderfunction.sip
46+
%Include qgsrastertransparency.sip
4247
%Include qgsrasterviewport.sip
4348
%Include qgsrect.sip
4449
%Include qgsrenderer.sip

‎python/core/qgsrasterbandstats.sip‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,29 @@ class QgsRasterBandStats
1212
/** \brief The name of the band that these stats belong to. */
1313
QString bandName;
1414
/** \brief The gdal band number (starts at 1)*/
15-
int bandNoInt;
15+
int bandNo;
1616
/** \brief A flag to indicate whether this RasterBandStats struct
1717
* is completely populated */
1818
bool statsGatheredFlag;
1919
/** \brief The minimum cell value in the raster band. NO_DATA values
2020
* are ignored. This does not use the gdal GetMinimum function. */
21-
double minValDouble;
21+
double minVal;
2222
/** \brief The maximum cell value in the raster band. NO_DATA values
2323
* are ignored. This does not use the gdal GetMaximmum function. */
24-
double maxValDouble;
24+
double maxVal;
2525
/** \brief The range is the distance between min & max. */
26-
double rangeDouble;
26+
double range;
2727
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
28-
double meanDouble;
28+
double mean;
2929
/** \brief The sum of the squares. Used to calculate standard deviation. */
30-
double sumSqrDevDouble;
30+
double sumSqrDev;
3131
/** \brief The standard deviation of the cell values. */
32-
double stdDevDouble;
32+
double stdDev;
3333
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
34-
double sumDouble;
34+
double sum;
3535
/** \brief The number of cells in the band. Equivalent to height x width.
3636
* TODO: check if NO_DATA are excluded!*/
37-
int elementCountInt;
37+
int elementCount;
3838
/** \brief Store the histogram for a given layer */
3939
typedef QVector<int> HistogramVector;
4040
//HistogramVector * histogramVector;

‎python/core/qgsrasterlayer.sip‎

Lines changed: 144 additions & 168 deletions
Large diffs are not rendered by default.

‎python/core/qgsrasterpyramid.sip‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ class QgsRasterPyramid
77

88
public:
99
/** \brief The pyramid level as implemented in gdal (level 2 is half orignal raster size etc) */
10-
int levelInt;
10+
int level;
1111
/** \brief XDimension for this pyramid layer */
12-
int xDimInt;
12+
int xDim;
1313
/** \brief YDimension for this pyramid layer */
14-
int yDimInt;
14+
int yDim;
1515
/** \brief Whether the pyramid layer has been built yet */
1616
bool existsFlag;
1717

‎python/core/qgsrasterviewport.sip‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,36 @@ struct QgsRasterViewPort
77

88
/** \brief The offset from the left hand edge of the raster for the rectangle that will be drawn to screen.
99
* TODO Check this explanation is correc!*/
10-
int rectXOffsetInt;
10+
int rectXOffset;
1111
float rectXOffsetFloat;
1212
/** \brief The offset from the bottom edge of the raster for the rectangle that will be drawn to screen.
1313
* TODO Check this explanation is correc!*/
14-
int rectYOffsetInt;
14+
int rectYOffset;
1515
float rectYOffsetFloat;
1616
/** \brief Lower left X dimension of clipped raster image in raster pixel space.
1717
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
1818
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
1919
* whatever the screen coordinates are (e.g. a 600x800 display window) */
20-
double clippedXMinDouble;
20+
double clippedXMin;
2121
/** \brief Top Right X dimension of clipped raster image in raster pixel space.
2222
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
2323
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
2424
* whatever the screen coordinates are (e.g. a 600x800 display window) */
25-
double clippedXMaxDouble;
25+
double clippedXMax;
2626
/** \brief Lower left Y dimension of clipped raster image in raster pixel space.
2727
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
2828
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
2929
* whatever the screen coordinates are (e.g. a 600x800 display window) */
30-
double clippedYMinDouble;
30+
double clippedYMin;
3131
/** \brief Top Right X dimension of clipped raster image in raster pixel space.
3232
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
3333
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
3434
* whatever the screen coordinates are (e.g. a 600x800 display window) */
35-
double clippedYMaxDouble;
36-
/** \brief Distance in pixels from clippedXMinDouble to clippedXMaxDouble. */
37-
int clippedWidthInt;
38-
/** \brief Distance in pixels from clippedYMinDouble to clippedYMaxDouble */
39-
int clippedHeightInt;
35+
double clippedYMax;
36+
/** \brief Distance in pixels from clippedXMin to clippedXMax. */
37+
int clippedWidth;
38+
/** \brief Distance in pixels from clippedYMin to clippedYMax */
39+
int clippedHeight;
4040
/** \brief Coordinate (in geographic coordinate system) of top left corner of the part of the raster that
4141
* is to be rendered.*/
4242
QgsPoint topLeftPoint;
@@ -45,9 +45,9 @@ struct QgsRasterViewPort
4545
QgsPoint bottomRightPoint;
4646
/** \brief Distance in map units from left edge to right edge for the part of the raster that
4747
* is to be rendered.*/
48-
int drawableAreaXDimInt;
48+
int drawableAreaXDim;
4949
/** \brief Distance in map units from bottom edge to top edge for the part of the raster that
5050
* is to be rendered.*/
51-
int drawableAreaYDimInt;
51+
int drawableAreaYDim;
5252
};
5353

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +0,0 @@
1-
#TODO: Need to configure cmake to run pyrcc4 and pyuic4 as required when the resource
2-
# file or the ui change
3-
SET(INSTALLER_FILES
4-
icon.png
5-
__init__.py
6-
mapserverexportdialog.py
7-
mapserverexport.py
8-
ms_export.py
9-
resources.py
10-
ui_mapserverexport.py
11-
)
12-
13-
INSTALL(FILES ${INSTALLER_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/qgis/python/plugins/mapserver_export)

‎src/app/qgisapp.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,7 @@ void QgisApp::createStatusBar()
10761076
mScaleLabel->setAlignment(Qt::AlignCenter);
10771077
mScaleLabel->setFrameStyle(QFrame::NoFrame);
10781078
mScaleLabel->setText(tr("Scale "));
1079+
QToolTip::add (mScaleLabel, tr("Current map scale"));
10791080
statusBar()->addWidget(mScaleLabel, 0,true);
10801081

10811082
mScaleEdit = new QLineEdit(QString(),statusBar());

‎src/app/qgsrasterlayerproperties.cpp‎

Lines changed: 2003 additions & 441 deletions
Large diffs are not rendered by default.

‎src/app/qgsrasterlayerproperties.h‎

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,75 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
4444
void sync();
4545

4646
public slots:
47+
//TODO: Verify that these all need to be public
4748
/** \brief Applies the settings made in the dialog without closing the box */
4849
void apply();
49-
/** \brief slot executed when the transparency level changes. */
50-
void sliderTransparency_valueChanged( int );
51-
/** \brief slot executed when the max red level changes. */
52-
void on_rbtnSingleBand_toggled( bool );
53-
/** \brief slot executed when the three band radio button is pressed. */
54-
void on_rbtnThreeBand_toggled( bool );
5550
/** \brief this slot asks the rasterlayer to construct pyramids */
5651
void on_buttonBuildPyramids_clicked();
57-
/** \brief slot executed when user wishes to refresh raster histogram */
58-
void on_pbnHistRefresh_clicked();
59-
/** Override the SRS specified when the layer was loaded */
60-
void on_pbnChangeSpatialRefSys_clicked();
52+
/** \brief slot executed when user presses "Add Values From Display" button on the transparency page */
53+
void on_pbnAddValuesFromDisplay_clicked();
54+
/** \brief slot executed when user presses "Add Values Manually" button on the transparency page */
55+
void on_pbnAddValuesManually_clicked();
6156
/** Help button */
6257
void on_buttonBox_helpRequested();
63-
64-
signals:
65-
58+
/** Override the SRS specified when the layer was loaded */
59+
void on_pbnChangeSpatialRefSys_clicked();
60+
/** \brief slot executed when user wishes to reset noNoDataValue and transparencyTable to default value */
61+
void on_pbnDefaultValues_clicked();
62+
/** \brief slot executed when user wishes to export transparency values */
63+
void on_pbnExportTransparentPixelValues_clicked();
64+
/** \brief slot executed when user wishes to refresh raster histogram */
65+
void on_pbnHistRefresh_clicked();
66+
/** \brief slow executed when user wishes to import transparency values */
67+
void on_pbnImportTransparentPixelValues_clicked();
68+
/** \brief slot executed when user presses "Remove Selected Row" button on the transparency page */
69+
void on_pbnRemoveSelectedRow_clicked();
70+
/** \brief slot executed when the single band radio button is pressed. */
71+
void on_rbtnSingleBand_toggled( bool );
72+
/** \brief slot executed when the single band min max radio button is pressed. */
73+
void on_rbtnSingleBandMinMax_toggled( bool );
74+
/** \brief slot executed when the single band standard deviation radio button is pressed. */
75+
void on_rbtnSingleBandStdDev_toggled( bool );
76+
/** \brief slot executed when the three band radio button is pressed. */
77+
void on_rbtnThreeBand_toggled( bool );
78+
/** \brief slot executed when the three band min max radio button is pressed. */
79+
void on_rbtnThreeBandMinMax_toggled( bool );
80+
/** \brief slot executed when the three band standard deviation radio button is pressed. */
81+
void on_rbtnThreeBandStdDev_toggled( bool );
82+
/** \brief this slot clears min max values from gui */
83+
void sboxSingleBandStdDev_valueChanged(double);
84+
/** \brief this slot clears min max values from gui */
85+
void sboxThreeBandStdDev_valueChanged(double);
86+
/** \brief slot executed when the transparency level changes. */
87+
void sliderTransparency_valueChanged( int );
88+
/** \brief this slot sets StdDev switch box to 0.00 when user enters min max values */
89+
void userDefinedMinMax_textEdited(QString);
90+
91+
private slots:
92+
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
93+
void on_cboBlue_currentIndexChanged(const QString&);
94+
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
95+
void on_cboGray_currentIndexChanged(const QString&);
96+
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
97+
void on_cboGreen_currentIndexChanged(const QString&);
98+
/** This slow handles necessary interface modifiations (i.e., loading min max values) */
99+
void on_cboRed_currentIndexChanged(const QString&);
100+
/**The slot handles necessary interface modifications based when color map selected changes*/
101+
void on_cboxColorMap_currentIndexChanged(const QString&);
102+
/**The slot handles necessary interface modifications based when transparency band selection changes*/
103+
void on_cboxTransparencyLayer_currentIndexChanged(const QString&);
104+
/**This slot calculates classification values and colors for the tree widget on the colormap tab*/
105+
void on_mClassifyButton_clicked();
106+
/**This slot deletes the current class from the tree widget on the colormap tab*/
107+
void on_mDeleteEntryButton_clicked();
108+
/**Callback for double clicks on the colormap entry widget*/
109+
void handleColormapTreeWidgetDoubleClick(QTreeWidgetItem* item, int column);
110+
/**This slot loads the minimum and maximum values from the raster band and updates the gui*/
111+
void on_pbtnLoadMinMax_clicked();
112+
113+
114+
signals:
115+
66116
/** emitted when changes to layer were saved to update legend */
67117
void refreshLegend(QString layerID, bool expandItem);
68118

@@ -87,6 +137,28 @@ class QgsRasterLayerProperties : public QDialog, private Ui::QgsRasterLayerPrope
87137

88138
/** Id for context help */
89139
static const int context_id = 394441851;
140+
141+
/** \brief Clear the current transparency table and populate the table with the correct types for current drawing mode and data type*/
142+
void populateTransparencyTable();
143+
144+
/** \brief Verify values in custom min max line edits */
145+
bool validUserDefinedMinMax();
146+
147+
/**Restores the state of the colormap tab*/
148+
void syncColormapTab();
149+
150+
//Short circuit signal loop between min max field and stdDev spin box
151+
bool ignoreSpinBoxEvent;
152+
153+
//@TODO we should move these gradient generators somewhere more generic
154+
//so they can be used generically throughut the app
155+
QLinearGradient greenGradient();
156+
QLinearGradient redGradient();
157+
QLinearGradient blueGradient();
158+
QLinearGradient grayGradient();
159+
QLinearGradient highlightGradient();
160+
qreal mGradientHeight;
161+
qreal mGradientWidth;
90162
};
91163

92164
#endif

‎src/core/CMakeLists.txt‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,19 @@ qgsvectordataprovider.cpp
4949
qgsvectorfilewriter.cpp
5050
qgsvectorlayer.cpp
5151

52+
raster/qgscliptominmaxenhancement.cpp
53+
raster/qgscolorrampshader.cpp
5254
raster/qgscolortable.cpp
55+
raster/qgscontrastenhancement.cpp
56+
raster/qgscontrastenhancementfunction.cpp
57+
raster/qgsfreakoutshader.cpp
58+
raster/qgslinearminmaxenhancement.cpp
59+
raster/qgslinearminmaxenhancementwithclip.cpp
60+
raster/qgspseudocolorshader.cpp
5361
raster/qgsrasterlayer.cpp
62+
raster/qgsrastertransparency.cpp
63+
raster/qgsrastershader.cpp
64+
raster/qgsrastershaderfunction.cpp
5465

5566
renderer/qgscontinuouscolorrenderer.cpp
5667
renderer/qgsgraduatedsymbolrenderer.cpp
@@ -224,9 +235,20 @@ qgsvectordataprovider.h
224235
qgsvectorfilewriter.h
225236
qgsvectorlayer.h
226237

238+
raster/qgscliptominmaxenhancement.h
239+
raster/qgscolorrampshader.h
227240
raster/qgscolortable.h
241+
raster/qgscontrastenhancement.h
242+
raster/qgscontrastenhancementfunction.h
243+
raster/qgsfreakoutshader.h
244+
raster/qgslinearminmaxenhancement.h
245+
raster/qgslinearminmaxenhancementwithclip.h
246+
raster/qgspseudocolorshader.h
228247
raster/qgsrasterbandstats.h
229248
raster/qgsrasterlayer.h
249+
raster/qgsrastertransparency.h
250+
raster/qgsrastershader.h
251+
raster/qgsrastershaderfunction.h
230252

231253
renderer/qgscontinuouscolorrenderer.h
232254
renderer/qgsgraduatedsymbolrenderer.h

‎src/core/qgsprojectfiletransform.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ bool QgsProjectFileTransform::updateRevision(QgsProjectVersion newVersion)
5555
void QgsProjectFileTransform::dump()
5656
{
5757
QgsDebugMsg(QString("Current project file version is %1.%2.%3\n")
58-
.arg(mCurrentVersion.major())
59-
.arg(mCurrentVersion.minor())
60-
.arg(mCurrentVersion.sub()));
58+
.arg(mCurrentVersion.majorVersion())
59+
.arg(mCurrentVersion.minorVersion())
60+
.arg(mCurrentVersion.subVersion()));
6161
#ifdef QGISDEBUG
6262
// Using QgsDebugMsg() didn't print the entire mDom...
6363
std::cout << mDom.toString(2).toLatin1().constData();

‎src/core/raster/qgsrasterbandstats.h‎

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,39 +27,58 @@
2727
#include <QString>
2828
#include <QVector>
2929

30+
#include <limits>
31+
3032
#include "qgscolortable.h"
3133
/** \brief The RasterBandStats struct is a container for statistics about a single
3234
* raster band.
3335
*/
3436
class CORE_EXPORT QgsRasterBandStats
3537
{
3638
public:
39+
//This constructor was added because values were being used un initalized
40+
//TODO: This should not be in the header file.
41+
QgsRasterBandStats() {
42+
bandName = "";
43+
statsGatheredFlag = false;
44+
minVal = std::numeric_limits<double>::max();
45+
maxVal = std::numeric_limits<double>::min();
46+
range = 0.0;
47+
mean = 0.0;
48+
sumSqrDev = 0.0;
49+
stdDev = 0.0;
50+
sum = 0.0;
51+
elementCount = 0;
52+
histogramEstimatedFlag = false;
53+
histogramOutOfRangeFlag = false;
54+
}
55+
3756
/** \brief The name of the band that these stats belong to. */
3857
QString bandName;
3958
/** \brief The gdal band number (starts at 1)*/
40-
int bandNoInt;
59+
int bandNo;
4160
/** \brief A flag to indicate whether this RasterBandStats struct
4261
* is completely populated */
4362
bool statsGatheredFlag;
4463
/** \brief The minimum cell value in the raster band. NO_DATA values
4564
* are ignored. This does not use the gdal GetMinimum function. */
46-
double minValDouble;
65+
double minVal;
4766
/** \brief The maximum cell value in the raster band. NO_DATA values
4867
* are ignored. This does not use the gdal GetMaximmum function. */
49-
double maxValDouble;
68+
double maxVal;
5069
/** \brief The range is the distance between min & max. */
51-
double rangeDouble;
70+
double range;
5271
/** \brief The mean cell value for the band. NO_DATA values are excluded. */
53-
double meanDouble;
72+
double mean;
5473
/** \brief The sum of the squares. Used to calculate standard deviation. */
55-
double sumSqrDevDouble;
74+
double sumSqrDev;
5675
/** \brief The standard deviation of the cell values. */
57-
double stdDevDouble;
76+
double stdDev;
5877
/** \brief The sum of all cells in the band. NO_DATA values are excluded. */
59-
double sumDouble;
78+
double sum;
6079
/** \brief The number of cells in the band. Equivalent to height x width.
6180
* TODO: check if NO_DATA are excluded!*/
62-
int elementCountInt;
81+
int elementCount;
6382
/** \brief Store the histogram for a given layer */
6483
typedef QVector<int> HistogramVector;
6584
HistogramVector * histogramVector;

‎src/core/raster/qgsrasterlayer.cpp‎

Lines changed: 1548 additions & 1575 deletions
Large diffs are not rendered by default.

‎src/core/raster/qgsrasterlayer.h‎

Lines changed: 348 additions & 347 deletions
Large diffs are not rendered by default.

‎src/core/raster/qgsrasterpyramid.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ class CORE_EXPORT QgsRasterPyramid
2222
{
2323
public:
2424
/** \brief The pyramid level as implemented in gdal (level 2 is half orignal raster size etc) */
25-
int levelInt;
25+
int level;
2626
/** \brief XDimension for this pyramid layer */
27-
int xDimInt;
27+
int xDim;
2828
/** \brief YDimension for this pyramid layer */
29-
int yDimInt;
29+
int yDim;
3030
/** \brief Whether the pyramid layer has been built yet */
3131
bool existsFlag;
3232

‎src/core/raster/qgsrasterviewport.h‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,36 +32,36 @@ struct QgsRasterViewPort
3232
{
3333
/** \brief The offset from the left hand edge of the raster for the rectangle that will be drawn to screen.
3434
* TODO Check this explanation is correc!*/
35-
int rectXOffsetInt;
35+
int rectXOffset;
3636
float rectXOffsetFloat;
3737
/** \brief The offset from the bottom edge of the raster for the rectangle that will be drawn to screen.
3838
* TODO Check this explanation is correc!*/
39-
int rectYOffsetInt;
39+
int rectYOffset;
4040
float rectYOffsetFloat;
4141
/** \brief Lower left X dimension of clipped raster image in raster pixel space.
4242
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
4343
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
4444
* whatever the screen coordinates are (e.g. a 600x800 display window) */
45-
double clippedXMinDouble;
45+
double clippedXMin;
4646
/** \brief Top Right X dimension of clipped raster image in raster pixel space.
4747
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
4848
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
4949
* whatever the screen coordinates are (e.g. a 600x800 display window) */
50-
double clippedXMaxDouble;
50+
double clippedXMax;
5151
/** \brief Lower left Y dimension of clipped raster image in raster pixel space.
5252
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
5353
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
5454
* whatever the screen coordinates are (e.g. a 600x800 display window) */
55-
double clippedYMinDouble;
55+
double clippedYMin;
5656
/** \brief Top Right X dimension of clipped raster image in raster pixel space.
5757
* RasterIO will do the scaling for us, so for example, if the user is zoomed in a long way, there may only
5858
* be e.g. 5x5 pixels retrieved from the raw raster data, but rasterio will seamlessly scale the up to
5959
* whatever the screen coordinates are (e.g. a 600x800 display window) */
60-
double clippedYMaxDouble;
61-
/** \brief Distance in pixels from clippedXMinDouble to clippedXMaxDouble. */
62-
int clippedWidthInt;
63-
/** \brief Distance in pixels from clippedYMinDouble to clippedYMaxDouble */
64-
int clippedHeightInt;
60+
double clippedYMax;
61+
/** \brief Distance in pixels from clippedXMin to clippedXMax. */
62+
int clippedWidth;
63+
/** \brief Distance in pixels from clippedYMin to clippedYMax */
64+
int clippedHeight;
6565
/** \brief Coordinate (in geographic coordinate system) of top left corner of the part of the raster that
6666
* is to be rendered.*/
6767
QgsPoint topLeftPoint;
@@ -70,10 +70,10 @@ struct QgsRasterViewPort
7070
QgsPoint bottomRightPoint;
7171
/** \brief Distance in map units from left edge to right edge for the part of the raster that
7272
* is to be rendered.*/
73-
int drawableAreaXDimInt;
73+
int drawableAreaXDim;
7474
/** \brief Distance in map units from bottom edge to top edge for the part of the raster that
7575
* is to be rendered.*/
76-
int drawableAreaYDimInt;
76+
int drawableAreaYDim;
7777
};
7878

7979
#endif //QGSRASTERVIEWPORT_H

‎src/plugins/CMakeLists.txt‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
SUBDIRS (copyright_label delimited_text grid_maker north_arrow scale_bar)
32

43
IF (POSTGRES_FOUND)

‎src/ui/qgsrasterlayerpropertiesbase.ui‎

Lines changed: 1841 additions & 656 deletions
Large diffs are not rendered by default.

‎tests/src/core/testqgsrasterlayer.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void TestQgsRasterLayer::checkDimensions()
7878
QVERIFY ( mpLayer->getRasterYDim() == 10 );
7979
// regression check for ticket #832
8080
// note getRasterBandStats call is base 1
81-
QVERIFY ( mpLayer->getRasterBandStats(1).elementCountInt == 100 );
81+
QVERIFY ( mpLayer->getRasterBandStats(1).elementCount == 100 );
8282
}
8383

8484
QTEST_MAIN(TestQgsRasterLayer)

0 commit comments

Comments
 (0)
Please sign in to comment.