[gdal] 01/06: Imported Upstream version 2.1.0~rc2+dfsg
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Fri Apr 29 10:45:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch experimental-2.1
in repository gdal.
commit 1b7ef9663c22cd946115cafe8912adda66064445
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Fri Apr 29 11:00:54 2016 +0200
Imported Upstream version 2.1.0~rc2+dfsg
---
NEWS | 7 +++-
apps/gdal_rasterize_lib.cpp | 10 +++--
frmts/xyz/xyzdataset.cpp | 62 +++++++++++++++++++++++-----
gcore/gdal_version.h | 2 +-
man/man1/_home_rouault_dist_wrk_gdal_apps_.1 | 2 +-
man/man1/gdal-config.1 | 2 +-
man/man1/gdal2tiles.1 | 2 +-
man/man1/gdal_calc.1 | 2 +-
man/man1/gdal_contour.1 | 2 +-
man/man1/gdal_edit.1 | 2 +-
man/man1/gdal_fillnodata.1 | 2 +-
man/man1/gdal_grid.1 | 2 +-
man/man1/gdal_merge.1 | 2 +-
man/man1/gdal_pansharpen.1 | 2 +-
man/man1/gdal_polygonize.1 | 2 +-
man/man1/gdal_proximity.1 | 2 +-
man/man1/gdal_rasterize.1 | 2 +-
man/man1/gdal_retile.1 | 2 +-
man/man1/gdal_sieve.1 | 2 +-
man/man1/gdal_translate.1 | 2 +-
man/man1/gdal_utilities.1 | 2 +-
man/man1/gdaladdo.1 | 2 +-
man/man1/gdalbuildvrt.1 | 2 +-
man/man1/gdalcompare.1 | 2 +-
man/man1/gdaldem.1 | 2 +-
man/man1/gdalinfo.1 | 2 +-
man/man1/gdallocationinfo.1 | 2 +-
man/man1/gdalmanage.1 | 2 +-
man/man1/gdalmove.1 | 2 +-
man/man1/gdalsrsinfo.1 | 2 +-
man/man1/gdaltindex.1 | 2 +-
man/man1/gdaltransform.1 | 2 +-
man/man1/gdalwarp.1 | 2 +-
man/man1/gnm_utilities.1 | 2 +-
man/man1/gnmanalyse.1 | 2 +-
man/man1/gnmmanage.1 | 2 +-
man/man1/nearblack.1 | 2 +-
man/man1/ogr2ogr.1 | 2 +-
man/man1/ogr_utilities.1 | 2 +-
man/man1/ogrinfo.1 | 2 +-
man/man1/ogrlineref.1 | 2 +-
man/man1/ogrtindex.1 | 2 +-
man/man1/pct2rgb.1 | 2 +-
man/man1/rgb2pct.1 | 2 +-
ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp | 8 ++--
swig/python/scripts/gdal_calc.py | 13 ++++--
46 files changed, 118 insertions(+), 64 deletions(-)
diff --git a/NEWS b/NEWS
index 4ff31d1..50de67f 100644
--- a/NEWS
+++ b/NEWS
@@ -92,7 +92,7 @@ Build(Unix):
* Removed --without-ogr configure flag (#6117). Always build with OGR.
Build(Windows):
- * Add support for Visual Studio 2015 (a.k.a MSVC_VER=1900 or VC 13)
+ * Add support for Visual Studio 2015 (a.k.a MSVC_VER=1900 or VC 14)
* Add KAKFLAGS to nmake.opt with KDU_{MAJOR,MINOR,PATCH}_VERSION define-s.
* nmake.opt: make it less error prone to define SETARGV when paths include spaces (#6032)
* nmake.opt: add CL.EXE compiler option /FC to display full path of source code file in diagnostics
@@ -212,6 +212,7 @@ Utilities:
* gdal_rasterize: do on-the-fly reprojection of input vector onto output raster
* gdal_rasterize: rasterize: always create output with 1/2 cell buffer of input geometry envelope (#6058)
* gdal_rasterize: add the -dialect option
+ * gdal_rasterize: accept NaN as a valid value for -init / -burn (#6467)
* gdalwarp: add -doo option to specify open options of (existing) output dataset
* gdalwarp: if RPC_DEM warping option is specified, use exact transformer by default (#5993)
* gdalwarp: make it honour nodata value of existing dataset (if -dstNoData isn't explicitly specified)
@@ -237,6 +238,7 @@ Utilities:
* gdal_merge.py: takes again into account -n flag (#6067)
* gdalbuildvrt / gdal_translate / VRT: use floating point values for source and destination offsets and sizes (#6127)
* gdalmove.py: fix to run with GDAL 2.0 gdal.InvGeoTransform() signature
+ * gdal_calc.py: Add * from gdalnumeric to gdal_calc.py eval namespace again, to fix 2.0 regression that made for example 'log10(A)' to no longer work (https://github.com/OSGeo/gdal/pull/121)
Python samples:
* gdalpythonserver.py: update to protocol 3
@@ -458,6 +460,9 @@ WMS driver:
* limit number of zoom levels for ArcGIS MapServer JSon (#6186)
* determine a resolution that will not result in a number that is larger than the maximum size of an integer. Any value that exceeds the maximum size of an integer will raise an invalid dataset dimensions error. (https://github.com/OSGeo/gdal/pull/89)
+XYZ driver:
+ * be more robust to not exactly equal X and Y spacing (#6461)
+
== OGR 2.1.0 - Overview of Changes ==
Core:
diff --git a/apps/gdal_rasterize_lib.cpp b/apps/gdal_rasterize_lib.cpp
index 74fef47..a2107d8 100644
--- a/apps/gdal_rasterize_lib.cpp
+++ b/apps/gdal_rasterize_lib.cpp
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal_rasterize_lib.cpp 33615 2016-03-02 20:19:22Z goatbar $
+ * $Id: gdal_rasterize_lib.cpp 34044 2016-04-21 08:23:14Z rouault $
*
* Project: GDAL Utilities
* Purpose: Rasterize OGR shapes into a GDAL raster.
@@ -38,16 +38,18 @@
#include "gdal_utils_priv.h"
#include <vector>
-CPL_CVSID("$Id: gdal_rasterize_lib.cpp 33615 2016-03-02 20:19:22Z goatbar $");
+CPL_CVSID("$Id: gdal_rasterize_lib.cpp 34044 2016-04-21 08:23:14Z rouault $");
/************************************************************************/
/* ArgIsNumeric() */
/************************************************************************/
-static int ArgIsNumeric( const char *pszArg )
+static bool ArgIsNumeric( const char *pszArg )
{
- return CPLGetValueType(pszArg) != CPL_VALUE_STRING;
+ char* pszEnd = NULL;
+ CPLStrtod(pszArg, &pszEnd);
+ return pszEnd != NULL && pszEnd[0] == '\0';
}
diff --git a/frmts/xyz/xyzdataset.cpp b/frmts/xyz/xyzdataset.cpp
index 6acbffc..64aec58 100644
--- a/frmts/xyz/xyzdataset.cpp
+++ b/frmts/xyz/xyzdataset.cpp
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: xyzdataset.cpp 33720 2016-03-15 00:39:53Z goatbar $
+ * $Id: xyzdataset.cpp 34022 2016-04-18 19:53:58Z rouault $
*
* Project: XYZ driver
* Purpose: GDALDataset driver for XYZ dataset.
@@ -35,7 +35,9 @@
#include <algorithm>
#include <vector>
-CPL_CVSID("$Id: xyzdataset.cpp 33720 2016-03-15 00:39:53Z goatbar $");
+CPL_CVSID("$Id: xyzdataset.cpp 34022 2016-04-18 19:53:58Z rouault $");
+
+static const double RELATIVE_ERROR = 1e-3;
/************************************************************************/
/* ==================================================================== */
@@ -312,7 +314,7 @@ CPLErr XYZRasterBand::IReadBlock( CPL_UNUSED int nBlockXOff,
}
else
{
- if( fabs(dfY - dfExpectedY) > 1e-8 )
+ if( fabs( (dfY - dfExpectedY) / poGDS->adfGeoTransform[5] ) > RELATIVE_ERROR )
{
if( idx < 0 )
{
@@ -736,6 +738,8 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
int bStepYSign = 0;
const char* pszLine;
+ GIntBig nCountStepX = 0;
+ GIntBig nCountStepY = 0;
while((pszLine = CPLReadLine2L(fp, 100, NULL)) != NULL)
{
nLineNum ++;
@@ -887,12 +891,30 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
std::vector<double>::iterator oIter = adfStepX.begin();
while( oIter != adfStepX.end() )
{
- if( dfStepX < *oIter && fmod( *oIter, dfStepX ) < 1e-8 )
+ if( fabs(( dfStepX - *oIter ) / dfStepX ) < RELATIVE_ERROR )
{
+ if( nCountStepX > 0 )
+ {
+ // Update mean step
+ /* n * mean(n) = (n-1) * mean(n-1) + val(n)
+ mean(n) = mean(n-1) + (val(n) - mean(n-1)) / n */
+ nCountStepX ++;
+ *oIter += ( dfStepX - *oIter ) / nCountStepX;
+ }
+
+ bAddNewValue = false;
+ break;
+ }
+ else if( dfStepX < *oIter &&
+ fabs(*oIter - static_cast<int>(*oIter / dfStepX + 0.5) * dfStepX) / dfStepX < RELATIVE_ERROR )
+ {
+ nCountStepX = -1; // disable update of mean
adfStepX.erase(oIter);
}
- else if( dfStepX > *oIter && fmod( dfStepX, *oIter ) < 1e-8 )
+ else if( dfStepX > *oIter &&
+ fabs(dfStepX - static_cast<int>(dfStepX / *oIter + 0.5) * (*oIter)) / dfStepX < RELATIVE_ERROR )
{
+ nCountStepX = -1; // disable update of mean
bAddNewValue = false;
break;
}
@@ -903,8 +925,17 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
}
if( bAddNewValue )
{
+ CPLDebug("XYZ", "New stepX=%.15f", dfStepX);
adfStepX.push_back(dfStepX);
- if( adfStepX.size() == 10 )
+ if( adfStepX.size() == 1 && nCountStepX == 0)
+ {
+ nCountStepX ++;
+ }
+ else if( adfStepX.size() == 2 )
+ {
+ nCountStepX = -1; // disable update of mean
+ }
+ else if( adfStepX.size() == 10 )
{
CPLError(CE_Failure, CPLE_AppDefined,
"Ungridded dataset: too many stepX values");
@@ -928,15 +959,24 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
return NULL;
}
if( bNewStepYSign < 0 ) dfStepY = -dfStepY;
+ nCountStepY ++;
if( adfStepY.size() == 0 )
+ {
adfStepY.push_back(dfStepY);
- else if( adfStepY[0] != dfStepY )
+ }
+ else if( fabs( (adfStepY[0] - dfStepY) / dfStepY ) > RELATIVE_ERROR )
{
+ CPLDebug("XYZ", "New stepY=%.15f prev stepY=%.15f", dfStepY, adfStepY[0]);
CPLError(CE_Failure, CPLE_AppDefined,
"Ungridded dataset: At line " CPL_FRMT_GIB ", too many stepY values", nLineNum);
VSIFCloseL(fp);
return NULL;
}
+ else
+ {
+ // Update mean step
+ adfStepY[0] += ( dfStepY - adfStepY[0] ) / nCountStepY;
+ }
}
if (dfX < dfMinX) dfMinX = dfX;
@@ -963,10 +1003,8 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
return NULL;
}
- const double dfStepX = adfStepX[0];
- const double dfStepY = adfStepY[0] * bStepYSign;
- const double dfXSize = 1 + ((dfMaxX - dfMinX) / dfStepX + 0.5);
- const double dfYSize = 1 + ((dfMaxY - dfMinY) / fabs(dfStepY) + 0.5);
+ const double dfXSize = 1 + ((dfMaxX - dfMinX) / adfStepX[0] + 0.5);
+ const double dfYSize = 1 + ((dfMaxY - dfMinY) / adfStepY[0] + 0.5);
if( dfXSize <= 0 || dfXSize > INT_MAX || dfYSize <= 0 || dfYSize > INT_MAX )
{
CPLError(CE_Failure, CPLE_AppDefined, "Invalid dimensions");
@@ -975,6 +1013,8 @@ GDALDataset *XYZDataset::Open( GDALOpenInfo * poOpenInfo )
}
const int nXSize = static_cast<int>(dfXSize);
const int nYSize = static_cast<int>(dfYSize);
+ const double dfStepX = (dfMaxX - dfMinX) / (nXSize - 1);
+ const double dfStepY = (dfMaxY - dfMinY) / (nYSize - 1)* bStepYSign;
#ifdef DEBUG_VERBOSE
CPLDebug("XYZ", "minx=%f maxx=%f stepx=%f", dfMinX, dfMaxX, dfStepX);
diff --git a/gcore/gdal_version.h b/gcore/gdal_version.h
index d3bc104..f9ca3ef 100644
--- a/gcore/gdal_version.h
+++ b/gcore/gdal_version.h
@@ -22,7 +22,7 @@
#endif
#ifndef GDAL_RELEASE_DATE
-# define GDAL_RELEASE_DATE 20160418
+# define GDAL_RELEASE_DATE 20160421
#endif
#ifndef GDAL_RELEASE_NAME
# define GDAL_RELEASE_NAME "2.1.0"
diff --git a/man/man1/_home_rouault_dist_wrk_gdal_apps_.1 b/man/man1/_home_rouault_dist_wrk_gdal_apps_.1
index bb9fa9e..1deacc7 100644
--- a/man/man1/_home_rouault_dist_wrk_gdal_apps_.1
+++ b/man/man1/_home_rouault_dist_wrk_gdal_apps_.1
@@ -1,4 +1,4 @@
-.TH "apps Directory Reference" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "apps Directory Reference" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal-config.1 b/man/man1/gdal-config.1
index 310d24b..fcc15bb 100644
--- a/man/man1/gdal-config.1
+++ b/man/man1/gdal-config.1
@@ -1,4 +1,4 @@
-.TH "gdal-config" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal-config" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal2tiles.1 b/man/man1/gdal2tiles.1
index 0a96c42..0a14a78 100644
--- a/man/man1/gdal2tiles.1
+++ b/man/man1/gdal2tiles.1
@@ -1,4 +1,4 @@
-.TH "gdal2tiles" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal2tiles" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_calc.1 b/man/man1/gdal_calc.1
index 19ca0f4..15d829d 100644
--- a/man/man1/gdal_calc.1
+++ b/man/man1/gdal_calc.1
@@ -1,4 +1,4 @@
-.TH "gdal_calc" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_calc" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_contour.1 b/man/man1/gdal_contour.1
index e0aa941..bf8b4a1 100644
--- a/man/man1/gdal_contour.1
+++ b/man/man1/gdal_contour.1
@@ -1,4 +1,4 @@
-.TH "gdal_contour" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_contour" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_edit.1 b/man/man1/gdal_edit.1
index 4c34f66..3375b56 100644
--- a/man/man1/gdal_edit.1
+++ b/man/man1/gdal_edit.1
@@ -1,4 +1,4 @@
-.TH "gdal_edit" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_edit" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_fillnodata.1 b/man/man1/gdal_fillnodata.1
index 2eb379b..7b76a5a 100644
--- a/man/man1/gdal_fillnodata.1
+++ b/man/man1/gdal_fillnodata.1
@@ -1,4 +1,4 @@
-.TH "gdal_fillnodata" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_fillnodata" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_grid.1 b/man/man1/gdal_grid.1
index 7c9befa..7acb8e0 100644
--- a/man/man1/gdal_grid.1
+++ b/man/man1/gdal_grid.1
@@ -1,4 +1,4 @@
-.TH "gdal_grid" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_grid" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_merge.1 b/man/man1/gdal_merge.1
index cddbb3c..28ba6be 100644
--- a/man/man1/gdal_merge.1
+++ b/man/man1/gdal_merge.1
@@ -1,4 +1,4 @@
-.TH "gdal_merge" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_merge" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_pansharpen.1 b/man/man1/gdal_pansharpen.1
index 0836cd2..be191d5 100644
--- a/man/man1/gdal_pansharpen.1
+++ b/man/man1/gdal_pansharpen.1
@@ -1,4 +1,4 @@
-.TH "gdal_pansharpen" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_pansharpen" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_polygonize.1 b/man/man1/gdal_polygonize.1
index 45abe72..8c194e4 100644
--- a/man/man1/gdal_polygonize.1
+++ b/man/man1/gdal_polygonize.1
@@ -1,4 +1,4 @@
-.TH "gdal_polygonize" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_polygonize" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_proximity.1 b/man/man1/gdal_proximity.1
index 107edba..b3c37a4 100644
--- a/man/man1/gdal_proximity.1
+++ b/man/man1/gdal_proximity.1
@@ -1,4 +1,4 @@
-.TH "gdal_proximity" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_proximity" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_rasterize.1 b/man/man1/gdal_rasterize.1
index 4d4e1ed..75d2908 100644
--- a/man/man1/gdal_rasterize.1
+++ b/man/man1/gdal_rasterize.1
@@ -1,4 +1,4 @@
-.TH "gdal_rasterize" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_rasterize" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_retile.1 b/man/man1/gdal_retile.1
index 5c170a4..be11df5 100644
--- a/man/man1/gdal_retile.1
+++ b/man/man1/gdal_retile.1
@@ -1,4 +1,4 @@
-.TH "gdal_retile" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_retile" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_sieve.1 b/man/man1/gdal_sieve.1
index b4e6f2b..30af76a 100644
--- a/man/man1/gdal_sieve.1
+++ b/man/man1/gdal_sieve.1
@@ -1,4 +1,4 @@
-.TH "gdal_sieve" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_sieve" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_translate.1 b/man/man1/gdal_translate.1
index a0f68f3..62667dc 100644
--- a/man/man1/gdal_translate.1
+++ b/man/man1/gdal_translate.1
@@ -1,4 +1,4 @@
-.TH "gdal_translate" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_translate" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdal_utilities.1 b/man/man1/gdal_utilities.1
index 2d3900e..b67d0b9 100644
--- a/man/man1/gdal_utilities.1
+++ b/man/man1/gdal_utilities.1
@@ -1,4 +1,4 @@
-.TH "gdal_utilities" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdal_utilities" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdaladdo.1 b/man/man1/gdaladdo.1
index ce4ff9b..c079353 100644
--- a/man/man1/gdaladdo.1
+++ b/man/man1/gdaladdo.1
@@ -1,4 +1,4 @@
-.TH "gdaladdo" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdaladdo" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalbuildvrt.1 b/man/man1/gdalbuildvrt.1
index 886e830..d4d9cfc 100644
--- a/man/man1/gdalbuildvrt.1
+++ b/man/man1/gdalbuildvrt.1
@@ -1,4 +1,4 @@
-.TH "gdalbuildvrt" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalbuildvrt" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalcompare.1 b/man/man1/gdalcompare.1
index c8d749d..f9a6d0f 100644
--- a/man/man1/gdalcompare.1
+++ b/man/man1/gdalcompare.1
@@ -1,4 +1,4 @@
-.TH "gdalcompare" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalcompare" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdaldem.1 b/man/man1/gdaldem.1
index fd7c19d..f45e086 100644
--- a/man/man1/gdaldem.1
+++ b/man/man1/gdaldem.1
@@ -1,4 +1,4 @@
-.TH "gdaldem" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdaldem" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalinfo.1 b/man/man1/gdalinfo.1
index a593157..3ad8c14 100644
--- a/man/man1/gdalinfo.1
+++ b/man/man1/gdalinfo.1
@@ -1,4 +1,4 @@
-.TH "gdalinfo" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalinfo" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdallocationinfo.1 b/man/man1/gdallocationinfo.1
index e73f0a9..c4ce547 100644
--- a/man/man1/gdallocationinfo.1
+++ b/man/man1/gdallocationinfo.1
@@ -1,4 +1,4 @@
-.TH "gdallocationinfo" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdallocationinfo" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalmanage.1 b/man/man1/gdalmanage.1
index 27f4053..49a9a76 100644
--- a/man/man1/gdalmanage.1
+++ b/man/man1/gdalmanage.1
@@ -1,4 +1,4 @@
-.TH "gdalmanage" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalmanage" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalmove.1 b/man/man1/gdalmove.1
index edce57c..4f42e59 100644
--- a/man/man1/gdalmove.1
+++ b/man/man1/gdalmove.1
@@ -1,4 +1,4 @@
-.TH "gdalmove" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalmove" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalsrsinfo.1 b/man/man1/gdalsrsinfo.1
index 8b9c6df..915701b 100644
--- a/man/man1/gdalsrsinfo.1
+++ b/man/man1/gdalsrsinfo.1
@@ -1,4 +1,4 @@
-.TH "gdalsrsinfo" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalsrsinfo" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdaltindex.1 b/man/man1/gdaltindex.1
index 08d8d10..c9eba67 100644
--- a/man/man1/gdaltindex.1
+++ b/man/man1/gdaltindex.1
@@ -1,4 +1,4 @@
-.TH "gdaltindex" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdaltindex" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdaltransform.1 b/man/man1/gdaltransform.1
index 9d2958f..c0b8676 100644
--- a/man/man1/gdaltransform.1
+++ b/man/man1/gdaltransform.1
@@ -1,4 +1,4 @@
-.TH "gdaltransform" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdaltransform" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gdalwarp.1 b/man/man1/gdalwarp.1
index 904153b..d9dc1ec 100644
--- a/man/man1/gdalwarp.1
+++ b/man/man1/gdalwarp.1
@@ -1,4 +1,4 @@
-.TH "gdalwarp" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gdalwarp" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gnm_utilities.1 b/man/man1/gnm_utilities.1
index 85dc56f..89b38b7 100644
--- a/man/man1/gnm_utilities.1
+++ b/man/man1/gnm_utilities.1
@@ -1,4 +1,4 @@
-.TH "gnm_utilities" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gnm_utilities" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gnmanalyse.1 b/man/man1/gnmanalyse.1
index 518e81f..3114ea4 100644
--- a/man/man1/gnmanalyse.1
+++ b/man/man1/gnmanalyse.1
@@ -1,4 +1,4 @@
-.TH "gnmanalyse" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gnmanalyse" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/gnmmanage.1 b/man/man1/gnmmanage.1
index 464fe89..745d148 100644
--- a/man/man1/gnmmanage.1
+++ b/man/man1/gnmmanage.1
@@ -1,4 +1,4 @@
-.TH "gnmmanage" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "gnmmanage" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/nearblack.1 b/man/man1/nearblack.1
index a65614a..6100699 100644
--- a/man/man1/nearblack.1
+++ b/man/man1/nearblack.1
@@ -1,4 +1,4 @@
-.TH "nearblack" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "nearblack" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/ogr2ogr.1 b/man/man1/ogr2ogr.1
index a82a972..c1c8286 100644
--- a/man/man1/ogr2ogr.1
+++ b/man/man1/ogr2ogr.1
@@ -1,4 +1,4 @@
-.TH "ogr2ogr" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "ogr2ogr" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/ogr_utilities.1 b/man/man1/ogr_utilities.1
index f535fd8..5582e16 100644
--- a/man/man1/ogr_utilities.1
+++ b/man/man1/ogr_utilities.1
@@ -1,4 +1,4 @@
-.TH "ogr_utilities" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "ogr_utilities" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/ogrinfo.1 b/man/man1/ogrinfo.1
index a8a597f..3647f2a 100644
--- a/man/man1/ogrinfo.1
+++ b/man/man1/ogrinfo.1
@@ -1,4 +1,4 @@
-.TH "ogrinfo" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "ogrinfo" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/ogrlineref.1 b/man/man1/ogrlineref.1
index 12026ef..dcea114 100644
--- a/man/man1/ogrlineref.1
+++ b/man/man1/ogrlineref.1
@@ -1,4 +1,4 @@
-.TH "ogrlineref" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "ogrlineref" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/ogrtindex.1 b/man/man1/ogrtindex.1
index 9176d4a..dfa5237 100644
--- a/man/man1/ogrtindex.1
+++ b/man/man1/ogrtindex.1
@@ -1,4 +1,4 @@
-.TH "ogrtindex" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "ogrtindex" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/pct2rgb.1 b/man/man1/pct2rgb.1
index 10e7354..34b1508 100644
--- a/man/man1/pct2rgb.1
+++ b/man/man1/pct2rgb.1
@@ -1,4 +1,4 @@
-.TH "pct2rgb" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "pct2rgb" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/man/man1/rgb2pct.1 b/man/man1/rgb2pct.1
index 3ae32c0..10a619f 100644
--- a/man/man1/rgb2pct.1
+++ b/man/man1/rgb2pct.1
@@ -1,4 +1,4 @@
-.TH "rgb2pct" 1 "Mon Apr 18 2016" "GDAL" \" -*- nroff -*-
+.TH "rgb2pct" 1 "Thu Apr 21 2016" "GDAL" \" -*- nroff -*-
.ad l
.nh
.SH NAME
diff --git a/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp b/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp
index 98a3c24..b29bad9 100644
--- a/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp
+++ b/ogr/ogrsf_frmts/vrt/ogrvrtdatasource.cpp
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: ogrvrtdatasource.cpp 33714 2016-03-13 05:42:13Z goatbar $
+ * $Id: ogrvrtdatasource.cpp 34048 2016-04-21 18:14:02Z rouault $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: Implements OGRVRTDataSource class.
@@ -34,7 +34,7 @@
#include "ogrwarpedlayer.h"
#include "ogrunionlayer.h"
-CPL_CVSID("$Id: ogrvrtdatasource.cpp 33714 2016-03-13 05:42:13Z goatbar $");
+CPL_CVSID("$Id: ogrvrtdatasource.cpp 34048 2016-04-21 18:14:02Z rouault $");
/************************************************************************/
/* OGRVRTGetGeometryType() */
@@ -58,7 +58,7 @@ static const OGRGeomTypeName asGeomTypeNames[] = { /* 25D versions are implicit
{ wkbCircularString, "wkbCircularString" },
{ wkbCompoundCurve, "wkbCompoundCurve" },
{ wkbCurvePolygon, "wkbCurvePolygon" },
- { wkbGeometryCollection, "wkbMultiCurve" },
+ { wkbMultiCurve, "wkbMultiCurve" },
{ wkbMultiSurface, "wkbMultiSurface" },
{ wkbCurve, "wkbCurve" },
{ wkbSurface, "wkbSurface" },
@@ -83,7 +83,7 @@ OGRwkbGeometryType OGRVRTGetGeometryType(const char* pszGType, int* pbError)
if( strstr(pszGType,"25D") != NULL || strstr(pszGType,"Z") != NULL )
eGeomType = wkbSetZ(eGeomType);
- if( strstr(pszGType,"M") != NULL )
+ if( pszGType[strlen(pszGType)-1] == 'M' || pszGType[strlen(pszGType)-2] == 'M' )
eGeomType = wkbSetM(eGeomType);
break;
}
diff --git a/swig/python/scripts/gdal_calc.py b/swig/python/scripts/gdal_calc.py
index de35ac6..7f1d766 100755
--- a/swig/python/scripts/gdal_calc.py
+++ b/swig/python/scripts/gdal_calc.py
@@ -67,6 +67,10 @@ def doit(opts, args):
if opts.debug:
print("gdal_calc.py starting calculation %s" %(opts.calc))
+ # set up global namespace for eval with all functions of gdalnumeric
+ global_namespace = dict([(key, getattr(gdalnumeric, key))
+ for key in dir(gdalnumeric) if not key.startswith('__')])
+
################################################################
# fetch details of input layers
################################################################
@@ -249,6 +253,9 @@ def doit(opts, args):
myNDVs=numpy.zeros(myBufSize)
myNDVs.shape=(nYValid,nXValid)
+ # modules available to calculation
+ local_namespace = {}
+
# fetch data for each input layer
for i,Alpha in enumerate(myAlphaList):
@@ -264,14 +271,14 @@ def doit(opts, args):
# fill in nodata values
myNDVs=1*numpy.logical_or(myNDVs==1, myval==myNDV[i])
- # create an array of values for this block
- exec("%s=myval" %Alpha)
+ # add an array of values for this block to the eval namespace
+ local_namespace[Alpha] = myval
myval=None
# try the calculation on the array blocks
try:
- myResult = eval(opts.calc)
+ myResult = eval(opts.calc, global_namespace, local_namespace)
except:
print("evaluation of calculation %s failed" %(opts.calc))
raise
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/gdal.git
More information about the Pkg-grass-devel
mailing list