summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Arnold <nerdboy@gentoo.org>2010-04-12 07:11:44 +0000
committerSteve Arnold <nerdboy@gentoo.org>2010-04-12 07:11:44 +0000
commitcf388cc6fc48a6bdb0477a394c5a0471ce3c63ad (patch)
tree3392329c3300c35cf0f692277480649edbc35fce /sci-libs
parentversion bump (diff)
downloadgentoo-2-cf388cc6fc48a6bdb0477a394c5a0471ce3c63ad.tar.gz
gentoo-2-cf388cc6fc48a6bdb0477a394c5a0471ce3c63ad.tar.bz2
gentoo-2-cf388cc6fc48a6bdb0477a394c5a0471ce3c63ad.zip
Applied back-ported upstream patch for warping operations; closes bug 314717.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/gdal/ChangeLog9
-rw-r--r--sci-libs/gdal/files/gdal-1.7.1-warp_fix.patch62
-rw-r--r--sci-libs/gdal/gdal-1.7.1-r1.ebuild (renamed from sci-libs/gdal/gdal-1.7.1.ebuild)5
3 files changed, 73 insertions, 3 deletions
diff --git a/sci-libs/gdal/ChangeLog b/sci-libs/gdal/ChangeLog
index 180d33f9f427..85bdf190a76a 100644
--- a/sci-libs/gdal/ChangeLog
+++ b/sci-libs/gdal/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sci-libs/gdal
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.76 2010/04/05 04:50:31 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/ChangeLog,v 1.77 2010/04/12 07:11:44 nerdboy Exp $
+
+*gdal-1.7.1-r1 (12 Apr 2010)
+
+ 12 Apr 2010; Steve Arnold <nerdboy@gentoo.org> -gdal-1.7.1.ebuild,
+ +gdal-1.7.1-r1.ebuild, +files/gdal-1.7.1-warp_fix.patch:
+ Applied back-ported upstream patch for warping operations; (closes bug
+ #314717).
*gdal-1.7.1 (05 Apr 2010)
diff --git a/sci-libs/gdal/files/gdal-1.7.1-warp_fix.patch b/sci-libs/gdal/files/gdal-1.7.1-warp_fix.patch
new file mode 100644
index 000000000000..753dcaaf6cb9
--- /dev/null
+++ b/sci-libs/gdal/files/gdal-1.7.1-warp_fix.patch
@@ -0,0 +1,62 @@
+--- alg/gdalwarper.cpp.orig 2010-04-11 19:20:16.985645233 -0700
++++ alg/gdalwarper.cpp 2010-04-11 19:22:02.711324130 -0700
+@@ -697,6 +697,14 @@
+ * to enable ALL_TOUCHEd mode when rasterizing cutline polygons. This is
+ * useful to ensure that that all pixels overlapping the cutline polygon
+ * will be selected, not just those whose center point falls within the
++ *
++ * - OPTIMIZE_SIZE: This defaults to FALSE, but may be set to TRUE when
++ * outputing typically to a compressed dataset (GeoTIFF with COMPRESSED creation
++ * option set for example) for achieving a smaller file size. This is achieved
++ * by writing at once data aligned on full blocks of the target dataset, which
++ * avoids partial writes of compressed blocks and lost space when they are rewritten
++ * at the end of the file. However sticking to target block size may cause major
++ * processing slowdown for some particular reprojections.
+ * polygon.
+ */
+
+--- alg/gdalwarpoperation.cpp.orig 2010-04-11 19:11:35.921500930 -0700
++++ alg/gdalwarpoperation.cpp 2010-04-11 19:19:15.691577821 -0700
+@@ -1000,16 +1000,21 @@
+ if( dfTotalMemoryUse > psOptions->dfWarpMemoryLimit
+ && (nDstXSize > 2 || nDstYSize > 2) )
+ {
++ int bOptimizeSize =
++ CSLFetchBoolean( psOptions->papszWarpOptions, "OPTIMIZE_SIZE", FALSE );
++
+ /* If the region width is greater than the region height, */
+- /* cut in half in the width. Do this only if each half part */
++ /* cut in half in the width. When we want to optimize the size */
++ /* of a compressed output dataset, do this only if each half part */
+ /* is at least as wide as the block width */
+ if( nDstXSize > nDstYSize &&
+- (nDstXSize / 2 >= nBlockXSize || nDstYSize == 1) )
++ (!bOptimizeSize ||
++ (bOptimizeSize && (nDstXSize / 2 >= nBlockXSize || nDstYSize == 1))) )
+ {
+ int nChunk1 = nDstXSize / 2;
+
+- /* Try to stick on target block boundaries */
+- if (nChunk1 > nBlockXSize)
++ /* In the optimize size case, try to stick on target block boundaries */
++ if (bOptimizeSize && nChunk1 > nBlockXSize)
+ nChunk1 = (nChunk1 / nBlockXSize) * nBlockXSize;
+
+ int nChunk2 = nDstXSize - nChunk1;
+@@ -1026,12 +1031,13 @@
+ else
+ {
+ int nChunk1 = nDstYSize / 2;
+- int nChunk2 = nDstYSize - nChunk1;
+
+- /* Try to stick on target block boundaries */
+- if (nChunk1 > nBlockYSize)
++ /* In the optimize size case, try to stick on target block boundaries */
++ if (bOptimizeSize && nChunk1 > nBlockYSize)
+ nChunk1 = (nChunk1 / nBlockYSize) * nBlockYSize;
+
++ int nChunk2 = nDstYSize - nChunk1;
++
+ eErr = CollectChunkList( nDstXOff, nDstYOff,
+ nDstXSize, nChunk1 );
+
diff --git a/sci-libs/gdal/gdal-1.7.1.ebuild b/sci-libs/gdal/gdal-1.7.1-r1.ebuild
index f13786d1fb8a..1d2c23b1dc81 100644
--- a/sci-libs/gdal/gdal-1.7.1.ebuild
+++ b/sci-libs/gdal/gdal-1.7.1-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.7.1.ebuild,v 1.1 2010/04/05 04:50:31 nerdboy Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/gdal/gdal-1.7.1-r1.ebuild,v 1.1 2010/04/12 07:11:44 nerdboy Exp $
EAPI="2"
@@ -83,7 +83,8 @@ src_prepare() {
"${FILESDIR}"/${PN}-1.5.0-soname.patch \
"${FILESDIR}"/${PN}-1.5.1-python-install.patch \
"${FILESDIR}"/${PN}-1.6.0-swig-fix.patch \
- "${FILESDIR}"/${PN}-1.6.1-ruby-make.patch
+ "${FILESDIR}"/${PN}-1.6.1-ruby-make.patch \
+ "${FILESDIR}"/${P}-warp_fix.patch
if useq hdf && useq netcdf; then
ewarn "Netcdf and HDF4 are incompatible due to certain tools in"