[QGIS Commit] r14017 - in trunk/qgis: python/core src/core/raster
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Aug 6 08:37:49 EDT 2010
Author: wonder
Date: 2010-08-06 12:37:49 +0000 (Fri, 06 Aug 2010)
New Revision: 14017
Modified:
trunk/qgis/python/core/qgsrasterlayer.sip
trunk/qgis/src/core/raster/qgsrasterlayer.cpp
trunk/qgis/src/core/raster/qgsrasterlayer.h
Log:
Fixed wrappers from QgsRasterLayer::computeMinimumMaximumFromLastExtent, computeMinimumMaximumEstimates
Modified: trunk/qgis/python/core/qgsrasterlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterlayer.sip 2010-08-06 07:44:37 UTC (rev 14016)
+++ trunk/qgis/python/core/qgsrasterlayer.sip 2010-08-06 12:37:49 UTC (rev 14017)
@@ -269,17 +269,25 @@
QString colorShadingAlgorithmAsString() const;
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
- void computeMinimumMaximumEstimates( int theBand, double* theMinMax );
+ // (would need MethodCode directive) void computeMinimumMaximumEstimates( int theBand, double* theMinMax );
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
- void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );
+ // (would need MethodCode directive) void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );
+ /** \brief Wrapper for GDALComputeRasterMinMax with the estimate option
+ \note added in v1.6 */
+ void computeMinimumMaximumEstimates( int theBand, double& theMin /Out/, double& theMax /Out/ );
+
/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
- void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );
+ // (would need MethodCode directive) void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );
/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
- void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );
+ // (would need MethodCode directive) void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );
+ /** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent
+ \note added in v1.6 */
+ void computeMinimumMaximumFromLastExtent( int theBand, double& theMin /Out/, double& theMax /Out/ );
+
/** \brief Get a pointer to the contrast enhancement for the selected band */
QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.cpp
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-08-06 07:44:37 UTC (rev 14016)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.cpp 2010-08-06 12:37:49 UTC (rev 14017)
@@ -1243,6 +1243,14 @@
computeMinimumMaximumEstimates( bandNumber( theBand ), theMinMax );
}
+void QgsRasterLayer::computeMinimumMaximumEstimates( int theBand, double& theMin, double& theMax )
+{
+ double theMinMax[2];
+ computeMinimumMaximumEstimates( theBand, theMinMax );
+ theMin = theMinMax[0];
+ theMax = theMinMax[1];
+}
+
/**
* @param theBand The band (number) for which to calculate the min max values
* @param theMinMax Pointer to a double[2] which hold the estimated min max
@@ -1293,6 +1301,14 @@
computeMinimumMaximumFromLastExtent( bandNumber( theBand ), theMinMax );
}
+void QgsRasterLayer::computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax )
+{
+ double theMinMax[2];
+ computeMinimumMaximumFromLastExtent( theBand, theMinMax );
+ theMin = theMinMax[0];
+ theMax = theMinMax[1];
+}
+
/**
* @param theBand The band (number) for which to get the contrast enhancement for
* @return Pointer to the contrast enhancement or 0 on failure
Modified: trunk/qgis/src/core/raster/qgsrasterlayer.h
===================================================================
--- trunk/qgis/src/core/raster/qgsrasterlayer.h 2010-08-06 07:44:37 UTC (rev 14016)
+++ trunk/qgis/src/core/raster/qgsrasterlayer.h 2010-08-06 12:37:49 UTC (rev 14017)
@@ -440,11 +440,19 @@
/** \brief Wrapper for GDALComputeRasterMinMax with the estimate option */
void computeMinimumMaximumEstimates( QString theBand, double* theMinMax );
+ /** \brief Wrapper for GDALComputeRasterMinMax with the estimate option
+ \note added in v1.6 */
+ void computeMinimumMaximumEstimates( int theBand, double& theMin, double& theMax );
+
/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( int theBand, double* theMinMax );
/** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent */
void computeMinimumMaximumFromLastExtent( QString theBand, double* theMinMax );
+
+ /** \brief Compute the actual minimum maximum pixel values based on the current (last) display extent
+ \note added in v1.6 */
+ void computeMinimumMaximumFromLastExtent( int theBand, double& theMin, double& theMax );
/** \brief Get a pointer to the contrast enhancement for the selected band */
QgsContrastEnhancement* contrastEnhancement( unsigned int theBand );
More information about the QGIS-commit
mailing list