Skip to content
Commits on Source (6)
......@@ -91,14 +91,18 @@ Perl module maintainer to make a CPAN release.
information (after promotion to official release, filename renaming will have
to be done)
% mkgdaldist.sh 1.4.2 -branch v1.4.2 -rc RC1
% mkgdaldist.sh 2.3.0 -tag v2.3.0 -rc RC1
For a beta version:
% mkgdaldist.sh 2.3.0beta1 -tag v2.3.0beta1
10) Create a snapshot of the documentation.
i.e. On www.gdal.org:
% cd /var/www/gdal
% ./gdal-web-refresh.sh
% zip -r ~/gdal210doc.zip gdal-web/*.* gdal-web/java gdal-web/python
% zip -r ~/gdal230beta1doc.zip gdal-web --exclude "gdal-web/1.11/*" --exclude "gdal-web/daily/*"
12) Publish the resulting files in download.osgeo.org/gdal/X.Y.Z (where X.Y.Z is the version number)
and add a symlink from X.Y.Z to CURRENT (except for stable releases in a "old" branch).
......
= GDAL/OGR 2.3.0 *PRELIMINARY* Release Notes (to 1121758f74589f8850193a5baced7ab1335a4b39) =
= GDAL/OGR 2.3.0 Release Notes =
 
Note: due to the change of SCM during the development, #XXXX still refers to
Trac tickets. GitHub tickets are explicitly indicated with github #XXXX
......@@ -10,7 +10,7 @@ Trac tickets. GitHub tickets are explicitly indicated with github #XXXX
- RDA: DigitalGlobe Raster Data Access (read-only)
* New OGR drivers:
- MVT: add read/write driver for Mapbox Vector Tile standalone files or tilesets
- ESRIJson and TopoJSON: created from existing code of the GeoJSON driver
- ESRIJson and TopoJSON: read-only, splitted from existing code of the GeoJSON driver
- WFS3: *experimental* read-only driver
* RFC 68: Make C++11 a build requirement
https://trac.osgeo.org/gdal/wiki/rfc68_cplusplus11
......@@ -43,7 +43,7 @@ Trac tickets. GitHub tickets are explicitly indicated with github #XXXX
 
See MIGRATION_GUIDE.TXT
 
== GDAL/OGR 2.3.0 - General Changes ==
== GDAL/OGR 2.3.0 - Build changes ==
 
Build(Unix):
* refresh config.{guess,sub} from latest upstream; upgrade to libtool 2.4.6 files
......@@ -57,6 +57,8 @@ Build(Unix):
* use .exe extension when building with mingw64* toolchains (#6919)
* Pass --silent to libtool in compile (C and C++), link, install and clean modes.
* Limit number of installed cpl*.h files installed to a fixed list.
* configure / m4/acinclude.m4: replace use of CCFLAGS by plain CFLAGS (github #529)
* configure / m4/acinclude.m4: require 'long long' type (github #530)
 
Build(Windows):
* always build the PDF driver, even when none of poppler/podofo/pdfium are available, in which case it is write-only (#6938)
......@@ -67,6 +69,9 @@ Build(Windows):
* nmake.opt: avoid some settings to be defined unconditionally (#5286)
* nmake.opt: add configuration to enable openssl (which is needed for thread-safe curl use)
 
Build(All):
* fix compilation error with Crypto++ 7.0.0 (github #541)
Developer corner:
* Add scripts/setdevenv.sh to setup env variables needed for running GDAL without installing it
 
......@@ -138,6 +143,8 @@ Core:
* Add GDALDataset::Open()
* Add C++ iterators for layers, bands and features in GDALDataset
* External .ovr: make sure that ExtraSamples tag is written
* Overview creation: avoid creating too many levels, and fix related heap buffer overflow (github #557)
* SetStatistics(): write a STATISTICS_APPROXIMATE=YES metadata item if bApproxOK=true, and take it into account in GetStatistics() (#4857,#4576)
 
Algorithms:
* Contour: make sure no 3D geometry is created unless -3d switch is defined (#336)
......@@ -221,6 +228,7 @@ ECW driver:
 
EHdr driver:
* support reading/writing .clr as/from RAT (#3253)
* only write .stx if bApproxOK=false (github #514)
 
ENVI driver:
* support 'major frame offsets' keyword (#7114)
......@@ -239,6 +247,7 @@ GeoPackage driver:
* make DELLAYER:rastertable / DROP TABLE rastertable delete the table and all references to it (#7013)
* create single tiled TIFF tiles if they are not bigger than 512x512 pixels
* avoid multi-threading issues when creating TIFF tiles with GDAL_NUM_THREADS defined.
* fix overview creation with big overview factors on some datasets
 
GeoRaster driver:
* handle memory allocation failures (#6884)
......@@ -330,6 +339,7 @@ JP2OpenJPEG driver:
* add support for OpenJPEG 2.2 (#7002) and 2.3 (#7074). Drop support for openjpeg 2.0
* fix performance issues with small images with very small tile size, such as some Sentinel2 quicklooks (#7012)
* emit warning if GMLJP2v2 explicitly requested but georeferencing implemented
* allow YCC for non-Byte datasets; and allow 4-band MCT with openjpeg >= 2.2
 
JPEG driver:
* Add compatibility with libjpeg-turbo 1.5.2 that honours max_memory_to_use
......@@ -425,6 +435,9 @@ Sentinel2 driver:
* make sure that the True Color Image subdatset really uses the R,G,B bands and not the R,R,R (#7251)
* add support for direct opening of .zip files of new safe_compact L1C products (#7085)
 
SNODAS driver:
* accept header lines up to 1024 characters (github #506)
SRTMHGT driver:
* set appropriate description when opening a .hgt.zip file
* recognizes the .hgt.gz extension (#7016)
......@@ -451,6 +464,7 @@ VRT driver:
* VRTDerivedRasterBand: fix detection of Python runtime already loaded when more than 100 modules are linked. Fixes QGIS3 use case (#7213)
* add RAT support
* for consistency, make sure that VRT intermediate datatype demotion is done, e.g that a VRT band of type Byte, with a source of type Float32, requested as Float32 buffer involves Float32 -> Byte -> Float32 conversions
* VRTDataset::AddBand(): honour 'PixelFunctionLanguage' option (github #501)
 
WCS driver:
* add support for WCS 2.0
......@@ -515,6 +529,7 @@ Utilities:
* ogrmerge.py: allow using wildchar '*' in source names and use glob.glob to expand it
* ogrmerge.py: correctly guess vrt format
* ogrmerge.py: error when outputting to a existing vrt if -overwrite_ds is not specified
* ogrmerge.py: use ogr.wkbUnknown to fix -nlt GEOMETRY
* ogr2ogr: fix crash when using -f PDF -a_srs (#6920)
* ogr2ogr: make -f GMT work again (#6993)
* ogr2ogr: make it fail if GetNextFeature() returned NULL with an error
......@@ -525,6 +540,7 @@ Utilities:
* gnmmanage: fix crash on shape files with linestring and multilinestring geometries mixing
* ogrtindex: fix crash when using -f SQLITE -t_srs XXXX (#7053)
* ogrinfo: always open in read-only mode, unless -sql without -ro is specified
* ogrinfo/ogr2ogr with -sql @filename: remove lines starting with '--' (github #459)
 
Multi driver changes:
* port/tag ILI, NAS, DGN, NTF, SDTS, OGR_GMT, Geoconcept, AVCE00, AVCBin to VirtualIO API
......@@ -581,7 +597,7 @@ DXF driver:
* defer inlining of blocks until actually required (#7106)
* Read DIMSTYLEs and block record handles
* Handle linetype scales (#7129)
* mproved support for DIMENSION entities (#7120)
* Improved support for DIMENSION entities (#7120)
* handle ByBlock colors (#7130)
* Fix parsing of complex linetypes (#7134)
* Correct color for ByBlock text features; respect hidden objects (#5592, #7099, #7121)
......@@ -703,6 +719,7 @@ MITAB driver:
* support 'CREATE INDEX ON layer_name USING field_name' (if called after field creation and before first feature insertion)
* avoid reporting invalid extent on empty .mif
* report aspatial .tab as wkbNone geometry type
* export BRUSH(fc:#.....) with mapinfo brush pattern 2 (solid fill)
 
mongoDB driver:
* compilation fix on Windows
......@@ -754,6 +771,9 @@ PDF driver:
* make OGR_PDF_READ_NON_STRUCTURED=YES configuration option work with documents without layers (#6359)
* Improvements to text and dash pattern support in writer (#7185)
 
PDS driver:
* fix reading 8-byte IEEE_REAL fields (github #570)
PG driver:
* do not be confused by a 'geometry' table in a non-PostGIS enabled database (#6896)
* PG/PGDump: make sure serial sequence is updated at layer closing/end-of-copy if we inserted features with fixed ids (#7032)
......
......@@ -53,7 +53,7 @@
#include "gdal.h"
#include "gdal_priv.h"
CPL_CVSID("$Id: gdalmediancut.cpp 7c397f8aee59df906fb51153f5a7980a8cc86d43 2018-04-05 22:42:08 +0200 Even Rouault $")
CPL_CVSID("$Id: gdalmediancut.cpp 83369b4a8075b0cc331eeb3eb8430d49a4f665a6 2018-04-28 11:07:43 +0200 Even Rouault $")
template<typename T> static T* HISTOGRAM( T *h, int n, int r, int g, int b )
{
......@@ -171,7 +171,6 @@ GDALComputeMedianCutPCT( GDALRasterBandH hRed,
}
else
{
#ifdef CPL_HAS_GINT64
return GDALComputeMedianCutPCTInternal(hRed, hGreen, hBlue,
nullptr, nullptr, nullptr,
pfnIncludePixel, nColors,
......@@ -179,9 +178,6 @@ GDALComputeMedianCutPCT( GDALRasterBandH hRed,
static_cast<GUIntBig * >(nullptr),
hColorTable,
pfnProgress, pProgressArg);
#else
return CE_Failure;
#endif
}
}
......
#ifndef DOXYGEN_SKIP
/* $Id: gdal_utilities.dox 13e7f81a134e8f2eaf0d75ccc2ab2f8dd045705a 2018-02-03 12:12:35Z Even Rouault $ */
/* $Id: gdal_utilities.dox 27dcde5e2f5ea66eec45b077a27e0de6f20eb402 2018-05-02 19:12:22 +0200 Even Rouault $ */
#endif /* DOXYGEN_SKIP */
/*!
......@@ -176,7 +176,7 @@ and exit.
\htmlonly
<p>
$Id: gdal_utilities.dox 13e7f81a134e8f2eaf0d75ccc2ab2f8dd045705a 2018-02-03 12:12:35Z Even Rouault $
$Id: gdal_utilities.dox 27dcde5e2f5ea66eec45b077a27e0de6f20eb402 2018-05-02 19:12:22 +0200 Even Rouault $
</p>
\endhtmlonly
*/
......@@ -1107,7 +1107,9 @@ The value will be burned into all output bands.</dd>
<dt> <b>-3d</b>: </dt><dd>
Indicates that a burn value should be extracted from the "Z" values of the
feature. As of now, only points and lines are drawn in 3D.</dd>
feature. Works with points and lines (linear interpolation along each segment).
For polygons, works properly only if the are flat (same Z value for all
vertices).</dd>
<dt> <b>-add</b>: </dt><dd>
Instead of burning a new value, this adds the new value to the existing raster.
......
......@@ -59,7 +59,7 @@
#include "ogr_srs_api.h"
#include "vrtdataset.h"
CPL_CVSID("$Id: gdalwarp_lib.cpp dc3819d387764593c0fb5a5c4d02c21a848a4c9d 2018-04-12 18:07:28 +0200 Even Rouault $")
CPL_CVSID("$Id: gdalwarp_lib.cpp bf6dc2add0064d9c76bbdd9a319641747c5311e3 2018-04-26 20:17:00 +0200 Even Rouault $")
/************************************************************************/
/* GDALWarpAppOptions */
......@@ -1828,6 +1828,10 @@ GDALDatasetH GDALWarp( const char *pszDest, GDALDatasetH hDstDS, int nSrcCount,
hDstDS = nullptr;
}
}
if( hDstDS )
oProgress.Do(1);
return hDstDS;
}
......
......@@ -32,6 +32,7 @@
#include "gdal_utils.h"
#include "gdal_utils_priv.h"
#include <cassert>
#include <climits>
#include <cstdio>
#include <cstdlib>
......@@ -63,7 +64,7 @@
#include "ogrlayerdecorator.h"
#include "ogrsf_frmts.h"
CPL_CVSID("$Id: ogr2ogr_lib.cpp 7d078e0357d2998edfa713422e607cbadf77f9ff 2018-04-08 22:11:28 +0200 Even Rouault $")
CPL_CVSID("$Id: ogr2ogr_lib.cpp 3e78f98797f6bd1ce644c449e6ac02088a279390 2018-04-28 00:04:29 +0200 Even Rouault $")
typedef enum
{
......@@ -4535,6 +4536,7 @@ int LayerTranslator::Translate( OGRFeature* poFeatureIn,
poDstGeometry->toGeometryCollection()->removeGeometry(iPart, FALSE);
delete poDstGeometry;
poDstGeometry = poPart;
assert(poDstGeometry);
}
if (iSrcZField != -1)
......@@ -4785,6 +4787,23 @@ static void RemoveBOM(GByte* pabyData)
}
}
static void RemoveSQLComments(char*& pszSQL)
{
char** papszLines = CSLTokenizeStringComplex(pszSQL, "\r\n", FALSE, FALSE);
CPLString osSQL;
for( char** papszIter = papszLines; papszIter && *papszIter; ++papszIter )
{
if( !STARTS_WITH(*papszIter, "--") )
{
osSQL += *papszIter;
osSQL += " ";
}
}
CSLDestroy(papszLines);
CPLFree(pszSQL);
pszSQL = CPLStrdup(osSQL);
}
/************************************************************************/
/* GDALVectorTranslateOptionsNew() */
/************************************************************************/
......@@ -4955,6 +4974,7 @@ GDALVectorTranslateOptions *GDALVectorTranslateOptionsNew(char** papszArgv,
{
RemoveBOM(pabyRet);
psOptions->pszSQLStatement = reinterpret_cast<char*>(pabyRet);
RemoveSQLComments(psOptions->pszSQLStatement);
}
else
{
......
......@@ -53,7 +53,7 @@
#include "ogrsf_frmts.h"
CPL_CVSID("$Id: ogrinfo.cpp 9bae05435e199592be48a2a6c8ef5f649fa5d113 2018-03-26 14:16:35 +0200 Even Rouault $")
CPL_CVSID("$Id: ogrinfo.cpp 2487aa3c7836a7d43351540c252a0d2f4aa9bd60 2018-04-20 17:20:01 +0200 Even Rouault $")
bool bVerbose = true;
bool bSuperQuiet = false;
......@@ -419,6 +419,23 @@ static void RemoveBOM(GByte* pabyData)
}
}
static void RemoveSQLComments(char*& pszSQL)
{
char** papszLines = CSLTokenizeStringComplex(pszSQL, "\r\n", FALSE, FALSE);
CPLString osSQL;
for( char** papszIter = papszLines; papszIter && *papszIter; ++papszIter )
{
if( !STARTS_WITH(*papszIter, "--") )
{
osSQL += *papszIter;
osSQL += " ";
}
}
CSLDestroy(papszLines);
CPLFree(pszSQL);
pszSQL = CPLStrdup(osSQL);
}
/************************************************************************/
/* main() */
/************************************************************************/
......@@ -560,6 +577,7 @@ MAIN_START(nArgc, papszArgv)
{
RemoveBOM(pabyRet);
pszSQLStatement = reinterpret_cast<char *>(pabyRet);
RemoveSQLComments(pszSQLStatement);
}
else
{
......
......@@ -20547,16 +20547,15 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64bit integer type" >&5
$as_echo_n "checking for 64bit integer type... " >&6; }
 
echo 'int main() { long long off=0; }' >> conftest.c
if test -z "`${CC} ${CCFLAGS} -o conftest conftest.c 2>&1`" ; then
echo 'int main() { return (int)(long long)(0); }' >> conftest.c
if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
 
$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
 
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: long long" >&5
$as_echo "long long" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
as_fn_error $? "long long not found" "$LINENO" 5
fi
rm -f conftest*
 
......@@ -20580,7 +20579,7 @@ $as_echo_n "checking for 64bit file io... " >&6; }
echo '#include <sys/types.h>' >> conftest.c
echo '#include <sys/stat.h>' >> conftest.c
echo 'int main() { struct __stat64 buf; _stat64( "", &buf ); return 0; }' >> conftest.c
if test -z "`${CC} ${CCFLAGS} -o conftest conftest.c 2>&1`" ; then
if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
with_unix_stdio_64=no
 
cat >>confdefs.h <<_ACEOF
......@@ -20604,7 +20603,7 @@ _ACEOF
if test x"$with_unix_stdio_64" = x"" ; then
echo '#include <stdio.h>' > conftest.c
echo 'int main() { long long off=0; fseek64(NULL, off, SEEK_SET); off = ftell64(NULL); return 0; }' >> conftest.c
if test -z "`${CC} ${CCFLAGS} -o conftest conftest.c 2>&1`" ; then
if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
with_unix_stdio_64=yes
VSI_FTELL64=ftell64
VSI_FSEEK64=fseek64
......@@ -20655,7 +20654,7 @@ $as_echo "#define VSI_NEED_LARGEFILE64_SOURCE 1" >>confdefs.h
if test x"$with_unix_stdio_64" = x"" ; then
echo '#include <stdio.h>' > conftest.c
echo 'int main() { fpos_t off=0; fseeko(NULL, off, SEEK_SET); off = ftello(NULL); return 0; }' >> conftest.c
if test -z "`${CC} ${CCFLAGS} -o conftest conftest.c 2>&1`" ; then
if test -z "`${CC} ${CFLAGS} -o conftest conftest.c 2>&1`" ; then
with_unix_stdio_64=yes
VSI_FTELL64=ftello
VSI_FSEEK64=fseeko
gdal (2.3.0~beta1+dfsg-2~exp2) UNRELEASED; urgency=medium
gdal (2.3.0~rc1+dfsg-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Update symbols for 2.3.0~beta1.
* Drop Re-install-gdal_csv.h.patch, included upstream.
Refresh remaining patches.
* Enable parallel make.
-- Bas Couwenberg <sebastic@debian.org> Wed, 25 Apr 2018 14:18:01 +0200
-- Bas Couwenberg <sebastic@debian.org> Fri, 04 May 2018 18:33:14 +0200
gdal (2.3.0~beta1+dfsg-2~exp1) experimental; urgency=medium
......
Description: Re-install gdal_csv.h
Author: Even Rouault <even.rouault@spatialys.com>
Origin: https://github.com/OSGeo/gdal/commit/ae9da1ad7e51cfd4ec714b07cc1296d99964d27b
--- a/port/GNUmakefile
+++ b/port/GNUmakefile
@@ -97,7 +97,8 @@ INST_H_FILES = \
cpl_time.h \
cpl_virtualmem.h \
cpl_vsi.h \
- cpl_vsi_virtual.h
+ cpl_vsi_virtual.h \
+ gdal_csv.h
install:
for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done
......@@ -5,7 +5,7 @@ Forwarded: not-needed
--- a/configure
+++ b/configure
@@ -25801,7 +25801,7 @@ fi
@@ -25800,7 +25800,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......@@ -14,7 +14,7 @@ Forwarded: not-needed
else
HDF_LIB_NAME=missing
fi
@@ -25861,7 +25861,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
@@ -25860,7 +25860,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -23,7 +23,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25892,7 +25892,7 @@ fi
@@ -25891,7 +25891,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......@@ -32,7 +32,7 @@ Forwarded: not-needed
else
HDF_LIB_NAME=missing
fi
@@ -25907,7 +25907,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
@@ -25906,7 +25906,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -41,7 +41,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -25938,7 +25938,7 @@ fi
@@ -25937,7 +25937,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......
......@@ -10,4 +10,3 @@ perl-vendor
privacy-breach-logo.patch
privacy-breach-generic.patch
perl-doxyfile
Re-install-gdal_csv.h.patch
......@@ -5,7 +5,7 @@ Forwarded: not-needed
--- a/configure
+++ b/configure
@@ -31020,7 +31020,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini
@@ -31019,7 +31019,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -14,7 +14,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -31084,7 +31084,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini
@@ -31083,7 +31083,7 @@ if ${ac_cv_lib_spatialite_spatialite_ini
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -23,7 +23,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -31474,7 +31474,7 @@ if ${ac_cv_lib_spatialite_spatialite_tar
@@ -31473,7 +31473,7 @@ if ${ac_cv_lib_spatialite_spatialite_tar
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......
......@@ -42,6 +42,11 @@ else
WITH_HDF5:=
endif
NJOBS := -j1
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
NJOBS := -j$(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
endif
versions:
@echo Gdal version: $(GDAL_MAJOR).$(GDAL_MINOR).$(GDAL_PATCH)
@echo Swig version: $(SWIGVER)
......@@ -141,32 +146,32 @@ override_dh_auto_configure:
override_dh_auto_build:
cp `ls GDALmake.opt-*|tail -1` GDALmake.opt
$(MAKE) lib-target apps-target
$(MAKE) $(NJOBS) lib-target apps-target
rm -rf $(CURDIR)/swig/perl/*.c $(CURDIR)/swig/perl/*.cpp
$(MAKE) -C $(CURDIR)/swig/perl generate build doc
$(MAKE) -C $(CURDIR)/swig/java clean generate build
$(MAKE) $(NJOBS) -C $(CURDIR)/swig/perl generate build doc
$(MAKE) $(NJOBS) -C $(CURDIR)/swig/java clean generate build
# It needs pre-installing just after the building due to intermediate cleaning.
# Apply conditionally an on-fly patch for pre 1.3.38 swig versions.
for V in $(PYVERS); do \
cp GDALmake.opt-$$V GDALmake.opt; \
$(MAKE) -C $(CURDIR)/swig/python clean; \
$(MAKE) -C $(CURDIR)/swig/python generate build; \
$(MAKE) -C $(CURDIR)/swig/python install DESTDIR=$(CURDIR)/debian/python-tmp; \
$(MAKE) $(NJOBS) -C $(CURDIR)/swig/python clean; \
$(MAKE) $(NJOBS) -C $(CURDIR)/swig/python generate build; \
$(MAKE) $(NJOBS) -C $(CURDIR)/swig/python install DESTDIR=$(CURDIR)/debian/python-tmp; \
done
mkdir $(CURDIR)/html || true
$(MAKE) docs
$(MAKE) man
$(MAKE) $(NJOBS) docs
$(MAKE) $(NJOBS) man
override_dh_auto_install:
cp `ls GDALmake.opt-*|tail -1` GDALmake.opt
$(MAKE) install BINDINGS="perl java" DESTDIR=$(CURDIR)/debian/tmp \
$(MAKE) $(NJOBS) install BINDINGS="perl java" DESTDIR=$(CURDIR)/debian/tmp \
INST_DATA="\$$(prefix)/share/gdal/$(GDAL_MAJOR).$(GDAL_MINOR)"
$(MAKE) install-docs DESTDIR=$(CURDIR)/debian/tmp \
$(MAKE) $(NJOBS) install-docs DESTDIR=$(CURDIR)/debian/tmp \
"INST_DOCS=\$$(prefix)/share/doc/libgdal-doc"\
"INST_MAN=\$$(prefix)/share/man"
$(MAKE) install-man DESTDIR=$(CURDIR)/debian/tmp \
$(MAKE) $(NJOBS) install-man DESTDIR=$(CURDIR)/debian/tmp \
"INST_DOCS=\$$(prefix)/share/doc/libgdal-doc"\
"INST_MAN=\$$(prefix)/share/man"
......
......@@ -30,7 +30,7 @@
#include "gdal_pam.h"
#include "ogr_spatialref.h"
CPL_CVSID("$Id: ctgdataset.cpp 01037e400d90e8bc4a74f8d886ea5a27ecce02c5 2018-01-12 23:49:31Z Kurt Schwehr $")
CPL_CVSID("$Id: ctgdataset.cpp c110ff1ae189c96166f9d82a9d7873a265806d59 2018-04-29 23:11:43 +0200 Even Rouault $")
constexpr int HEADER_LINE_COUNT = 5;
......@@ -546,10 +546,10 @@ GDALDataset *CTGDataset::Open( GDALOpenInfo * poOpenInfo )
CPLErr CTGDataset::GetGeoTransform( double * padfTransform )
{
padfTransform[0] = nNWEasting - nCellSize / 2;
padfTransform[0] = static_cast<double>(nNWEasting) - nCellSize / 2;
padfTransform[1] = nCellSize;
padfTransform[2] = 0;
padfTransform[3] = nNWNorthing + nCellSize / 2;
padfTransform[3] = static_cast<double>(nNWNorthing) + nCellSize / 2;
padfTransform[4] = 0.;
padfTransform[5] = -nCellSize;
......
......@@ -39,7 +39,7 @@
#define E00ReadNextLine GDALE00GRIDReadNextLine
#define E00ReadRewind GDALE00GRIDReadRewind
CPL_CVSID("$Id: e00griddataset.cpp a542b2797f15f2ed694cfcee9ff17d86b339dfee 2018-04-02 00:24:03 +0200 Even Rouault $")
CPL_CVSID("$Id: e00griddataset.cpp 62dd0e1d86b69d7cdf7c8731ee6411615f82d414 2018-04-22 15:08:53 +0200 Even Rouault $")
#undef NULL
#define NULL nullptr
......@@ -205,7 +205,10 @@ CPLErr E00GRIDRasterBand::IReadBlock( CPL_UNUSED int nBlockXOff,
{
//CPLDebug("E00GRID", "Forward skip to %d from %d", nBlockYOff, poGDS->nLastYOff);
for(int i=poGDS->nLastYOff + 1; i < nBlockYOff;i++)
IReadBlock(0, i, pImage);
{
if( IReadBlock(0, i, pImage) != CE_None )
return CE_Failure;
}
}
if (nBlockYOff > poGDS->nMaxYOffset)
......@@ -222,8 +225,13 @@ CPLErr E00GRIDRasterBand::IReadBlock( CPL_UNUSED int nBlockXOff,
{
pszLine = E00ReadNextLine(poGDS->e00ReadPtr);
if (pszLine == nullptr || strlen(pszLine) < 5 * E00_FLOAT_SIZE)
{
CPLError(CE_Failure, CPLE_FileIO,
"Could not find enough values for line %d",
nBlockYOff);
return CE_Failure;
}
}
if (eDataType == GDT_Float32)
{
pafImage[i] = (float) CPLAtof(pszLine + (i%VALS_PER_LINE) * E00_FLOAT_SIZE);
......@@ -251,7 +259,12 @@ CPLErr E00GRIDRasterBand::IReadBlock( CPL_UNUSED int nBlockXOff,
for(int i=0;i<nBlockXSize;i++)
{
if (VSIFReadL(szVal, E00_FLOAT_SIZE, 1, poGDS->fp) != 1)
{
CPLError(CE_Failure, CPLE_FileIO,
"Could not find enough values for line %d",
nBlockYOff);
return CE_Failure;
}
if (eDataType == GDT_Float32)
{
......
......@@ -100,7 +100,7 @@
#include "xtiffio.h"
 
 
CPL_CVSID("$Id: geotiff.cpp 971ad299681ca1ea2e1b800e88209f426b77e9aa 2018-04-17 12:14:43 +0200 Even Rouault $")
CPL_CVSID("$Id: geotiff.cpp 94030a7dada3b45ece3461dd3d6b38809eacadf3 2018-05-02 16:33:54 +0200 Even Rouault $")
 
static bool bGlobalInExternalOvr = false;
static std::mutex gMutexThreadPool;
......@@ -10454,8 +10454,11 @@ CPLErr GTiffDataset::IBuildOverviews(
int nOvrBlockXSize = 0;
int nOvrBlockYSize = 0;
GTIFFGetOverviewBlockSize(&nOvrBlockXSize, &nOvrBlockYSize);
std::vector<bool> abRequireNewOverview;
abRequireNewOverview.resize(nOverviews);
for( int i = 0; i < nOverviews && eErr == CE_None; ++i )
{
abRequireNewOverview[i] = true;
for( int j = 0; j < nOverviewCount && eErr == CE_None; ++j )
{
GTiffDataset *poODS = papoOverviewDS[j];
......@@ -10466,14 +10469,30 @@ CPLErr GTiffDataset::IBuildOverviews(
poODS->GetRasterYSize(),
GetRasterYSize());
 
// If we already have a 1x1 overview and this new one would result
// in it too, then don't create it.
if( poODS->GetRasterXSize() == 1 &&
poODS->GetRasterYSize() == 1 &&
(GetRasterXSize() + panOverviewList[i] - 1)
/ panOverviewList[i] == 1 &&
(GetRasterYSize() + panOverviewList[i] - 1)
/ panOverviewList[i] == 1 )
{
abRequireNewOverview[i] = false;
break;
}
if( nOvFactor == panOverviewList[i]
|| nOvFactor == GDALOvLevelAdjust2( panOverviewList[i],
GetRasterXSize(),
GetRasterYSize() ) )
panOverviewList[i] *= -1;
{
abRequireNewOverview[i] = false;
break;
}
}
 
if( panOverviewList[i] > 0 )
if( abRequireNewOverview[i] )
{
const int nOXSize =
(GetRasterXSize() + panOverviewList[i] - 1)
......@@ -10520,10 +10539,6 @@ CPLErr GTiffDataset::IBuildOverviews(
eErr = RegisterNewOverviewDataset(nOverviewOffset,
nOvrJpegQuality);
}
else
{
panOverviewList[i] *= -1;
}
}
 
CPLFree(panExtraSampleValues);
......@@ -10602,10 +10617,16 @@ CPLErr GTiffDataset::IBuildOverviews(
sizeof(void*), poBand->GetOverviewCount()) );
 
int iCurOverview = 0;
std::vector<bool> abAlreadyUsedOverviewBand;
abAlreadyUsedOverviewBand.resize(poBand->GetOverviewCount());
for( int i = 0; i < nOverviews; ++i )
{
for( int j = 0; j < poBand->GetOverviewCount(); ++j )
{
if( abAlreadyUsedOverviewBand[j] )
continue;
int nOvFactor;
GDALRasterBand * poOverview = poBand->GetOverview( j );
 
......@@ -10626,6 +10647,8 @@ CPLErr GTiffDataset::IBuildOverviews(
poBand->GetXSize(),
poBand->GetYSize() ) )
{
abAlreadyUsedOverviewBand[j] = true;
CPLAssert(iCurOverview < poBand->GetOverviewCount());
papapoOverviewBands[iBand][iCurOverview] = poOverview;
++iCurOverview ;
break;
......@@ -10664,12 +10687,23 @@ CPLErr GTiffDataset::IBuildOverviews(
for( int iBand = 0; iBand < nBandsIn && eErr == CE_None; ++iBand )
{
GDALRasterBand *poBand = GetRasterBand( panBandList[iBand] );
if( poBand == nullptr )
{
eErr = CE_Failure;
break;
}
std::vector<bool> abAlreadyUsedOverviewBand;
abAlreadyUsedOverviewBand.resize(poBand->GetOverviewCount());
 
int nNewOverviews = 0;
for( int i = 0; i < nOverviews && poBand != nullptr; ++i )
for( int i = 0; i < nOverviews; ++i )
{
for( int j = 0; j < poBand->GetOverviewCount(); ++j )
{
if( abAlreadyUsedOverviewBand[j] )
continue;
GDALRasterBand * poOverview = poBand->GetOverview( j );
 
int bHasNoData = FALSE;
......@@ -10690,6 +10724,8 @@ CPLErr GTiffDataset::IBuildOverviews(
poBand->GetXSize(),
poBand->GetYSize() ) )
{
abAlreadyUsedOverviewBand[j] = true;
CPLAssert(nNewOverviews < poBand->GetOverviewCount());
papoOverviewBands[nNewOverviews++] = poOverview;
break;
}
......@@ -12013,12 +12049,6 @@ static bool GTIFFMakeBufferedStream(GDALOpenInfo* poOpenInfo)
vsi_l_offset nMaxOffset = 0;
if( bBigTIFF )
{
#ifndef CPL_HAS_GINT64
CPLError(CE_Failure, CPLE_NotSupported, "BigTIFF not supported");
CPL_IGNORE_RET_VAL(VSIFCloseL(fpTemp));
VSIUnlink(osTmpFilename);
return false;
#else
GUInt64 nTmp = 0;
memcpy(&nTmp, pabyBuffer + 8, 8);
if( bSwap ) CPL_SWAP64PTR(&nTmp);
......@@ -12091,7 +12121,6 @@ static bool GTIFFMakeBufferedStream(GDALOpenInfo* poOpenInfo)
nMaxOffset = nTmp + nTagSize;
}
}
#endif
}
else
{
......
......@@ -61,7 +61,7 @@
#include "tifvsi.h"
#include "xtiffio.h"
CPL_CVSID("$Id: gt_wkt_srs.cpp 971ad299681ca1ea2e1b800e88209f426b77e9aa 2018-04-17 12:14:43 +0200 Even Rouault $")
CPL_CVSID("$Id: gt_wkt_srs.cpp 14c03330eccb153730f9a30cf5ee4005a7d56b5e 2018-04-27 22:11:07 +0200 Even Rouault $")
static const geokey_t ProjLinearUnitsInterpCorrectGeoKey =
static_cast<geokey_t>(3059);
......@@ -357,7 +357,7 @@ char *GTIFGetOGISDefn( GTIF *hGTIF, GTIFDefn * psDefn )
if( strstr( pszWKT,
"PROJCS[\"WGS_1984_Web_Mercator_Auxiliary_Sphere\"" ) )
{
oSRS.SetFromUserInput(pszWKT);
oSRS.importFromWkt(pszWKT);
oSRS.SetExtension(
"PROJCS", "PROJ4",
"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 "
......
......@@ -42,7 +42,7 @@
#include "hdf4compat.h"
#include "hdf4dataset.h"
CPL_CVSID("$Id: hdf4dataset.cpp 4971449609881d6ffdca70188292293852d12691 2017-12-17 16:48:14Z Even Rouault $")
CPL_CVSID("$Id: hdf4dataset.cpp 83369b4a8075b0cc331eeb3eb8430d49a4f665a6 2018-04-28 11:07:43 +0200 Even Rouault $")
extern const char * const pszGDALSignature;
......@@ -312,12 +312,10 @@ double HDF4Dataset::AnyTypeToDouble( int32 iNumType, void *pData )
return static_cast<double>(*reinterpret_cast<GInt32 *>(pData));
case DFNT_UINT32:
return static_cast<double>(*reinterpret_cast<GUInt32 *>(pData));
#ifdef CPL_HAS_GINT64
case DFNT_INT64:
return static_cast<double>(*reinterpret_cast<GInt64 *>(pData));
case DFNT_UINT64:
return static_cast<double>(*reinterpret_cast<GUInt64 *>(pData));
#endif
case DFNT_FLOAT32:
return static_cast<double>(*reinterpret_cast<float *>(pData));
case DFNT_FLOAT64:
......