110318_qgis_imageoptions.diff
| src/app/qgsoptions.cpp (Arbeitskopie) | ||
|---|---|---|
| 109 | 109 |
} |
| 110 | 110 |
} |
| 111 | 111 | |
| 112 |
//image creation options |
|
| 113 |
QMap<QString, QVariant> defaultImageCreationMap; |
|
| 114 |
defaultImageCreationMap.insert( "COMPRESS", "PACKBITS" ); |
|
| 115 |
defaultImageCreationMap.insert( "BIGTIFF", "IF_NEEDED" ); |
|
| 116 |
QMap<QString, QVariant> imageCreationOptions = settings.value( "/qgis/imageCreationOptions", QVariant( defaultImageCreationMap ) ).toMap(); |
|
| 117 |
QMap<QString, QVariant>::const_iterator creationIt = imageCreationOptions.constBegin(); |
|
| 118 |
for ( ; creationIt != imageCreationOptions.constEnd(); ++creationIt ) |
|
| 119 |
{
|
|
| 120 |
mImageCreationOptionsLineEdit->append( creationIt.key() + "=" + creationIt.value().toString() ); |
|
| 121 |
} |
|
| 122 | ||
| 112 | 123 |
//Network timeout |
| 113 | 124 |
mNetworkTimeoutSpinBox->setValue( settings.value( "/qgis/networkAndProxy/networkTimeout", "60000" ).toInt() ); |
| 114 | 125 | |
| ... | ... | |
| 401 | 412 |
groupBox_5->setEnabled( false ); |
| 402 | 413 |
#endif //Q_WS_MAC |
| 403 | 414 | |
| 404 |
//overlay placement algorithm |
|
| 405 |
mOverlayAlgorithmComboBox->insertItem( 0, tr( "Central point (fastest)" ) ); |
|
| 406 |
mOverlayAlgorithmComboBox->insertItem( 1, tr( "Chain (fast)" ) ); |
|
| 407 |
mOverlayAlgorithmComboBox->insertItem( 2, tr( "Popmusic tabu chain (slow)" ) ); |
|
| 408 |
mOverlayAlgorithmComboBox->insertItem( 3, tr( "Popmusic tabu (slow)" ) ); |
|
| 409 |
mOverlayAlgorithmComboBox->insertItem( 4, tr( "Popmusic chain (very slow)" ) ); |
|
| 410 | ||
| 411 |
QString overlayAlgorithmString = settings.value( "qgis/overlayPlacementAlgorithm", "Central point" ).toString(); |
|
| 412 |
if ( overlayAlgorithmString == "Chain" ) |
|
| 413 |
{
|
|
| 414 |
mOverlayAlgorithmComboBox->setCurrentIndex( 1 ); |
|
| 415 |
} |
|
| 416 |
else if ( overlayAlgorithmString == "Popmusic tabu chain" ) |
|
| 417 |
{
|
|
| 418 |
mOverlayAlgorithmComboBox->setCurrentIndex( 2 ); |
|
| 419 |
} |
|
| 420 |
else if ( overlayAlgorithmString == "Popmusic tabu" ) |
|
| 421 |
{
|
|
| 422 |
mOverlayAlgorithmComboBox->setCurrentIndex( 3 ); |
|
| 423 |
} |
|
| 424 |
else if ( overlayAlgorithmString == "Popmusic chain" ) |
|
| 425 |
{
|
|
| 426 |
mOverlayAlgorithmComboBox->setCurrentIndex( 4 ); |
|
| 427 |
} |
|
| 428 |
else |
|
| 429 |
{
|
|
| 430 |
mOverlayAlgorithmComboBox->setCurrentIndex( 0 ); |
|
| 431 |
} //default is central point |
|
| 432 | ||
| 433 | 415 |
restoreGeometry( settings.value( "/Windows/Options/geometry" ).toByteArray() ); |
| 434 | 416 |
tabWidget->setCurrentIndex( settings.value( "/Windows/Options/row" ).toInt() ); |
| 435 | 417 |
} |
| ... | ... | |
| 586 | 568 |
settings.setValue( "/qgis/warnOldProjectVersion", chbWarnOldProjectVersion->isChecked() ); |
| 587 | 569 |
settings.setValue( "/qgis/nullValue", leNullValue->text() ); |
| 588 | 570 | |
| 589 |
//overlay placement method |
|
| 590 |
int overlayIndex = mOverlayAlgorithmComboBox->currentIndex(); |
|
| 591 |
if ( overlayIndex == 1 ) |
|
| 592 |
{
|
|
| 593 |
settings.setValue( "/qgis/overlayPlacementAlgorithm", "Chain" ); |
|
| 594 |
} |
|
| 595 |
else if ( overlayIndex == 2 ) |
|
| 596 |
{
|
|
| 597 |
settings.setValue( "/qgis/overlayPlacementAlgorithm", "Popmusic tabu chain" ); |
|
| 598 |
} |
|
| 599 |
else if ( overlayIndex == 3 ) |
|
| 600 |
{
|
|
| 601 |
settings.setValue( "/qgis/overlayPlacementAlgorithm", "Popmusic tabu" ); |
|
| 602 |
} |
|
| 603 |
else if ( overlayIndex == 4 ) |
|
| 604 |
{
|
|
| 605 |
settings.setValue( "/qgis/overlayPlacementAlgorithm", "Popmusic chain" ); |
|
| 606 |
} |
|
| 607 |
else |
|
| 608 |
{
|
|
| 609 |
settings.setValue( "/qgis/overlayPlacementAlgorithm", "Central point" ); |
|
| 610 |
} |
|
| 611 | ||
| 612 | 571 |
if ( cmbTheme->currentText().length() == 0 ) |
| 613 | 572 |
{
|
| 614 | 573 |
settings.setValue( "/Themes", "default" ); |
| ... | ... | |
| 618 | 577 |
settings.setValue( "/Themes", cmbTheme->currentText() ); |
| 619 | 578 |
} |
| 620 | 579 | |
| 580 |
//image creation options |
|
| 581 |
QString imageCreationString = mImageCreationOptionsLineEdit->toPlainText(); |
|
| 582 |
QStringList imageCreationOptions = imageCreationString.split( "\n" ); |
|
| 583 | ||
| 584 |
QMap< QString, QVariant > imageCreationMap; |
|
| 585 |
QStringList::const_iterator optionIt = imageCreationOptions.constBegin(); |
|
| 586 |
for ( ; optionIt != imageCreationOptions.constEnd(); ++optionIt ) |
|
| 587 |
{
|
|
| 588 |
QStringList equalSplit = optionIt->split( "=" ); |
|
| 589 |
if ( equalSplit.size() > 1 ) |
|
| 590 |
{
|
|
| 591 |
QString option = equalSplit.at( 0 ).trimmed(); |
|
| 592 |
QString value = equalSplit.at( 1 ).trimmed(); |
|
| 593 |
imageCreationMap.insert( option, value ); |
|
| 594 |
} |
|
| 595 | ||
| 596 |
} |
|
| 597 |
settings.setValue( "/qgis/imageCreationOptions", imageCreationMap ); |
|
| 598 | ||
| 621 | 599 |
settings.setValue( "/IconSize", cmbSize->currentText() ); |
| 622 | 600 | |
| 623 | 601 |
settings.setValue( "/Map/updateThreshold", spinBoxUpdateThreshold->value() ); |
| src/app/qgisapp.cpp (Arbeitskopie) | ||
|---|---|---|
| 2643 | 2643 |
QgsRasterCalcDialog d; |
| 2644 | 2644 |
if ( d.exec() == QDialog::Accepted ) |
| 2645 | 2645 |
{
|
| 2646 |
//invoke analysis library |
|
| 2647 |
//extent and output resolution will come later... |
|
| 2648 |
QgsRasterCalculator rc( d.formulaString(), d.outputFile(), d.outputFormat(), d.outputRectangle(), d.numberOfColumns(), d.numberOfRows(), d.rasterEntries() ); |
|
| 2646 |
//read image creation options from settings |
|
| 2647 |
QSettings settings; |
|
| 2648 |
QMap<QString, QVariant> defaultImageCreationMap; |
|
| 2649 |
defaultImageCreationMap.insert( "COMPRESS", "PACKBITS" ); |
|
| 2650 |
defaultImageCreationMap.insert( "BIGTIFF", "IF_NEEDED" ); |
|
| 2651 |
QMap<QString, QVariant> imageCreationOptions = settings.value( "/qgis/imageCreationOptions", QVariant( defaultImageCreationMap ) ).toMap(); |
|
| 2649 | 2652 | |
| 2653 |
QgsRasterCalculator rc( d.formulaString(), d.outputFile(), d.outputFormat(), d.outputRectangle(), d.numberOfColumns(), d.numberOfRows(), d.rasterEntries(), imageCreationOptions ); |
|
| 2654 | ||
| 2650 | 2655 |
QProgressDialog p( tr( "Calculating..." ), tr( "Abort..." ), 0, 0 ); |
| 2651 | 2656 |
p.setWindowModality( Qt::WindowModal ); |
| 2652 | 2657 |
if ( rc.processCalculation( &p ) == 0 ) |
| src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.cpp (Arbeitskopie) | ||
|---|---|---|
| 27 | 27 |
#include "qgsrasterterrainanalysisdialog.h" |
| 28 | 28 |
#include <QAction> |
| 29 | 29 |
#include <QProgressDialog> |
| 30 |
#include <QSettings> |
|
| 30 | 31 | |
| 31 | 32 |
static const QString name_ = QObject::tr( "Raster Terrain Analysis plugin" ); |
| 32 | 33 |
static const QString description_ = QObject::tr( "A plugin for raster based terrain analysis" ); |
| ... | ... | |
| 84 | 85 |
QString outputFile = d.selectedOuputFilePath(); |
| 85 | 86 |
int returnValue; |
| 86 | 87 | |
| 88 |
//image creation options |
|
| 89 |
QSettings settings; |
|
| 90 |
QMap<QString, QVariant> defaultImageCreationMap; |
|
| 91 |
defaultImageCreationMap.insert( "COMPRESS", "PACKBITS" ); |
|
| 92 |
defaultImageCreationMap.insert( "BIGTIFF", "IF_NEEDED" ); |
|
| 93 |
QMap<QString, QVariant> imageCreationOptions = settings.value( "/qgis/imageCreationOptions", QVariant( defaultImageCreationMap ) ).toMap(); |
|
| 94 | ||
| 87 | 95 |
QgsNineCellFilter* filter = 0; |
| 88 | 96 |
if ( d.selectedAnalysisMethod() == tr( "Slope" ) ) |
| 89 | 97 |
{
|
| 90 |
filter = new QgsSlopeFilter( inputFilePath, outputFile, selectedFormat ); |
|
| 98 |
filter = new QgsSlopeFilter( inputFilePath, outputFile, selectedFormat, imageCreationOptions );
|
|
| 91 | 99 |
} |
| 92 | 100 |
else if ( d.selectedAnalysisMethod() == tr( "Aspect" ) ) |
| 93 | 101 |
{
|
| 94 |
filter = new QgsAspectFilter( inputFilePath, outputFile, selectedFormat ); |
|
| 102 |
filter = new QgsAspectFilter( inputFilePath, outputFile, selectedFormat, imageCreationOptions );
|
|
| 95 | 103 |
} |
| 96 | 104 |
else if ( d.selectedAnalysisMethod() == tr( "Ruggedness index" ) ) |
| 97 | 105 |
{
|
| 98 |
filter = new QgsRuggednessFilter( inputFilePath, outputFile, selectedFormat ); |
|
| 106 |
filter = new QgsRuggednessFilter( inputFilePath, outputFile, selectedFormat, imageCreationOptions );
|
|
| 99 | 107 |
} |
| 100 | 108 |
else if ( d.selectedAnalysisMethod() == tr( "Total curvature" ) ) |
| 101 | 109 |
{
|
| 102 |
filter = new QgsTotalCurvatureFilter( inputFilePath, outputFile, selectedFormat ); |
|
| 110 |
filter = new QgsTotalCurvatureFilter( inputFilePath, outputFile, selectedFormat, imageCreationOptions );
|
|
| 103 | 111 |
} |
| 104 | 112 | |
| 105 | 113 |
if ( filter ) |
| src/analysis/raster/qgsaspectfilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 17 | 17 | |
| 18 | 18 |
#include "qgsaspectfilter.h" |
| 19 | 19 | |
| 20 |
QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ) : |
|
| 21 |
QgsDerivativeFilter( inputFile, outputFile, outputFormat ) |
|
| 20 |
QgsAspectFilter::QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ) :
|
|
| 21 |
QgsDerivativeFilter( inputFile, outputFile, outputFormat, creationOptionsMap )
|
|
| 22 | 22 |
{
|
| 23 | 23 | |
| 24 | 24 |
} |
| src/analysis/raster/qgsslopefilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 17 | 17 | |
| 18 | 18 |
#include "qgsslopefilter.h" |
| 19 | 19 | |
| 20 |
QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \ |
|
| 21 |
QgsDerivativeFilter( inputFile, outputFile, outputFormat ) |
|
| 20 |
QgsSlopeFilter::QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ): \
|
|
| 21 |
QgsDerivativeFilter( inputFile, outputFile, outputFormat, creationOptionsMap )
|
|
| 22 | 22 |
{
|
| 23 | 23 | |
| 24 | 24 |
} |
| src/analysis/raster/qgstotalcurvaturefilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 17 | 17 | |
| 18 | 18 |
#include "qgstotalcurvaturefilter.h" |
| 19 | 19 | |
| 20 |
QgsTotalCurvatureFilter::QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \ |
|
| 21 |
QgsNineCellFilter( inputFile, outputFile, outputFormat ) |
|
| 20 |
QgsTotalCurvatureFilter::QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ): \
|
|
| 21 |
QgsNineCellFilter( inputFile, outputFile, outputFormat, creationOptionsMap )
|
|
| 22 | 22 |
{
|
| 23 | 23 | |
| 24 | 24 |
} |
| src/analysis/raster/qgsaspectfilter.h (Arbeitskopie) | ||
|---|---|---|
| 24 | 24 |
class ANALYSIS_EXPORT QgsAspectFilter: public QgsDerivativeFilter |
| 25 | 25 |
{
|
| 26 | 26 |
public: |
| 27 |
QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 27 |
QgsAspectFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap );
|
|
| 28 | 28 |
~QgsAspectFilter(); |
| 29 | 29 | |
| 30 | 30 |
protected: |
| src/analysis/raster/qgsslopefilter.h (Arbeitskopie) | ||
|---|---|---|
| 24 | 24 |
class ANALYSIS_EXPORT QgsSlopeFilter: public QgsDerivativeFilter |
| 25 | 25 |
{
|
| 26 | 26 |
public: |
| 27 |
QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 27 |
QgsSlopeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap );
|
|
| 28 | 28 |
~QgsSlopeFilter(); |
| 29 | 29 | |
| 30 | 30 |
protected: |
| src/analysis/raster/qgstotalcurvaturefilter.h (Arbeitskopie) | ||
|---|---|---|
| 24 | 24 |
class ANALYSIS_EXPORT QgsTotalCurvatureFilter: public QgsNineCellFilter |
| 25 | 25 |
{
|
| 26 | 26 |
public: |
| 27 |
QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 27 |
QgsTotalCurvatureFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap );
|
|
| 28 | 28 |
~QgsTotalCurvatureFilter(); |
| 29 | 29 | |
| 30 | 30 |
protected: |
| src/analysis/raster/qgsninecellfilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 25 | 25 |
#define TO8(x) (x).toLocal8Bit().constData() |
| 26 | 26 |
#endif |
| 27 | 27 | |
| 28 |
QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \ |
|
| 29 |
mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 ) |
|
| 28 |
QgsNineCellFilter::QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ): \ |
|
| 29 |
mInputFile( inputFile ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), mCellSizeX( -1 ), mCellSizeY( -1 ), mInputNodataValue( -1 ), mOutputNodataValue( -1 ), |
|
| 30 |
mCreationOptionsMap( creationOptionsMap ) |
|
| 30 | 31 |
{
|
| 31 | 32 | |
| 32 | 33 |
} |
| ... | ... | |
| 244 | 245 |
int ySize = GDALGetRasterYSize( inputDataset );; |
| 245 | 246 | |
| 246 | 247 |
//open output file |
| 247 |
char **papszOptions = NULL; |
|
| 248 |
GDALDatasetH outputDataset = GDALCreate( outputDriver, mOutputFile.toLocal8Bit().data(), xSize, ySize, 1, GDT_Float32, papszOptions ); |
|
| 248 |
char** rasterCreationOptions = 0; |
|
| 249 |
QMap< QString, QVariant >::const_iterator optionIt = mCreationOptionsMap.constBegin(); |
|
| 250 |
for ( ; optionIt != mCreationOptionsMap.constEnd(); ++optionIt ) |
|
| 251 |
{
|
|
| 252 |
rasterCreationOptions = CSLSetNameValue( rasterCreationOptions, optionIt.key().toLocal8Bit().data(), optionIt.value().toString().toLocal8Bit().data() ); |
|
| 253 |
} |
|
| 254 |
GDALDatasetH outputDataset = GDALCreate( outputDriver, mOutputFile.toLocal8Bit().data(), xSize, ySize, 1, GDT_Float32, rasterCreationOptions ); |
|
| 249 | 255 |
if ( outputDataset == NULL ) |
| 250 | 256 |
{
|
| 251 | 257 |
return outputDataset; |
| src/analysis/raster/qgsninecellfilter.h (Arbeitskopie) | ||
|---|---|---|
| 18 | 18 |
#ifndef QGSNINECELLFILTER_H |
| 19 | 19 |
#define QGSNINECELLFILTER_H |
| 20 | 20 | |
| 21 |
#include <QMap> |
|
| 21 | 22 |
#include <QString> |
| 23 |
#include <QVariant> |
|
| 22 | 24 |
#include "gdal.h" |
| 23 | 25 | |
| 24 | 26 |
class QProgressDialog; |
| ... | ... | |
| 31 | 33 |
{
|
| 32 | 34 |
public: |
| 33 | 35 |
/**Constructor that takes input file, output file and output format (GDAL string)*/ |
| 34 |
QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 36 |
QgsNineCellFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap = QMap< QString, QVariant>() );
|
|
| 35 | 37 |
virtual ~QgsNineCellFilter(); |
| 36 | 38 |
/**Starts the calculation, reads from mInputFile and stores the result in mOutputFile |
| 37 | 39 |
@param p progress dialog that receives update and that is checked for abort. 0 if no progress bar is needed. |
| ... | ... | |
| 67 | 69 |
float mInputNodataValue; |
| 68 | 70 |
/**The nodata value of the output layer*/ |
| 69 | 71 |
float mOutputNodataValue; |
| 72 |
/**Image creation options*/ |
|
| 73 |
QMap< QString, QVariant > mCreationOptionsMap; |
|
| 70 | 74 |
}; |
| 71 | 75 | |
| 72 | 76 |
#endif // QGSNINECELLFILTER_H |
| src/analysis/raster/qgsderivativefilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 17 | 17 | |
| 18 | 18 |
#include "qgsderivativefilter.h" |
| 19 | 19 | |
| 20 |
QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): \ |
|
| 21 |
QgsNineCellFilter( inputFile, outputFile, outputFormat ) |
|
| 20 |
QgsDerivativeFilter::QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ): \
|
|
| 21 |
QgsNineCellFilter( inputFile, outputFile, outputFormat, creationOptionsMap )
|
|
| 22 | 22 |
{
|
| 23 | 23 | |
| 24 | 24 |
} |
| src/analysis/raster/qgsrastercalculator.cpp (Arbeitskopie) | ||
|---|---|---|
| 31 | 31 |
#endif |
| 32 | 32 | |
| 33 | 33 |
QgsRasterCalculator::QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat, |
| 34 |
const QgsRectangle& outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries ): mFormulaString( formulaString ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), |
|
| 35 |
mOutputRectangle( outputExtent ), mNumOutputColumns( nOutputColumns ), mNumOutputRows( nOutputRows ), mRasterEntries( rasterEntries ) |
|
| 34 |
const QgsRectangle& outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries, |
|
| 35 |
const QMap< QString, QVariant >& rasterCreationOptions ): mFormulaString( formulaString ), mOutputFile( outputFile ), mOutputFormat( outputFormat ), |
|
| 36 |
mOutputRectangle( outputExtent ), mNumOutputColumns( nOutputColumns ), mNumOutputRows( nOutputRows ), mRasterEntries( rasterEntries ), |
|
| 37 |
mRasterCreationOptions( rasterCreationOptions ) |
|
| 36 | 38 |
{
|
| 37 | 39 |
} |
| 38 | 40 | |
| ... | ... | |
| 247 | 249 | |
| 248 | 250 |
GDALDatasetH QgsRasterCalculator::openOutputFile( GDALDriverH outputDriver ) |
| 249 | 251 |
{
|
| 250 |
//open output file |
|
| 251 |
char **papszOptions = NULL; |
|
| 252 |
GDALDatasetH outputDataset = GDALCreate( outputDriver, mOutputFile.toLocal8Bit().data(), mNumOutputColumns, mNumOutputRows, 1, GDT_Float32, papszOptions ); |
|
| 252 |
char** rasterCreationOptions = 0; |
|
| 253 |
QMap< QString, QVariant >::const_iterator optionIt = mRasterCreationOptions.constBegin(); |
|
| 254 |
for ( ; optionIt != mRasterCreationOptions.constEnd(); ++optionIt ) |
|
| 255 |
{
|
|
| 256 |
rasterCreationOptions = CSLSetNameValue( rasterCreationOptions, optionIt.key().toLocal8Bit().data(), optionIt.value().toString().toLocal8Bit().data() ); |
|
| 257 |
} |
|
| 258 |
GDALDatasetH outputDataset = GDALCreate( outputDriver, mOutputFile.toLocal8Bit().data(), mNumOutputColumns, mNumOutputRows, 1, GDT_Float32, rasterCreationOptions ); |
|
| 253 | 259 |
if ( outputDataset == NULL ) |
| 254 | 260 |
{
|
| 255 | 261 |
return outputDataset; |
| src/analysis/raster/qgsruggednessfilter.cpp (Arbeitskopie) | ||
|---|---|---|
| 17 | 17 | |
| 18 | 18 |
#include "qgsruggednessfilter.h" |
| 19 | 19 | |
| 20 |
QgsRuggednessFilter::QgsRuggednessFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ): QgsNineCellFilter( inputFile, outputFile, outputFormat ) |
|
| 20 |
QgsRuggednessFilter::QgsRuggednessFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap ): |
|
| 21 |
QgsNineCellFilter( inputFile, outputFile, outputFormat, creationOptionsMap ) |
|
| 21 | 22 |
{
|
| 22 | 23 | |
| 23 | 24 |
} |
| src/analysis/raster/qgsderivativefilter.h (Arbeitskopie) | ||
|---|---|---|
| 24 | 24 |
class QgsDerivativeFilter: public QgsNineCellFilter |
| 25 | 25 |
{
|
| 26 | 26 |
public: |
| 27 |
QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 27 |
QgsDerivativeFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap );
|
|
| 28 | 28 |
virtual ~QgsDerivativeFilter(); |
| 29 | 29 |
//to be implemented by subclasses |
| 30 | 30 |
virtual float processNineCellWindow( float* x11, float* x21, float* x31, float* x12, float* x22, \ |
| src/analysis/raster/qgsrastercalculator.h (Arbeitskopie) | ||
|---|---|---|
| 40 | 40 |
{
|
| 41 | 41 |
public: |
| 42 | 42 |
QgsRasterCalculator( const QString& formulaString, const QString& outputFile, const QString& outputFormat, |
| 43 |
const QgsRectangle& outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries ); |
|
| 43 |
const QgsRectangle& outputExtent, int nOutputColumns, int nOutputRows, const QVector<QgsRasterCalculatorEntry>& rasterEntries, |
|
| 44 |
const QMap< QString, QVariant >& rasterCreationOptions = QMap< QString, QVariant >() ); |
|
| 44 | 45 |
~QgsRasterCalculator(); |
| 45 | 46 | |
| 46 | 47 |
/**Starts the calculation and writes new raster |
| ... | ... | |
| 98 | 99 | |
| 99 | 100 |
/***/ |
| 100 | 101 |
QVector<QgsRasterCalculatorEntry> mRasterEntries; |
| 102 | ||
| 103 |
QMap< QString, QVariant > mRasterCreationOptions; |
|
| 101 | 104 |
}; |
| 102 | 105 | |
| 103 | 106 |
#endif // QGSRASTERCALCULATOR_H |
| src/analysis/raster/qgsruggednessfilter.h (Arbeitskopie) | ||
|---|---|---|
| 25 | 25 |
class ANALYSIS_EXPORT QgsRuggednessFilter: public QgsNineCellFilter |
| 26 | 26 |
{
|
| 27 | 27 |
public: |
| 28 |
QgsRuggednessFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat ); |
|
| 28 |
QgsRuggednessFilter( const QString& inputFile, const QString& outputFile, const QString& outputFormat, const QMap< QString, QVariant >& creationOptionsMap );
|
|
| 29 | 29 |
~QgsRuggednessFilter(); |
| 30 | 30 | |
| 31 | 31 |
protected: |
| src/ui/qgsoptionsbase.ui (Arbeitskopie) | ||
|---|---|---|
| 6 | 6 |
<rect> |
| 7 | 7 |
<x>0</x> |
| 8 | 8 |
<y>0</y> |
| 9 |
<width>825</width>
|
|
| 10 |
<height>503</height>
|
|
| 9 |
<width>775</width>
|
|
| 10 |
<height>513</height>
|
|
| 11 | 11 |
</rect> |
| 12 | 12 |
</property> |
| 13 | 13 |
<property name="windowTitle"> |
| ... | ... | |
| 33 | 33 |
<item row="2" column="0"> |
| 34 | 34 |
<widget class="QTabWidget" name="tabWidget"> |
| 35 | 35 |
<property name="currentIndex"> |
| 36 |
<number>0</number>
|
|
| 36 |
<number>2</number>
|
|
| 37 | 37 |
</property> |
| 38 | 38 |
<property name="iconSize"> |
| 39 | 39 |
<size> |
| ... | ... | |
| 60 | 60 |
<rect> |
| 61 | 61 |
<x>0</x> |
| 62 | 62 |
<y>0</y> |
| 63 |
<width>780</width>
|
|
| 64 |
<height>755</height>
|
|
| 63 |
<width>715</width>
|
|
| 64 |
<height>766</height>
|
|
| 65 | 65 |
</rect> |
| 66 | 66 |
</property> |
| 67 | 67 |
<layout class="QGridLayout" name="gridLayout_12"> |
| ... | ... | |
| 499 | 499 |
<rect> |
| 500 | 500 |
<x>0</x> |
| 501 | 501 |
<y>0</y> |
| 502 |
<width>780</width>
|
|
| 503 |
<height>433</height>
|
|
| 502 |
<width>731</width>
|
|
| 503 |
<height>475</height>
|
|
| 504 | 504 |
</rect> |
| 505 | 505 |
</property> |
| 506 | 506 |
<layout class="QGridLayout" name="gridLayout_8"> |
| ... | ... | |
| 659 | 659 |
<attribute name="title"> |
| 660 | 660 |
<string>Map tools</string> |
| 661 | 661 |
</attribute> |
| 662 |
<layout class="QGridLayout" name="gridLayout_6">
|
|
| 662 |
<layout class="QGridLayout" name="gridLayout_10">
|
|
| 663 | 663 |
<item row="0" column="0"> |
| 664 | 664 |
<widget class="QScrollArea" name="scrollArea"> |
| 665 | 665 |
<property name="widgetResizable"> |
| ... | ... | |
| 669 | 669 |
<property name="geometry"> |
| 670 | 670 |
<rect> |
| 671 | 671 |
<x>0</x> |
| 672 |
<y>0</y>
|
|
| 673 |
<width>780</width>
|
|
| 674 |
<height>456</height>
|
|
| 672 |
<y>-281</y>
|
|
| 673 |
<width>715</width>
|
|
| 674 |
<height>685</height>
|
|
| 675 | 675 |
</rect> |
| 676 | 676 |
</property> |
| 677 |
<layout class="QGridLayout" name="gridLayout_4">
|
|
| 677 |
<layout class="QGridLayout" name="gridLayout_6">
|
|
| 678 | 678 |
<item row="0" column="0"> |
| 679 | 679 |
<widget class="QGroupBox" name="groupBox_7"> |
| 680 | 680 |
<property name="title"> |
| ... | ... | |
| 925 | 925 |
</layout> |
| 926 | 926 |
</widget> |
| 927 | 927 |
</item> |
| 928 |
</layout> |
|
| 929 |
</widget> |
|
| 930 |
</widget> |
|
| 931 |
</item> |
|
| 932 |
</layout> |
|
| 933 |
</widget> |
|
| 934 |
<widget class="QWidget" name="tabWidgetPage4"> |
|
| 935 |
<attribute name="icon"> |
|
| 936 |
<iconset resource="../../images/images.qrc"> |
|
| 937 |
<normaloff>:/images/themes/default/propertyicons/overlay.png</normaloff>:/images/themes/default/propertyicons/overlay.png</iconset> |
|
| 938 |
</attribute> |
|
| 939 |
<attribute name="title"> |
|
| 940 |
<string>Overlays</string> |
|
| 941 |
</attribute> |
|
| 942 |
<layout class="QGridLayout" name="gridLayout_11"> |
|
| 943 |
<item row="0" column="0"> |
|
| 944 |
<widget class="QScrollArea" name="scrollArea_4"> |
|
| 945 |
<property name="widgetResizable"> |
|
| 946 |
<bool>true</bool> |
|
| 947 |
</property> |
|
| 948 |
<widget class="QWidget" name="scrollAreaWidgetContents_5"> |
|
| 949 |
<property name="geometry"> |
|
| 950 |
<rect> |
|
| 951 |
<x>0</x> |
|
| 952 |
<y>0</y> |
|
| 953 |
<width>795</width> |
|
| 954 |
<height>415</height> |
|
| 955 |
</rect> |
|
| 956 |
</property> |
|
| 957 |
<layout class="QGridLayout" name="gridLayout_10"> |
|
| 958 |
<item row="0" column="0"> |
|
| 959 |
<widget class="QGroupBox" name="mPositionGroupBox"> |
|
| 928 |
<item row="3" column="0"> |
|
| 929 |
<widget class="QGroupBox" name="mImageCreationOptionsGroupBox"> |
|
| 960 | 930 |
<property name="title"> |
| 961 |
<string>Position</string>
|
|
| 931 |
<string>Image creation options</string>
|
|
| 962 | 932 |
</property> |
| 963 |
<layout class="QHBoxLayout" name="horizontalLayout_4"> |
|
| 964 |
<item> |
|
| 965 |
<widget class="QLabel" name="mAlgorithmLabel"> |
|
| 966 |
<property name="text"> |
|
| 967 |
<string>Placement algorithm</string> |
|
| 968 |
</property> |
|
| 969 |
</widget> |
|
| 933 |
<layout class="QGridLayout" name="gridLayout_4"> |
|
| 934 |
<item row="0" column="0"> |
|
| 935 |
<widget class="QTextEdit" name="mImageCreationOptionsLineEdit"/> |
|
| 970 | 936 |
</item> |
| 971 |
<item> |
|
| 972 |
<spacer> |
|
| 973 |
<property name="orientation"> |
|
| 974 |
<enum>Qt::Horizontal</enum> |
|
| 975 |
</property> |
|
| 976 |
<property name="sizeHint" stdset="0"> |
|
| 977 |
<size> |
|
| 978 |
<width>221</width> |
|
| 979 |
<height>20</height> |
|
| 980 |
</size> |
|
| 981 |
</property> |
|
| 982 |
</spacer> |
|
| 983 |
</item> |
|
| 984 |
<item> |
|
| 985 |
<widget class="QComboBox" name="mOverlayAlgorithmComboBox"/> |
|
| 986 |
</item> |
|
| 987 | 937 |
</layout> |
| 988 | 938 |
</widget> |
| 989 | 939 |
</item> |
| 990 |
<item row="1" column="0"> |
|
| 991 |
<spacer> |
|
| 992 |
<property name="orientation"> |
|
| 993 |
<enum>Qt::Vertical</enum> |
|
| 994 |
</property> |
|
| 995 |
<property name="sizeHint" stdset="0"> |
|
| 996 |
<size> |
|
| 997 |
<width>20</width> |
|
| 998 |
<height>461</height> |
|
| 999 |
</size> |
|
| 1000 |
</property> |
|
| 1001 |
</spacer> |
|
| 1002 |
</item> |
|
| 1003 | 940 |
</layout> |
| 1004 | 941 |
</widget> |
| 1005 | 942 |
</widget> |
| ... | ... | |
| 1025 | 962 |
<rect> |
| 1026 | 963 |
<x>0</x> |
| 1027 | 964 |
<y>0</y> |
| 1028 |
<width>795</width>
|
|
| 1029 |
<height>415</height>
|
|
| 965 |
<width>731</width>
|
|
| 966 |
<height>422</height>
|
|
| 1030 | 967 |
</rect> |
| 1031 | 968 |
</property> |
| 1032 | 969 |
<layout class="QGridLayout" name="gridLayout_13"> |
| ... | ... | |
| 1355 | 1292 |
<rect> |
| 1356 | 1293 |
<x>0</x> |
| 1357 | 1294 |
<y>0</y> |
| 1358 |
<width>795</width>
|
|
| 1359 |
<height>415</height>
|
|
| 1295 |
<width>731</width>
|
|
| 1296 |
<height>404</height>
|
|
| 1360 | 1297 |
</rect> |
| 1361 | 1298 |
</property> |
| 1362 | 1299 |
<layout class="QGridLayout" name="gridLayout_15"> |
| ... | ... | |
| 1523 | 1460 |
<rect> |
| 1524 | 1461 |
<x>0</x> |
| 1525 | 1462 |
<y>0</y> |
| 1526 |
<width>780</width>
|
|
| 1527 |
<height>527</height>
|
|
| 1463 |
<width>731</width>
|
|
| 1464 |
<height>546</height>
|
|
| 1528 | 1465 |
</rect> |
| 1529 | 1466 |
</property> |
| 1530 | 1467 |
<layout class="QGridLayout" name="gridLayout_17"> |
| ... | ... | |
| 1614 | 1551 |
<rect> |
| 1615 | 1552 |
<x>0</x> |
| 1616 | 1553 |
<y>0</y> |
| 1617 |
<width>780</width>
|
|
| 1618 |
<height>461</height>
|
|
| 1554 |
<width>731</width>
|
|
| 1555 |
<height>520</height>
|
|
| 1619 | 1556 |
</rect> |
| 1620 | 1557 |
</property> |
| 1621 | 1558 |
<layout class="QGridLayout" name="gridLayout_20"> |
| ... | ... | |
| 1894 | 1831 |
<tabstop>mGonRadioButton</tabstop> |
| 1895 | 1832 |
<tabstop>cmbWheelAction</tabstop> |
| 1896 | 1833 |
<tabstop>spinZoomFactor</tabstop> |
| 1897 |
<tabstop>scrollArea_4</tabstop> |
|
| 1898 |
<tabstop>mOverlayAlgorithmComboBox</tabstop> |
|
| 1899 | 1834 |
<tabstop>scrollArea_5</tabstop> |
| 1900 | 1835 |
<tabstop>mLineWidthSpinBox</tabstop> |
| 1901 | 1836 |
<tabstop>mLineColorToolButton</tabstop> |