The following commit has been merged in the master branch:
commit 5e7a21412bb210b0b616d2855f08419378985248
Author: Andrew Harvey
Date: Sat Oct 13 11:54:35 2012 +1100
Imported Upstream version 1.42.1
diff --git a/._VERSION b/._VERSION
index 56185a5..bfbc466 100644
Binary files a/._VERSION and b/._VERSION differ
diff --git a/._tilestache.cfg b/._tilestache.cfg
index 7338e96..7da2bda 100644
Binary files a/._tilestache.cfg and b/._tilestache.cfg differ
diff --git a/TileStache/Goodies/Providers/GDAL.py
b/TileStache/Goodies/Providers/GDAL.py
index 446ad41..b09afcd 100644
--- a/TileStache/Goodies/Providers/GDAL.py
+++ b/TileStache/Goodies/Providers/GDAL.py
@@ -104,9 +104,30 @@ class Provider:
if mask_ds is not None:
mask_ds.SetGeoTransform(gtx)
+# Adjust resampling method
-
+
+resample = self.resample
+
+if resample == gdal.GRA_CubicSpline:
+#
+# I've found through testing that when ReprojectImage is used
+# on two same-scaled datasources, GDAL will visibly darken the
+# output and the results look terrible. Switching resampling
+# from cubic spline to bicubic in these cases fixes the output.
+#
+xscale = area_ds.GetGeoTransform()[1] /
src_ds.GetGeoTransform()[1]
+yscale = area_ds.GetGeoTransform()[5] /
src_ds.GetGeoTransform()[5]
+diff = max(abs(xscale - 1), abs(yscale - 1))
+
+if diff < .001:
+resample = gdal.GRA_Cubic
+
# Create rendered area
-
-gdal.ReprojectImage(src_ds, area_ds, src_ds.GetProjection(),
area_ds.GetProjection(), self.resample)
+src_sref = osr.SpatialReference()
+src_sref.ImportFromWkt(src_ds.GetProjection())
+
+gdal.ReprojectImage(src_ds, area_ds, src_ds.GetProjection(),
area_ds.GetProjection(), resample)
if mask_ds is not None:
# Interpolating validity makes no sense and so we can use
nearest neighbour resampling here no matter
# what is requested.
diff --git a/TileStache/__init__.py b/TileStache/__init__.py
index d666c47..4c8812c 100644
--- a/TileStache/__init__.py
+++ b/TileStache/__init__.py
@@ -8,7 +8,7 @@ designers and cartographers.
Documentation available at http://tilestache.org/doc/
"""
-__version__ = '1.42.0'
+__version__ = '1.42.1'
import re
diff --git a/VERSION b/VERSION
index a50908c..e640847 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.42.0
+1.42.1
diff --git a/doc/TileStache.Goodies.Proj4Projection.html
b/doc/TileStache.Goodies.Proj4Projection.html
index eba460e..93e889e 100644
--- a/doc/TileStache.Goodies.Proj4Projection.html
+++ b/doc/TileStache.Goodies.Proj4Projection.html
@@ -101,7 +101,7 @@ Optional attributes:
Methods defined here:
-__init__(self,
srs, resolutions, tile_size=256,
transformation=)Creates a new instance with the projection specified in srs, which is in Proj4
+__init__(self,
srs, resolutions, tile_size=256,
transformation=)Creates a new instance with the projection specified in srs, which is in Proj4
format.
coordinateProj(self,
coord)Convert from Coordinate object to a Point object in the defined projection
diff --git a/doc/TileStache.Sandwich.html b/doc/TileStache.Sandwich.html
index ce276f1..ca63a1b 100644
--- a/doc/TileStache.Sandwich.html
+++ b/doc/TileStache.Sandwich.html
@@ -205,6 +205,6 @@ Examples:
Data
-adjustment_names = {'curves': , 'curves2': ,
'threshold': }
-blend_modes = {'add': ,
'hard light': , 'linear light':
, 'multiply': , 'screen': ,
'subtract': }
+adjustment_names = {'curves': , 'curves2': ,
'threshold': }
+blend_modes = {'add': ,
'hard light': , 'linear light':
, 'multiply': , 'screen': ,
'subtract': }
\ No newline at end of file
diff --git a/doc/index.html b/doc/index.html
index acc6806..5d0ce3f 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -76,7 +76,7 @@
-This document covers TileStache version 1.42.0.
+