From 86d17d50cdeb7c0b57d17f537e0e3bc5d487ea996d6a8c99a36b8253c6ff43fb Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 30 Sep 2016 16:56:46 +0000 Subject: [PATCH 1/2] Accepting request 432066 from Application:Geo:Staging OBS-URL: https://build.opensuse.org/request/show/432066 OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=32 --- gdal-2.1.0.tar.xz | 3 -- gdal-2.1.1.tar.xz | 3 ++ gdal.changes | 15 ++++++++++ gdal.spec | 7 +++-- netcdf-gcp-fix.patch | 70 ++++++++++++++++++++++++++++++++++++++++++++ ogr_wrap.patch | 13 -------- 6 files changed, 92 insertions(+), 19 deletions(-) delete mode 100644 gdal-2.1.0.tar.xz create mode 100644 gdal-2.1.1.tar.xz create mode 100644 netcdf-gcp-fix.patch delete mode 100644 ogr_wrap.patch diff --git a/gdal-2.1.0.tar.xz b/gdal-2.1.0.tar.xz deleted file mode 100644 index b7d5de8..0000000 --- a/gdal-2.1.0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:568b43441955b306364fcf97fb47d4c1512ac6f2f5f76b2ec39a890d2418ee03 -size 7656496 diff --git a/gdal-2.1.1.tar.xz b/gdal-2.1.1.tar.xz new file mode 100644 index 0000000..d1408a1 --- /dev/null +++ b/gdal-2.1.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87ce516ce757ad1edf1e21f007fbe232ed2e932af422e9893f40199711c41f92 +size 7688376 diff --git a/gdal.changes b/gdal.changes index c0ac2c2..979cf80 100644 --- a/gdal.changes +++ b/gdal.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Fri Sep 30 16:00:00 UTC 2016 - Angelos Tzotsos + +- Packaging changes + - Added netcdf-gcp-fix.patch from upstream (#6666) + +------------------------------------------------------------------- +Sun Sep 25 13:20:22 UTC 2016 - bruno@ioda-net.ch + +- New upstream bugfix release 2.1.1 + - https://trac.osgeo.org/gdal/wiki/Release/2.1.1-News +- Packaging changes + - Remove org_wrap.patch included upstream + - Added support to liblzma + ------------------------------------------------------------------- Tue May 10 03:11:00 UTC 2016 - Angelos Tzotsos diff --git a/gdal.spec b/gdal.spec index b25247e..4cfd83d 100644 --- a/gdal.spec +++ b/gdal.spec @@ -23,7 +23,7 @@ %define sourcename gdal Name: gdal -Version: 2.1.0 +Version: 2.1.1 Release: 0 Summary: GDAL/OGR - a translator library for raster and vector geospatial data formats License: MIT and BSD-3-Clause and SUSE-Public-Domain @@ -36,7 +36,7 @@ Patch1: GDALmake.opt.in.patch # Fix hard coded name of libproj library # But libproj.so is valid if libproj-devel is installed ? Patch2: gdal-libproj.patch -Patch3: ogr_wrap.patch +Patch3: netcdf-gcp-fix.patch BuildRequires: blas-devel BuildRequires: chrpath BuildRequires: curl-devel @@ -157,7 +157,7 @@ The GDAL python modules provide support to handle multiple GIS file formats. %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 +%patch3 -p2 # Fix mandir sed -i "s|^mandir=.*|mandir='\${prefix}/share/man'|" configure @@ -185,6 +185,7 @@ autoreconf -fi --with-rename-internal-libtiff-symbols=yes \ --with-rename-internal-libgeotiff-symbols=yes \ --with-libz \ + --with-liblzma \ --with-cfitsio=no \ --with-netcdf \ --with-openjpeg \ diff --git a/netcdf-gcp-fix.patch b/netcdf-gcp-fix.patch new file mode 100644 index 0000000..2d2627c --- /dev/null +++ b/netcdf-gcp-fix.patch @@ -0,0 +1,70 @@ +From fa7af0b95804fac670a88f602f9cbec922b4d054 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Fri, 30 Sep 2016 11:12:06 +0000 +Subject: [PATCH] HDF5: correct number of GCPs to avoid dummy trailing + (0,0)->(0,0,0) and remove +180 offset applied to GCP longitude. Add instead a + heuristics to determine if the product is crossing the antimeridian, and a + HDF5_SHIFT_GCPX_BY_180 config option to be able to override the heuristics + (fixes #6666) + +git-svn-id: https://svn.osgeo.org/gdal/branches/2.1@35557 f0d54148-0727-0410-94bb-9a71ac55c965 +--- + gdal/frmts/hdf5/hdf5imagedataset.cpp | 33 +++++++++++++++++++++++++++++++-- + 1 file changed, 31 insertions(+), 2 deletions(-) + +diff --git a/gdal/frmts/hdf5/hdf5imagedataset.cpp b/gdal/frmts/hdf5/hdf5imagedataset.cpp +index 120a04a..e6211c1 100644 +--- a/gdal/frmts/hdf5/hdf5imagedataset.cpp ++++ b/gdal/frmts/hdf5/hdf5imagedataset.cpp +@@ -825,7 +825,7 @@ CPLErr HDF5ImageDataset::CreateProjections() + /* -------------------------------------------------------------------- */ + /* Fill the GCPs list. */ + /* -------------------------------------------------------------------- */ +- nGCPCount = nRasterYSize/nDeltaLat * nRasterXSize/nDeltaLon; ++ nGCPCount = (nRasterYSize/nDeltaLat) * (nRasterXSize/nDeltaLon); + + pasGCPList = static_cast( + CPLCalloc( nGCPCount, sizeof( GDAL_GCP ) ) ); +@@ -835,12 +835,41 @@ CPLErr HDF5ImageDataset::CreateProjections() + + const int nYLimit = (static_cast(nRasterYSize)/nDeltaLat) * nDeltaLat; + const int nXLimit = (static_cast(nRasterXSize)/nDeltaLon) * nDeltaLon; ++ ++ // The original code in https://trac.osgeo.org/gdal/changeset/8066 ++ // always add +180 to the longitudes, but without justification ++ // I suspect this might be due to handling products crossing the ++ // antimeridian. Trying to do it just when needed through a heuristics. ++ bool bHasLonNearMinus180 = false; ++ bool bHasLonNearPlus180 = false; ++ bool bHasLonNearZero = false; ++ for( int j = 0; j < nYLimit; j+=nDeltaLat ) ++ { ++ for( int i = 0; i < nXLimit; i+=nDeltaLon ) ++ { ++ const int iGCP = j * nRasterXSize + i; ++ if( Longitude[iGCP] > 170 && Longitude[iGCP] <= 180 ) ++ bHasLonNearPlus180 = true; ++ if( Longitude[iGCP] < -170 && Longitude[iGCP] >= -180 ) ++ bHasLonNearMinus180 = true; ++ if( fabs(Longitude[iGCP]) < 90 ) ++ bHasLonNearZero = true; ++ } ++ } ++ const char* pszShiftGCP = ++ CPLGetConfigOption("HDF5_SHIFT_GCPX_BY_180", NULL); ++ const bool bAdd180 = (bHasLonNearPlus180 && bHasLonNearMinus180 && ++ !bHasLonNearZero && pszShiftGCP == NULL) || ++ (pszShiftGCP != NULL && CPLTestBool(pszShiftGCP)); ++ + for( int j = 0; j < nYLimit; j+=nDeltaLat ) + { + for( int i = 0; i < nXLimit; i+=nDeltaLon ) + { + const int iGCP = j * nRasterXSize + i; +- pasGCPList[k].dfGCPX = static_cast(Longitude[iGCP])+180.0; ++ pasGCPList[k].dfGCPX = static_cast(Longitude[iGCP]); ++ if( bAdd180 ) ++ pasGCPList[k].dfGCPX += 180.0; + pasGCPList[k].dfGCPY = static_cast(Latitude[iGCP]); + + pasGCPList[k].dfGCPPixel = i + 0.5; diff --git a/ogr_wrap.patch b/ogr_wrap.patch deleted file mode 100644 index 44e7aab..0000000 --- a/ogr_wrap.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -rup gdal-2.1.0-orig/swig/include/ogr.i gdal-2.1.0/swig/include/ogr.i ---- gdal-2.1.0-orig/swig/include/ogr.i 2016-04-25 20:35:57.000000000 +0300 -+++ gdal-2.1.0/swig/include/ogr.i 2016-05-10 17:37:30.288087450 +0300 -@@ -2020,8 +2020,7 @@ public: - int GetGeomFieldIndex(int i) { - if (i < 0 || i >= OGR_FD_GetGeomFieldCount(self)) - CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i); -- else -- return i; -+ return i; - } - #endif - From 5ef032b9dedb78e3a631c3b5c69ec6d21815e894a7aab0c24709bd97a9c5b2b7 Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Fri, 30 Sep 2016 17:15:53 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Application:Geo/gdal?expand=0&rev=33 --- gdal.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdal.changes b/gdal.changes index 979cf80..bf62d14 100644 --- a/gdal.changes +++ b/gdal.changes @@ -10,7 +10,7 @@ Sun Sep 25 13:20:22 UTC 2016 - bruno@ioda-net.ch - New upstream bugfix release 2.1.1 - https://trac.osgeo.org/gdal/wiki/Release/2.1.1-News - Packaging changes - - Remove org_wrap.patch included upstream + - Remove ogr_wrap.patch included upstream - Added support to liblzma -------------------------------------------------------------------