Skip to content

Commit

Permalink
applied patch attached to #2932 to improve build overviews (gdaltools).
Browse files Browse the repository at this point in the history
Thanks to Duarte!


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14105 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Aug 18, 2010
1 parent ac48389 commit 9fa7469
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def name():
def description():
return "Integrate gdal tools into qgis"
def version():
return "Version 1.2.9"
return "Version 1.2.10"
def qgisMinimumVersion():
return "1.0"
def classFactory(iface):
Expand Down
15 changes: 14 additions & 1 deletion python/plugins/GdalTools/tools/doOverview.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ def __init__( self, iface ):
(self.inputLayerCombo, [SIGNAL("currentIndexChanged(int)"), SIGNAL("editTextChanged(const QString &)")] ),
( self.algorithmCombo, SIGNAL( "currentIndexChanged( int )" ), self.algorithmCheck ),
( self.levelsEdit, SIGNAL( "textChanged( const QString & )" ) ),
( self.roModeCheck, SIGNAL( "stateChanged( int )" ) )
( self.roModeCheck, SIGNAL( "stateChanged( int )" ) ),
( self.rrdCheck, SIGNAL( "stateChanged(int)" ) ),
( self.jpegQualitySpin, SIGNAL( "valueChanged (int)" ) ),
( self.jpegQualityContainer, None, self.tiffjpegCheck),
( self.jpegQualityContainer, None, None, "1.7.0"), #only show for GDAL >=1.7.0
( self.cleanCheck, SIGNAL( "stateChanged(int)" ), None, "1.7.0" ) #only show for GDAL >=1.7.0
]
)

Expand Down Expand Up @@ -96,6 +101,14 @@ def getArguments( self ):
arguments << self.resampling_method[self.algorithmCombo.currentIndex()]
if self.roModeCheck.isChecked():
arguments << "-ro"
if self.rrdCheck.isChecked():
arguments << "--config" << "USE_RRD" << "YES"
if self.tiffjpegCheck.isChecked():
arguments << "--config" << "COMPRESS_OVERVIEW" << "JPEG" << "--config" << "PHOTOMETRIC_OVERVIEW" << "YCBCR" << "--config" << "INTERLEAVE_OVERVIEW" << "PIXEL"
if self.jpegQualityContainer.isVisible():
arguments << "--config" << "JPEG_QUALITY_OVERVIEW" << self.jpegQualitySpin.cleanText()
if self.cleanCheck.isChecked():
arguments << "-clean"
if self.isBatchEnabled():
return arguments

Expand Down
103 changes: 101 additions & 2 deletions python/plugins/GdalTools/tools/widgetOverview.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>376</width>
<height>205</height>
<height>323</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
Expand Down Expand Up @@ -119,13 +119,112 @@
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="cleanCheck">
<property name="toolTip">
<string>Remove all overviews.</string>
</property>
<property name="text">
<string>Clean</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="roModeCheck">
<property name="toolTip">
<string>In order to generate external overview (for GeoTIFF especially).</string>
</property>
<property name="text">
<string>Open in read-only mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="tiffjpegCheck">
<property name="toolTip">
<string>Create external overviews in TIFF format, compressed using JPEG.</string>
</property>
<property name="text">
<string>Overviews in TIFF format with JPEG compression</string>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="jpegQualityContainer">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>24</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="jpegQualityLabel">
<property name="toolTip">
<string>For JPEG compressed external overviews,
the JPEG quality can be set.</string>
</property>
<property name="text">
<string>JPEG Quality (1-100):</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="jpegQualitySpin">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>For JPEG compressed external overviews,
the JPEG quality can be set.</string>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>80</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QCheckBox" name="rrdCheck">
<property name="toolTip">
<string>Alternate overview format using Erdas Imagine format,
placing the overviews in an associated .aux file
suitable for direct use with Imagine,ArcGIS, GDAL.</string>
</property>
<property name="text">
<string>Use Imagine format (.aux file)</string>
</property>
</widget>
</item>
<item>
<widget class="QProgressBar" name="progressBar"/>
</item>
Expand Down

0 comments on commit 9fa7469

Please sign in to comment.