diff --git a/data/scene/constellationbounds/constellationbounds.mod b/data/scene/constellationbounds/constellationbounds.mod
index e23d57dc37..beb1295d26 100644
--- a/data/scene/constellationbounds/constellationbounds.mod
+++ b/data/scene/constellationbounds/constellationbounds.mod
@@ -6,8 +6,14 @@ return {
Renderable = {
Type = "RenderableConstellationBounds",
File = "${OPENSPACE_DATA}/scene/constellationbounds/data/bound_20.dat",
- ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat",
- ReferenceFrame = "J2000"
+ ConstellationFile = "${OPENSPACE_DATA}/scene/constellationbounds/data/constellations.dat"
+ },
+ Transform = {
+ Rotation = {
+ Type = "SpiceRotation",
+ SourceFrame = "J2000",
+ DestinationFrame = "GALACTIC"
+ }
}
}
}
\ No newline at end of file
diff --git a/data/scene/lodglobes/earth/earth.mod b/data/scene/lodglobes/earth/earth.mod
index 1868d4a305..6b5302e1a4 100644
--- a/data/scene/lodglobes/earth/earth.mod
+++ b/data/scene/lodglobes/earth/earth.mod
@@ -161,6 +161,9 @@ return {
},
},
},
+ Settings = {
+ Gamma = 1.5
+ },
Enabled = true,
},
{
diff --git a/data/scene/lodglobes/mars/mars.mod b/data/scene/lodglobes/mars/mars.mod
index 73f12cbae6..bc1e09f992 100644
--- a/data/scene/lodglobes/mars/mars.mod
+++ b/data/scene/lodglobes/mars/mars.mod
@@ -199,6 +199,11 @@ return {
},
GrayScaleLayers = {},
GrayScaleColorOverlays = {
+ {
+ Name = "CTX Mosaic [AWS]",
+ FilePath = "map_service_configs/CTX.wms",
+ Enabled = true,
+ },
{
Name = "CTX Mosaic [Europe]",
FilePath = "map_service_configs/CTX_Mosaic.xml",
diff --git a/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml b/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
index 6eae17b3cf..d2d9d1ec11 100644
--- a/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
+++ b/data/scene/lodglobes/moon/map_service_configs/OnMoonColor.xml
@@ -62,7 +62,9 @@
512
512
-
+ true
+ 400
+ true
./GDAL_Cache/OnMoonColor
4
diff --git a/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml b/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
index cdfd4114e1..e008c2aa90 100644
--- a/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
+++ b/data/scene/lodglobes/moon/map_service_configs/OnMoonHeight.xml
@@ -16,6 +16,9 @@
1
top
+ true
+ 400
+ true
./GDAL_Cache/OnMoonHeight
4
diff --git a/include/openspace/rendering/raycastermanager.h b/include/openspace/rendering/raycastermanager.h
index 64792e48e1..280c9c42f7 100644
--- a/include/openspace/rendering/raycastermanager.h
+++ b/include/openspace/rendering/raycastermanager.h
@@ -34,8 +34,6 @@ class RaycasterListener;
class RaycasterManager {
public:
- RaycasterManager();
- ~RaycasterManager();
void attachRaycaster(VolumeRaycaster& raycaster);
void detachRaycaster(VolumeRaycaster& raycaster);
bool isAttached(VolumeRaycaster& raycaster);
diff --git a/modules/globebrowsing/CMakeLists.txt b/modules/globebrowsing/CMakeLists.txt
index 00b7dbaa43..cd2f49d02e 100644
--- a/modules/globebrowsing/CMakeLists.txt
+++ b/modules/globebrowsing/CMakeLists.txt
@@ -236,7 +236,7 @@ if (OPENSPACE_MODULE_GLOBEBROWSING_USE_GDAL)
openspace-module-globebrowsing
${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal_i.lib
)
- set(EXTERNAL_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal201.dll" PARENT_SCOPE)
+ set(EXTERNAL_LIBRARY "${CMAKE_CURRENT_SOURCE_DIR}/ext/gdal/lib/gdal202.dll" PARENT_SCOPE)
else (WIN32)
find_package(GDAL REQUIRED)
diff --git a/modules/globebrowsing/ext/gdal/gdal.h b/modules/globebrowsing/ext/gdal/gdal.h
deleted file mode 100644
index 7153331b6a..0000000000
--- a/modules/globebrowsing/ext/gdal/gdal.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*****************************************************************************************
- * *
- * OpenSpace *
- * *
- * Copyright (c) 2014-2017 *
- * *
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this *
- * software and associated documentation files (the "Software"), to deal in the Software *
- * without restriction, including without limitation the rights to use, copy, modify, *
- * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
- * permit persons to whom the Software is furnished to do so, subject to the following *
- * conditions: *
- * *
- * The above copyright notice and this permission notice shall be included in all copies *
- * or substantial portions of the Software. *
- * *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
- * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
- * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
- * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
- * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
- ****************************************************************************************/
-
-#ifndef __OPENSPACE_MODULE_GLOBEBROWSING___GDAL___H__
-#define __OPENSPACE_MODULE_GLOBEBROWSING___GDAL___H__
-
-#ifdef WIN32
-#pragma warning(push, 0)
-#endif // WIN32
-
-#include
-
-#ifdef WIN32
-#pragma warning(pop)
-#endif // WIN32
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_atomic_ops.h b/modules/globebrowsing/ext/gdal/include/cpl_atomic_ops.h
index 6a07d2ceca..68999266bc 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_atomic_ops.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_atomic_ops.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_atomic_ops.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_atomic_ops.h 35921 2016-10-25 02:28:29Z goatbar $
*
* Name: cpl_atomic_ops.h
* Project: CPL - Common Portability Library
@@ -51,7 +51,7 @@ CPL_C_START
* supported by GCC 4.1 or higher. For other platforms supporting
* the pthread library, and when GDAL is configured with thread-support,
* the atomicity will be done with a mutex, but with
- * reduced efficiently. For the remaining platforms, a simple addition
+ * reduced efficiency. For the remaining platforms, a simple addition
* with no locking will be done...
*
* @param ptr a pointer to an integer to increment
@@ -82,7 +82,6 @@ int CPL_DLL CPLAtomicAdd(volatile int* ptr, int increment);
*/
#define CPLAtomicDec(ptr) CPLAtomicAdd(ptr, -1)
-
/** Compares *ptr with oldval. If *ptr == oldval, then *ptr is assigned
* newval and TRUE is returned. Otherwise nothing is done, and FALSE is returned.
*
@@ -91,8 +90,8 @@ int CPL_DLL CPLAtomicAdd(volatile int* ptr, int increment);
* supported by GCC 4.1 or higher. For other platforms supporting
* the pthread library, and when GDAL is configured with thread-support,
* the atomicity will be done with a mutex, but with
- * reduced efficiently. For the remaining platforms, a simple addition
- * with no locking will be done...
+ * reduced efficiency. For the remaining platforms, a simple compare and
+ * exchange with no locking will be done...
*
* @param ptr a pointer to an integer (aligned on 32bit boundary).
* @param oldval old value
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_aws.h b/modules/globebrowsing/ext/gdal/include/cpl_aws.h
index 854ada656a..88ea61ed1a 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_aws.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_aws.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_aws.h 33758 2016-03-21 09:06:22Z rouault $
+ * $Id: cpl_aws.h 37174 2017-01-18 20:00:36Z rouault $
*
* Name: cpl_aws.h
* Project: CPL - Common Portability Library
@@ -31,12 +31,17 @@
#ifndef CPL_AWS_INCLUDED_H
#define CPL_AWS_INCLUDED_H
+#ifndef DOXYGEN_SKIP
+
+#include
+
#include "cpl_string.h"
CPLString CPLGetAWS_SIGN4_Authorization(const CPLString& osSecretAccessKey,
const CPLString& osAccessKeyId,
const CPLString& osAccessToken,
const CPLString& osAWSRegion,
+ const CPLString& osRequestPayer,
const CPLString& osService,
const CPLString& osVerb,
const CPLString& osHost,
@@ -65,6 +70,7 @@ class VSIS3HandleHelper
CPLString m_osSessionToken;
CPLString m_osAWSS3Endpoint;
CPLString m_osAWSRegion;
+ CPLString m_osRequestPayer;
CPLString m_osBucket;
CPLString m_osObjectKey;
bool m_bUseHTTPS;
@@ -84,6 +90,7 @@ class VSIS3HandleHelper
const CPLString& osSessionToken,
const CPLString& osAWSS3Endpoint,
const CPLString& osAWSRegion,
+ const CPLString& osRequestPayer,
const CPLString& osBucket,
const CPLString& osObjectKey,
bool bUseHTTPS, bool bUseVirtualHosting);
@@ -109,9 +116,11 @@ class VSIS3HandleHelper
const CPLString& GetObjectKey() const { return m_osObjectKey; }
const CPLString& GetAWSS3Endpoint()const { return m_osAWSS3Endpoint; }
const CPLString& GetAWSRegion() const { return m_osAWSRegion; }
+ const CPLString& GetRequestPayer() const { return m_osRequestPayer; }
bool GetVirtualHosting() const { return m_bUseVirtualHosting; }
void SetAWSS3Endpoint(const CPLString &osStr);
void SetAWSRegion(const CPLString &osStr);
+ void SetRequestPayer(const CPLString &osStr);
void SetVirtualHosting(bool b);
void SetObjectKey(const CPLString &osStr);
};
@@ -121,16 +130,21 @@ class VSIS3UpdateParams
public:
CPLString m_osAWSRegion;
CPLString m_osAWSS3Endpoint;
+ CPLString m_osRequestPayer;
bool m_bUseVirtualHosting;
VSIS3UpdateParams(const CPLString& osAWSRegion = "",
const CPLString& osAWSS3Endpoint = "",
+ const CPLString& osRequestPayer = "",
bool bUseVirtualHosting = false) :
m_osAWSRegion(osAWSRegion),
m_osAWSS3Endpoint(osAWSS3Endpoint),
+ m_osRequestPayer(osRequestPayer),
m_bUseVirtualHosting(bUseVirtualHosting) {}
};
#endif /* HAVE_CURL */
+#endif /* #ifndef DOXYGEN_SKIP */
+
#endif /* CPL_AWS_INCLUDED_H */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_config.h b/modules/globebrowsing/ext/gdal/include/cpl_config.h
index fe7b82a8a2..f03d16ef04 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_config.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_config.h
@@ -47,7 +47,7 @@
/* Define to 1 if you have the header file. */
#define HAVE_SYS_TYPES_H 1
-#undef HAVE_LIBDL
+#undef HAVE_LIBDL
/* Define to 1 if you have the header file. */
#define HAVE_LOCALE_H 1
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_config_extras.h b/modules/globebrowsing/ext/gdal/include/cpl_config_extras.h
index 654f2fcad6..425c8c6ed5 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_config_extras.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_config_extras.h
@@ -1,3 +1,4 @@
+/* $Id: cpl_config_extras.h 37003 2016-12-23 14:54:07Z goatbar $ */
#ifndef INCLUDED_CPL_CONFIG_EXTRAS
#define INCLUDED_CPL_CONFIG_EXTRAS
@@ -10,7 +11,6 @@
#define HOST_FILLORDER FILLORDER_LSB2MSB
#endif
-
#ifdef __LP64__
#define SIZEOF_UNSIGNED_LONG 8
#else
@@ -37,4 +37,4 @@
#endif // APPLE
-#endif //INCLUDED_CPL_CONFIG_EXTRAS
+#endif // INCLUDED_CPL_CONFIG_EXTRAS
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_conv.h b/modules/globebrowsing/ext/gdal/include/cpl_conv.h
index 2e3d883ee4..644e1fe7c2 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_conv.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_conv.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_conv.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_conv.h 37866 2017-03-30 20:16:05Z rouault $
*
* Project: CPL - Common Portability Library
* Purpose: Convenience functions declarations.
@@ -48,7 +48,9 @@
/* -------------------------------------------------------------------- */
CPL_C_START
+/*! @cond Doxygen_Suppress */
void CPL_DLL CPLVerifyConfiguration(void);
+/*! @endcond */
const char CPL_DLL * CPL_STDCALL
CPLGetConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
@@ -57,7 +59,13 @@ CPLGetThreadLocalConfigOption( const char *, const char * ) CPL_WARN_UNUSED_RESU
void CPL_DLL CPL_STDCALL CPLSetConfigOption( const char *, const char * );
void CPL_DLL CPL_STDCALL CPLSetThreadLocalConfigOption( const char *pszKey,
const char *pszValue );
+/*! @cond Doxygen_Suppress */
void CPL_DLL CPL_STDCALL CPLFreeConfig(void);
+/*! @endcond */
+char CPL_DLL** CPLGetConfigOptions(void);
+void CPL_DLL CPLSetConfigOptions(const char* const * papszConfigOptions);
+char CPL_DLL** CPLGetThreadLocalConfigOptions(void);
+void CPL_DLL CPLSetThreadLocalConfigOptions(const char* const * papszConfigOptions);
/* -------------------------------------------------------------------- */
/* Safe malloc() API. Thin cover over VSI functions with fatal */
@@ -69,6 +77,7 @@ void CPL_DLL *CPLRealloc( void *, size_t ) CPL_WARN_UNUSED_RESULT;
char CPL_DLL *CPLStrdup( const char * ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
char CPL_DLL *CPLStrlwr( char *);
+/** Alias of VSIFree() */
#define CPLFree VSIFree
/* -------------------------------------------------------------------- */
@@ -77,7 +86,13 @@ char CPL_DLL *CPLStrlwr( char *);
char CPL_DLL *CPLFGets( char *, int, FILE *);
const char CPL_DLL *CPLReadLine( FILE * );
const char CPL_DLL *CPLReadLineL( VSILFILE * );
-const char CPL_DLL *CPLReadLine2L( VSILFILE * , int nMaxCols, char** papszOptions);
+#ifdef __cplusplus
+const char CPL_DLL *CPLReadLine2L( VSILFILE * , int nMaxCols,
+ const char * const * papszOptions );
+#else
+const char CPL_DLL *CPLReadLine2L( VSILFILE * , int nMaxCols,
+ char** papszOptions );
+#endif
/* -------------------------------------------------------------------- */
/* Convert ASCII string to floating point number */
@@ -158,10 +173,13 @@ char CPL_DLL **CPLCorrespondingPaths( const char *pszOldFilename,
int CPL_DLL CPLCheckForFile( char *pszFilename, char **papszSiblingList );
const char CPL_DLL *CPLGenerateTempFilename( const char *pszStem ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
+const char CPL_DLL *CPLExpandTilde( const char *pszFilename ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
/* -------------------------------------------------------------------- */
/* Find File Function */
/* -------------------------------------------------------------------- */
+
+/** Callback for CPLPushFileFinder */
typedef const char *(*CPLFileFinder)(const char *, const char *);
const char CPL_DLL *CPLFindFile(const char *pszClass,
@@ -183,19 +201,23 @@ int CPL_DLL CPLStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
/* Reference counted file handle manager. Makes sharing file */
/* handles more practical. */
/* -------------------------------------------------------------------- */
+
+/** Information on a shared file */
typedef struct {
- FILE *fp;
- int nRefCount;
- int bLarge;
- char *pszFilename;
- char *pszAccess;
+ FILE *fp; /**< File pointer */
+ int nRefCount; /**< Reference counter */
+ int bLarge; /**< Whether fp must be interpreted as VSIFILE* */
+ char *pszFilename; /**< Filename */
+ char *pszAccess; /**< Access mode */
} CPLSharedFileInfo;
FILE CPL_DLL *CPLOpenShared( const char *, const char *, int );
void CPL_DLL CPLCloseShared( FILE * );
CPLSharedFileInfo CPL_DLL *CPLGetSharedList( int * );
void CPL_DLL CPLDumpSharedList( FILE * );
+/*! @cond Doxygen_Suppress */
void CPL_DLL CPLCleanupSharedFileMutex( void );
+/*! @endcond */
/* -------------------------------------------------------------------- */
/* DMS to Dec to DMS conversion. */
@@ -221,7 +243,10 @@ int CPL_DLL CPLSymlink( const char* pszOldPath, const char* pszNewPath, char** p
/* -------------------------------------------------------------------- */
/* ZIP Creation. */
/* -------------------------------------------------------------------- */
+
+/*! @cond Doxygen_Suppress */
#define CPL_ZIP_API_OFFERED
+/*! @endcond */
void CPL_DLL *CPLCreateZip( const char *pszZipFilename, char **papszOptions );
CPLErr CPL_DLL CPLCreateFileInZip( void *hZip, const char *pszFilename,
char **papszOptions );
@@ -251,7 +276,9 @@ int CPL_DLL CPLValidateXML(const char* pszXMLFilename,
/* Locale handling. Prevents parallel executions of setlocale(). */
/* -------------------------------------------------------------------- */
char* CPLsetlocale (int category, const char* locale);
+/*! @cond Doxygen_Suppress */
void CPLCleanupSetlocaleMutex(void);
+/*! @endcond */
CPL_C_END
@@ -259,6 +286,7 @@ CPL_C_END
/* C++ object for temporarily forcing a LC_NUMERIC locale to "C". */
/* -------------------------------------------------------------------- */
+//! @cond Doxygen_Suppress
#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
class CPL_DLL CPLLocaleC
@@ -302,6 +330,6 @@ private:
};
#endif /* def __cplusplus */
-
+//! @endcond
#endif /* ndef CPL_CONV_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_cpu_features.h b/modules/globebrowsing/ext/gdal/include/cpl_cpu_features.h
new file mode 100644
index 0000000000..39a4d2dbbf
--- /dev/null
+++ b/modules/globebrowsing/ext/gdal/include/cpl_cpu_features.h
@@ -0,0 +1,73 @@
+/******************************************************************************
+ *
+ * Project: CPL - Common Portability Library
+ * Purpose: Prototypes, and definitions for of CPU features detection
+ * Author: Even Rouault,
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#ifndef CPL_CPU_FEATURES_H
+#define CPL_CPU_FEATURES_H
+
+#include "cpl_port.h"
+#include "cpl_string.h"
+
+//! @cond Doxygen_Suppress
+
+#ifdef HAVE_SSE_AT_COMPILE_TIME
+#if (defined(_M_X64) || defined(__x86_64))
+#define HAVE_INLINE_SSE
+static bool inline CPLHaveRuntimeSSE() { return true; }
+#else
+bool CPLHaveRuntimeSSE();
+#endif
+#endif
+
+#ifdef HAVE_SSSE3_AT_COMPILE_TIME
+#if __SSSE3__
+#define HAVE_INLINE_SSSE3
+static bool inline CPLHaveRuntimeSSSE3()
+{
+#ifdef DEBUG
+ if( !CPLTestBool(CPLGetConfigOption("GDAL_USE_SSSE3", "YES")) )
+ return false;
+#endif
+ return true;
+}
+#else
+bool CPLHaveRuntimeSSSE3();
+#endif
+#endif
+
+#ifdef HAVE_AVX_AT_COMPILE_TIME
+#if __AVX__
+#define HAVE_INLINE_AVX
+static bool inline CPLHaveRuntimeAVX() { return true; }
+#else
+bool CPLHaveRuntimeAVX();
+#endif
+#endif
+
+//! @endcond
+
+#endif // CPL_CPU_FEATURES_H
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_csv.h b/modules/globebrowsing/ext/gdal/include/cpl_csv.h
index 6337431077..8193003e86 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_csv.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_csv.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_csv.h 33844 2016-04-01 08:42:13Z rouault $
+ * $Id: cpl_csv.h 36376 2016-11-21 06:54:04Z goatbar $
*
* Project: Common Portability Library
* Purpose: Functions for reading and scanning CSV (comma separated,
@@ -31,6 +31,8 @@
#ifndef CPL_CSV_H_INCLUDED
#define CPL_CSV_H_INCLUDED
+#include
+
#include "cpl_conv.h"
#include "cpl_string.h"
#include "cpl_vsi.h"
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_error.h b/modules/globebrowsing/ext/gdal/include/cpl_error.h
index 3ddad1aca7..79a8269889 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_error.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_error.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_error.h 33842 2016-04-01 08:37:32Z rouault $
+ * $Id: cpl_error.h 36675 2016-12-04 11:10:10Z rouault $
*
* Name: cpl_error.h
* Project: CPL - Common Portability Library
@@ -33,6 +33,9 @@
#include "cpl_port.h"
+#include
+#include
+
/*=====================================================================
Error handling functions (cpl_error.c)
=====================================================================*/
@@ -45,6 +48,7 @@
CPL_C_START
+/** Error category */
typedef enum
{
CE_None = 0,
@@ -87,35 +91,53 @@ typedef enum
#else
+/** Error number */
typedef int CPLErrorNum;
+/** No error */
#define CPLE_None 0
+/** Application defined error */
#define CPLE_AppDefined 1
+/** Out of memory error */
#define CPLE_OutOfMemory 2
+/** File I/O error */
#define CPLE_FileIO 3
+/** Open failed */
#define CPLE_OpenFailed 4
+/** Illegal argument */
#define CPLE_IllegalArg 5
+/** Not supported */
#define CPLE_NotSupported 6
+/** Assertion failed */
#define CPLE_AssertionFailed 7
+/** No write access */
#define CPLE_NoWriteAccess 8
+/** User interrupted */
#define CPLE_UserInterrupt 9
+/** NULL object */
#define CPLE_ObjectNull 10
/*
* Filesystem-specific errors
*/
+/** HTTP response */
#define CPLE_HttpResponse 11
+/** AWSBucketNotFound */
#define CPLE_AWSBucketNotFound 12
+/** AWSObjectNotFound */
#define CPLE_AWSObjectNotFound 13
+/** AWSAccessDenied */
#define CPLE_AWSAccessDenied 14
+/** AWSInvalidCredentials */
#define CPLE_AWSInvalidCredentials 15
+/** AWSSignatureDoesNotMatch */
#define CPLE_AWSSignatureDoesNotMatch 16
/* 100 - 299 reserved for GDAL */
#endif
-void CPL_DLL CPLError(CPLErr eErrClass, CPLErrorNum err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (3, 4);
+void CPL_DLL CPLError(CPLErr eErrClass, CPLErrorNum err_no, CPL_FORMAT_STRING(const char *fmt), ...) CPL_PRINT_FUNC_FORMAT (3, 4);
void CPL_DLL CPLErrorV(CPLErr, CPLErrorNum, const char *, va_list );
void CPL_DLL CPLEmergencyError( const char * ) CPL_NO_RETURN;
void CPL_DLL CPL_STDCALL CPLErrorReset( void );
@@ -124,33 +146,45 @@ CPLErr CPL_DLL CPL_STDCALL CPLGetLastErrorType( void );
const char CPL_DLL * CPL_STDCALL CPLGetLastErrorMsg( void );
void CPL_DLL * CPL_STDCALL CPLGetErrorHandlerUserData(void);
void CPL_DLL CPLErrorSetState( CPLErr eErrClass, CPLErrorNum err_no, const char* pszMsg );
+/*! @cond Doxygen_Suppress */
void CPL_DLL CPLCleanupErrorMutex( void );
+/*! @endcond */
+/** Callback for a custom error handler */
typedef void (CPL_STDCALL *CPLErrorHandler)(CPLErr, CPLErrorNum, const char*);
void CPL_DLL CPL_STDCALL CPLLoggingErrorHandler( CPLErr, CPLErrorNum, const char * );
void CPL_DLL CPL_STDCALL CPLDefaultErrorHandler( CPLErr, CPLErrorNum, const char * );
void CPL_DLL CPL_STDCALL CPLQuietErrorHandler( CPLErr, CPLErrorNum, const char * );
-void CPLTurnFailureIntoWarning(int bOn );
+void CPLTurnFailureIntoWarning( int bOn );
-CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandler(CPLErrorHandler);
-CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandlerEx(CPLErrorHandler, void*);
+CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandler( CPLErrorHandler );
+CPLErrorHandler CPL_DLL CPL_STDCALL CPLSetErrorHandlerEx( CPLErrorHandler, void* );
void CPL_DLL CPL_STDCALL CPLPushErrorHandler( CPLErrorHandler );
void CPL_DLL CPL_STDCALL CPLPushErrorHandlerEx( CPLErrorHandler, void* );
void CPL_DLL CPL_STDCALL CPLSetCurrentErrorHandlerCatchDebug( int bCatchDebug );
void CPL_DLL CPL_STDCALL CPLPopErrorHandler(void);
-void CPL_DLL CPL_STDCALL CPLDebug( const char *, const char *, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
+#ifdef WITHOUT_CPLDEBUG
+#define CPLDebug(...) /* Eat all CPLDebug calls. */
+#else
+void CPL_DLL CPL_STDCALL CPLDebug(const char *, CPL_FORMAT_STRING(const char *), ...)
+ CPL_PRINT_FUNC_FORMAT(2, 3);
+#endif
+
void CPL_DLL CPL_STDCALL _CPLAssert( const char *, const char *, int ) CPL_NO_RETURN;
#ifdef DEBUG
+/** Assert on an expression. Only enabled in DEBUG mode */
# define CPLAssert(expr) ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__))
#else
+/** Assert on an expression. Only enabled in DEBUG mode */
# define CPLAssert(expr)
#endif
CPL_C_END
+/*! @cond Doxygen_Suppress */
/*
* Helper macros used for input parameters validation.
*/
@@ -159,7 +193,9 @@ CPL_C_END
#else
# define VALIDATE_POINTER_ERR CE_Failure
#endif
+/*! @endcond */
+/** Validate that a pointer is not NULL */
#define VALIDATE_POINTER0(ptr, func) \
do { if( NULL == ptr ) \
{ \
@@ -168,6 +204,7 @@ CPL_C_END
"Pointer \'%s\' is NULL in \'%s\'.\n", #ptr, (func)); \
return; }} while(0)
+/** Validate that a pointer is not NULL, and return rc if it is NULL */
#define VALIDATE_POINTER1(ptr, func, rc) \
do { if( NULL == ptr ) \
{ \
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_google_cloud.h b/modules/globebrowsing/ext/gdal/include/cpl_google_cloud.h
new file mode 100644
index 0000000000..430cc5f904
--- /dev/null
+++ b/modules/globebrowsing/ext/gdal/include/cpl_google_cloud.h
@@ -0,0 +1,70 @@
+/**********************************************************************
+ * Project: CPL - Common Portability Library
+ * Purpose: Google Cloud Storage routines
+ * Author: Even Rouault
+ *
+ **********************************************************************
+ * Copyright (c) 2017, Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#ifndef CPL_GOOGLE_CLOUD_INCLUDED_H
+#define CPL_GOOGLE_CLOUD_INCLUDED_H
+
+#ifndef DOXYGEN_SKIP
+
+#include
+
+#include "cpl_string.h"
+
+#ifdef HAVE_CURL
+
+#include
+
+class VSIGSHandleHelper
+{
+ CPLString m_osURL;
+ CPLString m_osEndpoint;
+ CPLString m_osBucketObjectKey;
+ CPLString m_osSecretAccessKey;
+ CPLString m_osAccessKeyId;
+ bool m_bUseHeaderFile;
+
+ public:
+ VSIGSHandleHelper(const CPLString& osEndpoint,
+ const CPLString& osBucketObjectKey,
+ const CPLString& osSecretAccessKey,
+ const CPLString& osAccessKeyId,
+ bool bUseHeaderFile);
+ ~VSIGSHandleHelper();
+
+ static VSIGSHandleHelper* BuildFromURI(const char* pszURI,
+ const char* pszFSPrefix);
+
+ struct curl_slist* GetCurlHeaders(const CPLString& osVerb) const;
+
+ const CPLString& GetURL() const { return m_osURL; }
+};
+
+#endif /* HAVE_CURL */
+
+#endif /* #ifndef DOXYGEN_SKIP */
+
+#endif /* CPL_GOOGLE_CLOUD_INCLUDED_H */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_hash_set.h b/modules/globebrowsing/ext/gdal/include/cpl_hash_set.h
index 37b68d8d7c..07d307e64f 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_hash_set.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_hash_set.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_hash_set.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_hash_set.h 34931 2016-08-05 17:13:05Z rouault $
*
* Name: cpl_hash_set.h
* Project: CPL - Common Portability Library
@@ -48,14 +48,19 @@ CPL_C_START
/* Types */
+/** Opaque type for a hash set */
typedef struct _CPLHashSet CPLHashSet;
+/** CPLHashSetHashFunc */
typedef unsigned long (*CPLHashSetHashFunc)(const void* elt);
+/** CPLHashSetEqualFunc */
typedef int (*CPLHashSetEqualFunc)(const void* elt1, const void* elt2);
+/** CPLHashSetFreeEltFunc */
typedef void (*CPLHashSetFreeEltFunc)(void* elt);
+/** CPLHashSetIterEltFunc */
typedef int (*CPLHashSetIterEltFunc)(void* elt, void* user_data);
/* Functions */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_http.h b/modules/globebrowsing/ext/gdal/include/cpl_http.h
index 071ed11836..a032f0eccd 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_http.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_http.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_http.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_http.h 37645 2017-03-08 00:15:33Z rouault $
*
* Project: Common Portability Library
* Purpose: Function wrapper for libcurl HTTP access.
@@ -64,6 +64,7 @@ typedef struct {
/*! Length of the pabyData buffer */
int nDataLen;
+ /*! Allocated size of the pabyData buffer */
int nDataAlloc;
/*! Buffer with downloaded data */
@@ -102,4 +103,12 @@ char CPL_DLL *GOA2GetAccessToken( const char *pszRefreshToken,
CPL_C_END
+#ifdef __cplusplus
+/*! @cond Doxygen_Suppress */
+// Not sure if this belong here, used in cpl_http.cpp, cpl_vsil_curl.cpp and frmts/wms/gdalhttp.cpp
+void* CPLHTTPSetOptions(void *pcurl, const char * const* papszOptions);
+char** CPLHTTPGetOptionsFromEnv();
+/*! @endcond */
+#endif // __cplusplus
+
#endif /* ndef CPL_HTTP_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_list.h b/modules/globebrowsing/ext/gdal/include/cpl_list.h
index a6e64d8791..f802fcd9c3 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_list.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_list.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_list.h 33671 2016-03-07 18:39:06Z goatbar $
+ * $Id: cpl_list.h 37825 2017-03-21 20:14:08Z rouault $
*
* Name: cpl_list.h
* Project: CPL - Common Portability Library
@@ -45,7 +45,10 @@
CPL_C_START
/** List element structure. */
-typedef struct _CPLList
+typedef struct _CPLList CPLList;
+
+/** List element structure. */
+struct _CPLList
{
/*! Pointer to the data object. Should be allocated and freed by the
* caller.
@@ -55,7 +58,7 @@ typedef struct _CPLList
* last one.
*/
struct _CPLList *psNext;
-} CPLList;
+};
CPLList CPL_DLL *CPLListAppend( CPLList *psList, void * pData );
CPLList CPL_DLL *CPLListInsert( CPLList *psList, void * pData, int nPosition );
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_minixml.h b/modules/globebrowsing/ext/gdal/include/cpl_minixml.h
index 3b53e130fe..d9fc46c294 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_minixml.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_minixml.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_minixml.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_minixml.h 35921 2016-10-25 02:28:29Z goatbar $
*
* Project: CPL - Common Portability Library
* Purpose: Declarations for MiniXML Handler.
@@ -40,6 +40,7 @@
CPL_C_START
+/** XML node type */
typedef enum
{
/*! Node is an element */ CXT_Element = 0,
@@ -117,7 +118,6 @@ typedef struct CPLXMLNode
struct CPLXMLNode *psChild;
} CPLXMLNode;
-
CPLXMLNode CPL_DLL *CPLParseXMLString( const char * );
void CPL_DLL CPLDestroyXMLNode( CPLXMLNode * );
CPLXMLNode CPL_DLL *CPLGetXMLNode( CPLXMLNode *poRoot,
@@ -158,19 +158,27 @@ int CPL_DLL CPLSerializeXMLTreeToFile( const CPLXMLNode *psTree,
CPL_C_END
#ifdef __cplusplus
-// Manage a tree of XML nodes so that all nodes are freed when the instance goes
-// out of scope. Only the top level node should be in a CPLXMLTreeCloser.
+/** Manage a tree of XML nodes so that all nodes are freed when the instance goes
+ * out of scope. Only the top level node should be in a CPLXMLTreeCloser.
+ */
class CPLXMLTreeCloser {
public:
+ /** Constructor */
explicit CPLXMLTreeCloser(CPLXMLNode* data) { the_data_ = data; }
+ /** Destructor */
~CPLXMLTreeCloser() {
if (the_data_) CPLDestroyXMLNode(the_data_);
}
- // Modifying the contents pointed to by the return is allowed.
+ /** Returns the node pointer/
+ * Modifying the contents pointed to by the return is allowed.
+ * @return the node pointer */
CPLXMLNode* get() const { return the_data_; }
+ /** Returns the node pointer/
+ * Modifying the contents pointed to by the return is allowed.
+ * @return the node pointer */
CPLXMLNode* operator->() const { return get(); }
private:
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_minizip_ioapi.h b/modules/globebrowsing/ext/gdal/include/cpl_minizip_ioapi.h
index 15f188d5a5..b0fd4b72f5 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_minizip_ioapi.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_minizip_ioapi.h
@@ -1,3 +1,5 @@
+/* $Id: cpl_minizip_ioapi.h 36484 2016-11-24 06:35:54Z goatbar $ */
+
/* Modified version by Even Rouault. :
- change fill_fopen_filefunc to cpl_fill_fopen_filefunc
- Add support for ZIP64
@@ -18,7 +20,11 @@
#ifndef CPL_MINIZIP_IOAPI_H_INCLUDED
#define CPL_MINIZIP_IOAPI_H_INCLUDED
+#ifndef DOXYGEN_SKIP
+
#include "cpl_vsi.h"
+#include "zlib.h"
+
#define uLong64 vsi_l_offset
#define ZLIB_FILEFUNC_SEEK_CUR (1)
@@ -74,9 +80,10 @@ void cpl_fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
-
#ifdef __cplusplus
}
#endif
+#endif /* #ifndef DOXYGEN_SKIP */
+
#endif /* CPL_MINIZIP_IOAPI_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_minizip_unzip.h b/modules/globebrowsing/ext/gdal/include/cpl_minizip_unzip.h
index b02d830a03..f210918d06 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_minizip_unzip.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_minizip_unzip.h
@@ -1,3 +1,4 @@
+/* $Id: cpl_minizip_unzip.h 35921 2016-10-25 02:28:29Z goatbar $ */
/* Modified version by Even Rouault. :
- Addition of cpl_unzGetCurrentFileZStreamPos
- Decoration of symbol names unz* -> cpl_unz*
@@ -21,7 +22,6 @@
Encryption compatible with pkzip 2.04g only supported
Old compressions used by old PKZip 1.x are not supported
-
I WAIT FEEDBACK at mail info@winimage.com
Visit also http://www.winimage.com/zLibDll/unzip.htm for evolution
@@ -42,8 +42,6 @@
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-
-
*/
/* for more info about .ZIP format, see
@@ -56,6 +54,8 @@
#ifndef CPL_MINIZIP_UNZIP_H_INCLUDED
#define CPL_MINIZIP_UNZIP_H_INCLUDED
+#ifndef DOXYGEN_SKIP
+
#include "cpl_vsi.h"
#define uLong64 vsi_l_offset
@@ -85,7 +85,6 @@ typedef unzFile__ *unzFile;
typedef voidp unzFile;
#endif
-
#define UNZ_OK (0)
#define UNZ_END_OF_LIST_OF_FILE (-100)
#define UNZ_ERRNO (Z_ERRNO)
@@ -115,7 +114,6 @@ typedef struct unz_global_info_s
uLong size_comment; /* size of the global comment of the zipfile */
} unz_global_info;
-
/* unz_file_info contain information about a file in the zipfile */
typedef struct unz_file_info_s
{
@@ -150,7 +148,6 @@ extern int ZEXPORT cpl_unzStringFileNameCompare (const char* fileName1,
(like 1 on Unix, 2 on Windows)
*/
-
extern unzFile ZEXPORT cpl_unzOpen (const char *path);
/*
Open a Zip file. path contain the full pathname (by example,
@@ -183,7 +180,6 @@ extern int ZEXPORT cpl_unzGetGlobalInfo (unzFile file,
No preparation of the structure is needed
return UNZ_OK if there is no problem. */
-
extern int ZEXPORT cpl_unzGetGlobalComment (unzFile file,
char *szComment,
uLong uSizeBuf);
@@ -193,7 +189,6 @@ extern int ZEXPORT cpl_unzGetGlobalComment (unzFile file,
return the number of byte copied or an error code <0
*/
-
/***************************************************************************/
/* Unzip package allow you browse the directory of the zipfile */
@@ -222,7 +217,6 @@ extern int ZEXPORT cpl_unzLocateFile (unzFile file,
UNZ_END_OF_LIST_OF_FILE if the file is not found
*/
-
/* ****************************************** */
/* Ryan supplied functions */
/* unz_file_info contain information about a file in the zipfile */
@@ -263,14 +257,12 @@ extern int ZEXPORT cpl_unzGetCurrentFileInfo (unzFile file,
(commentBufferSize is the size of the buffer)
*/
-
/** Addition for GDAL : START */
extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos (unzFile file);
/** Addition for GDAL : END */
-
/***************************************************************************/
/* for reading the content of the current zipfile, you can open it, read data
from it, and close it (you can close it before reading all the file)
@@ -317,7 +309,6 @@ extern int ZEXPORT cpl_unzOpenCurrentFile3 (unzFile file,
but you CANNOT set method parameter as NULL
*/
-
extern int ZEXPORT cpl_unzCloseCurrentFile (unzFile file);
/*
Close the file in zip opened with unzOpenCurrentFile
@@ -372,10 +363,10 @@ extern uLong64 ZEXPORT cpl_unzGetOffset (unzFile file);
/* Set the current file offset */
extern int ZEXPORT cpl_unzSetOffset (unzFile file, uLong64 pos);
-
-
#ifdef __cplusplus
}
#endif
+#endif /* #ifndef DOXYGEN_SKIP */
+
#endif /* CPL_MINIZIP_UNZIP_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_minizip_zip.h b/modules/globebrowsing/ext/gdal/include/cpl_minizip_zip.h
index b086990bcb..e086e516f4 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_minizip_zip.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_minizip_zip.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_minizip_zip.h 31826 2015-11-29 15:39:57Z goatbar $
+ * $Id: cpl_minizip_zip.h 35921 2016-10-25 02:28:29Z goatbar $
*
* Project: CPL - Common Portability Library
* Author: Frank Warmerdam, warmerdam@pobox.com
@@ -28,7 +28,6 @@
For uncompress .zip file, look at unzip.h
-
I WAIT FEEDBACK at mail info@winimage.com
Visit also http://www.winimage.com/zLibDll/unzip.html for evolution
@@ -49,8 +48,6 @@
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-
-
*/
/* for more info about .ZIP format, see
@@ -63,6 +60,8 @@
#ifndef CPL_MINIZIP_ZIP_H_INCLUDED
#define CPL_MINIZIP_ZIP_H_INCLUDED
+#ifndef DOXYGEN_SKIP
+
#include "cpl_vsi.h"
#define uLong64 vsi_l_offset
@@ -130,7 +129,6 @@ typedef struct
typedef const char* zipcharpc;
-
#define APPEND_STATUS_CREATE (0)
#define APPEND_STATUS_CREATEAFTER (1)
#define APPEND_STATUS_ADDINZIP (2)
@@ -183,7 +181,6 @@ extern int ZEXPORT cpl_zipOpenNewFileInZip (zipFile file,
level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
*/
-
extern int ZEXPORT cpl_zipOpenNewFileInZip2 (zipFile file,
const char* filename,
const zip_fileinfo* zipfi,
@@ -224,7 +221,6 @@ extern int ZEXPORT cpl_zipOpenNewFileInZip3 (zipFile file,
crcForCtypting : crc of file to compress (needed for crypting)
*/
-
extern int ZEXPORT cpl_zipWriteInFileInZip (zipFile file,
const void* buf,
unsigned len);
@@ -256,4 +252,6 @@ extern int ZEXPORT cpl_zipClose (zipFile file,
}
#endif
+#endif /* #ifndef DOXYGEN_SKIP */
+
#endif /* _zip_H */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_multiproc.h b/modules/globebrowsing/ext/gdal/include/cpl_multiproc.h
index 0a3cfba05d..5a0d623584 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_multiproc.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_multiproc.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_multiproc.h 33817 2016-03-30 17:35:37Z rouault $
+ * $Id: cpl_multiproc.h 35921 2016-10-25 02:28:29Z goatbar $
*
* Project: CPL - Common Portability Library
* Purpose: CPL Multi-Threading, and process handling portability functions.
@@ -101,7 +101,6 @@ const char CPL_DLL *CPLGetThreadingModel( void );
int CPL_DLL CPLGetNumCPUs( void );
-
typedef struct _CPLLock CPLLock;
/* Currently LOCK_ADAPTIVE_MUTEX is Linux-only and LOCK_SPIN only available */
@@ -121,7 +120,6 @@ void CPL_DLL CPLReleaseLock( CPLLock* );
void CPL_DLL CPLDestroyLock( CPLLock* );
void CPL_DLL CPLLockSetDebugPerf( CPLLock*, int bEnableIn ); /* only available on x86/x86_64 with GCC for now */
-
CPL_C_END
#ifdef __cplusplus
@@ -137,23 +135,25 @@ CPL_C_END
/* be a no-op. The parameter x should be a (void*) */
#define CPLMutexHolderOptionalLockD(x) CPLMutexHolder oHolder(x,1000.0,__FILE__,__LINE__);
+/** Object to hold a mutex */
class CPL_DLL CPLMutexHolder
{
private:
CPLMutex *hMutex;
+ // Only used for debugging.
const char *pszFile;
int nLine;
public:
- /* Instantiates the mutex if not already done. */
+ /** Instantiates the mutex if not already done. */
CPLMutexHolder( CPLMutex **phMutex, double dfWaitInSeconds = 1000.0,
const char *pszFile = __FILE__,
int nLine = __LINE__,
int nOptions = CPL_MUTEX_RECURSIVE);
- /* This variant assumes the mutex has already been created. If not, it will */
- /* be a no-op */
+ /** This variant assumes the mutex has already been created. If not, it will
+ * be a no-op */
CPLMutexHolder( CPLMutex* hMutex, double dfWaitInSeconds = 1000.0,
const char *pszFile = __FILE__,
int nLine = __LINE__ );
@@ -168,6 +168,7 @@ class CPL_DLL CPLMutexHolder
/* be a no-op. The parameter should be (CPLLock*) */
#define CPLLockHolderOptionalLockD(x) CPLLockHolder oHolder(x,__FILE__,__LINE__);
+/** Object to hold a lock */
class CPL_DLL CPLLockHolder
{
private:
@@ -177,13 +178,13 @@ class CPL_DLL CPLLockHolder
public:
- /* Instantiates the lock if not already done. */
+ /** Instantiates the lock if not already done. */
CPLLockHolder( CPLLock **phSpin, CPLLockType eType,
const char *pszFile = __FILE__,
int nLine = __LINE__);
- /* This variant assumes the lock has already been created. If not, it will */
- /* be a no-op */
+ /** This variant assumes the lock has already been created. If not, it will
+ * be a no-op */
CPLLockHolder( CPLLock* hSpin,
const char *pszFile = __FILE__,
int nLine = __LINE__ );
@@ -191,7 +192,6 @@ class CPL_DLL CPLLockHolder
~CPLLockHolder();
};
-
#endif /* def __cplusplus */
/* -------------------------------------------------------------------- */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_odbc.h b/modules/globebrowsing/ext/gdal/include/cpl_odbc.h
index a97f0f11df..dd0043db2d 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_odbc.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_odbc.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_odbc.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_odbc.h 36675 2016-12-04 11:10:10Z rouault $
*
* Project: OGR ODBC Driver
* Purpose: Declarations for ODBC Access Cover API.
@@ -41,12 +41,13 @@
#include
#include "cpl_string.h"
+/*! @cond Doxygen_Suppress */
#ifdef PATH_MAX
# define ODBC_FILENAME_MAX PATH_MAX
#else
# define ODBC_FILENAME_MAX (255 + 1) /* Max path length */
#endif
-
+/*! @endcond */
/**
* \file cpl_odbc.h
@@ -69,7 +70,6 @@ class CPL_DLL CPLODBCDriverInstaller
// Default constructor.
CPLODBCDriverInstaller();
-
/**
* Installs ODBC driver or updates definition of already installed driver.
* Interanally, it calls ODBC's SQLInstallDriverEx function.
@@ -108,26 +108,26 @@ class CPL_DLL CPLODBCDriverInstaller
*/
int RemoveDriver( const char* pszDriverName, int fRemoveDSN = FALSE );
-
- // The usage count of the driver after this function has been called
+ /** The usage count of the driver after this function has been called */
int GetUsageCount() const { return m_nUsageCount; }
-
- // Path of the target directory where the driver should be installed.
- // For details, see ODBC API Reference and lpszPathOut
- // parameter of SQLInstallDriverEx
+ /** Path of the target directory where the driver should be installed.
+ * For details, see ODBC API Reference and lpszPathOut
+ * parameter of SQLInstallDriverEx
+ */
const char* GetPathOut() const { return m_szPathOut; }
-
- // If InstallDriver returns FALSE, then GetLastError then
- // error message can be obtained by calling this function.
- // Internally, it calls ODBC's SQLInstallerError function.
+ /** If InstallDriver returns FALSE, then GetLastError then
+ * error message can be obtained by calling this function.
+ * Internally, it calls ODBC's SQLInstallerError function.
+ */
const char* GetLastError() const { return m_szError; }
- // If InstallDriver returns FALSE, then GetLastErrorCode then
- // error code can be obtained by calling this function.
- // Internally, it calls ODBC's SQLInstallerError function.
- // See ODBC API Reference for possible error flags.
+ /** If InstallDriver returns FALSE, then GetLastErrorCode then
+ * error code can be obtained by calling this function.
+ * Internally, it calls ODBC's SQLInstallerError function.
+ * See ODBC API Reference for possible error flags.
+ */
DWORD GetLastErrorCode() const { return m_nErrorCode; }
};
@@ -141,6 +141,7 @@ class CPLODBCStatement;
# define MISSING_SQLULEN
#endif
+/*! @cond Doxygen_Suppress */
#if !defined(MISSING_SQLULEN)
/* ODBC types to support 64 bit compilation */
# define CPL_SQLULEN SQLULEN
@@ -148,8 +149,8 @@ class CPLODBCStatement;
#else
# define CPL_SQLULEN SQLUINTEGER
# define CPL_SQLLEN SQLINTEGER
-#endif /* ifdef SQLULEN */
-
+#endif /* ifdef SQLULEN */
+/*! @endcond */
/**
* A class representing an ODBC database session.
@@ -179,6 +180,7 @@ class CPL_DLL CPLODBCSession {
int BeginTransaction();
int CommitTransaction();
int RollbackTransaction();
+ /** Returns whether a transaction is active */
int IsInTransaction() { return m_bInTransaction; }
// Essentially internal.
@@ -186,7 +188,9 @@ class CPL_DLL CPLODBCSession {
int CloseSession();
int Failed( int, HSTMT = NULL );
+ /** Return connection handle */
HDBC GetConnection() { return m_hDBC; }
+ /** Return GetEnvironment handle */
HENV GetEnvironment() { return m_hEnv; }
};
@@ -223,9 +227,10 @@ class CPL_DLL CPLODBCStatement {
size_t m_nStatementLen;
public:
- CPLODBCStatement( CPLODBCSession * );
+ explicit CPLODBCStatement( CPLODBCSession * );
~CPLODBCStatement();
+ /** Return statement handle */
HSTMT GetStatement() { return m_hStmt; }
// Command buffer related.
@@ -234,7 +239,8 @@ class CPL_DLL CPLODBCStatement {
void Append( const char * );
void Append( int );
void Append( double );
- int Appendf( const char *, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
+ int Appendf( CPL_FORMAT_STRING(const char *), ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
+ /** Return statement string */
const char *GetCommand() { return m_pszStatement; }
int ExecuteSQL( const char * = NULL );
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_port.h b/modules/globebrowsing/ext/gdal/include/cpl_port.h
index 74c33d62e1..f4f910f9a4 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_port.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_port.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_port.h 33907 2016-04-07 00:37:06Z goatbar $
+ * $Id: cpl_port.h 37456 2017-02-25 18:35:03Z rouault $
*
* Project: CPL - Common Portability Library
* Author: Frank Warmerdam, warmerdam@pobox.com
@@ -82,7 +82,6 @@
#error "Unexpected value for SIZEOF_VOIDP"
#endif
-
/* ==================================================================== */
/* This will disable most WIN32 stuff in a Cygnus build which */
/* defines unix to 1. */
@@ -92,6 +91,7 @@
# undef WIN32
#endif
+/*! @cond Doxygen_Suppress */
#if defined(VSI_NEED_LARGEFILE64_SOURCE) && !defined(_LARGEFILE64_SOURCE)
# define _LARGEFILE64_SOURCE 1
#endif
@@ -107,20 +107,29 @@
#endif
#define CPL_RECODE_STUB
+/*! @endcond */
/* ==================================================================== */
/* MinGW stuff */
/* ==================================================================== */
-/* We need __MSVCRT_VERSION__ >= 0x0601 to have "struct __stat64" */
+/* We need __MSVCRT_VERSION__ >= 0x0700 to have "_aligned_malloc" */
/* Latest versions of mingw32 define it, but with older ones, */
/* we need to define it manually */
#if defined(__MINGW32__)
#ifndef __MSVCRT_VERSION__
-#define __MSVCRT_VERSION__ 0x0601
+#define __MSVCRT_VERSION__ 0x0700
#endif
#endif
+/* Needed for std=c11 on Solaris to have strcasecmp() */
+#if defined(GDAL_COMPILATION) && defined(__sun__) && __STDC_VERSION__ >= 201112L && _XOPEN_SOURCE < 600
+#ifdef _XOPEN_SOURCE
+#undef _XOPEN_SOURCE
+#endif
+#define _XOPEN_SOURCE 600
+#endif
+
/* ==================================================================== */
/* Standard include files. */
/* ==================================================================== */
@@ -175,7 +184,7 @@
# define HAVE_CXX11 1
# endif
/* TODO(schwehr): What are the correct tests for C++ 14 and 17? */
-#endif /* __cpluscplus */
+#endif /* __cplusplus */
/*---------------------------------------------------------------------
* types for 16 and 32 bits integers, etc...
@@ -184,17 +193,25 @@
typedef long GInt32;
typedef unsigned long GUInt32;
#else
+/** Int32 type */
typedef int GInt32;
+/** Unsigned int32 type */
typedef unsigned int GUInt32;
#endif
+/** Int16 type */
typedef short GInt16;
+/** Unsigned int16 type */
typedef unsigned short GUInt16;
+/** Unsigned byte type */
typedef unsigned char GByte;
/* hack for PDF driver and poppler >= 0.15.0 that defines incompatible "typedef bool GBool" */
/* in include/poppler/goo/gtypes.h */
#ifndef CPL_GBOOL_DEFINED
+/*! @cond Doxygen_Suppress */
#define CPL_GBOOL_DEFINED
+/*! @endcond */
+/** Type for boolean values (alias to int) */
typedef int GBool;
#endif
@@ -208,21 +225,62 @@ typedef int GBool;
typedef __int64 GIntBig;
typedef unsigned __int64 GUIntBig;
+/** Minimum GIntBig value */
#define GINTBIG_MIN ((GIntBig)(0x80000000) << 32)
+/** Maximum GIntBig value */
#define GINTBIG_MAX (((GIntBig)(0x7FFFFFFF) << 32) | 0xFFFFFFFFU)
+/** Maximum GUIntBig value */
#define GUINTBIG_MAX (((GUIntBig)(0xFFFFFFFFU) << 32) | 0xFFFFFFFFU)
+#define CPL_HAS_GINT64 1
+
+/** Signed 64 bit integer type */
+typedef GIntBig GInt64;
+/** Unsigned 64 bit integer type */
+typedef GUIntBig GUInt64;
+
+#define GINT64_MIN GINTBIG_MIN
+#define GINT64_MAX GINTBIG_MAX
+#define GUINT64_MAX GUINTBIG_MAX
+
#elif HAVE_LONG_LONG
+/** Large signed integer type (generally 64-bit integer type).
+ * Use GInt64 when exactly 64 bit is needed */
typedef long long GIntBig;
+/** Large unsigned integer type (generally 64-bit unsigned integer type).
+ * Use GUInt64 when exactly 64 bit is needed */
typedef unsigned long long GUIntBig;
+/** Minimum GIntBig value */
#define GINTBIG_MIN ((GIntBig)(0x80000000) << 32)
+/** Maximum GIntBig value */
#define GINTBIG_MAX (((GIntBig)(0x7FFFFFFF) << 32) | 0xFFFFFFFFU)
+/** Maximum GUIntBig value */
#define GUINTBIG_MAX (((GUIntBig)(0xFFFFFFFFU) << 32) | 0xFFFFFFFFU)
+/*! @cond Doxygen_Suppress */
+#define CPL_HAS_GINT64 1
+/*! @endcond */
+
+/* Note: we might want to use instead int64_t / uint64_t if they are available */
+
+/** Signed 64 bit integer type */
+typedef GIntBig GInt64;
+/** Unsigned 64 bit integer type */
+typedef GUIntBig GUInt64;
+
+/** Minimum GInt64 value */
+#define GINT64_MIN GINTBIG_MIN
+/** Maximum GInt64 value */
+#define GINT64_MAX GINTBIG_MAX
+/** Minimum GUInt64 value */
+#define GUINT64_MAX GUINTBIG_MAX
+
#else
+// NOTE: we don't really support such platforms ! Many things might break
+
typedef long GIntBig;
typedef unsigned long GUIntBig;
@@ -232,40 +290,67 @@ typedef unsigned long GUIntBig;
#endif
#if SIZEOF_VOIDP == 8
+/** Integer type large enough to hold the difference between 2 addresses */
typedef GIntBig GPtrDiff_t;
#else
+/** Integer type large enough to hold the difference between 2 addresses */
typedef int GPtrDiff_t;
#endif
+#ifdef GDAL_COMPILATION
+#if HAVE_UINTPTR_T
+#if !defined(_MSC_VER) || _MSC_VER > 1500
+#include
+#endif
+typedef uintptr_t GUIntptr_t;
+#elif SIZEOF_VOIDP == 8
+typedef GUIntBig GUIntptr_t;
+#else
+typedef unsigned int GUIntptr_t;
+#endif
+
+#define CPL_IS_ALIGNED(ptr, quant) (((GUIntptr_t)(ptr) % (quant)) == 0)
+
+#endif
+
#if defined(__MSVCRT__) || (defined(WIN32) && defined(_MSC_VER))
#define CPL_FRMT_GB_WITHOUT_PREFIX "I64"
#elif HAVE_LONG_LONG
+/** Printf formatting suffix for GIntBig */
#define CPL_FRMT_GB_WITHOUT_PREFIX "ll"
#else
#define CPL_FRMT_GB_WITHOUT_PREFIX "l"
#endif
+/** Printf formatting for GIntBig */
#define CPL_FRMT_GIB "%" CPL_FRMT_GB_WITHOUT_PREFIX "d"
+/** Printf formatting for GUIntBig */
#define CPL_FRMT_GUIB "%" CPL_FRMT_GB_WITHOUT_PREFIX "u"
+/*! @cond Doxygen_Suppress */
/* Workaround VC6 bug */
#if defined(_MSC_VER) && (_MSC_VER <= 1200)
#define GUINTBIG_TO_DOUBLE(x) (double)(GIntBig)(x)
#else
#define GUINTBIG_TO_DOUBLE(x) (double)(x)
#endif
+/*! @endcond */
+/*! @cond Doxygen_Suppress */
#ifdef COMPAT_WITH_ICC_CONVERSION_CHECK
#define CPL_INT64_FITS_ON_INT32(x) ((x) >= INT_MIN && (x) <= INT_MAX)
#else
#define CPL_INT64_FITS_ON_INT32(x) (((GIntBig)(int)(x)) == (x))
#endif
+/*! @endcond */
/* ==================================================================== */
/* Other standard services. */
/* ==================================================================== */
#ifdef __cplusplus
+/** Macro to start a block of C symbols */
# define CPL_C_START extern "C" {
+/** Macro to end a block of C symbols */
# define CPL_C_END }
#else
# define CPL_C_START
@@ -284,12 +369,14 @@ typedef int GPtrDiff_t;
#endif
#endif
+/*! @cond Doxygen_Suppress */
/* Should optional (normally private) interfaces be exported? */
#ifdef CPL_OPTIONAL_APIS
# define CPL_ODLL CPL_DLL
#else
# define CPL_ODLL
#endif
+/*! @endcond */
#ifndef CPL_STDCALL
#if defined(_MSC_VER) && !defined(CPL_DISABLE_STDCALL)
@@ -299,12 +386,15 @@ typedef int GPtrDiff_t;
#endif
#endif
+/*! @cond Doxygen_Suppress */
#ifdef _MSC_VER
# define FORCE_CDECL __cdecl
#else
# define FORCE_CDECL
#endif
+/*! @endcond */
+/*! @cond Doxygen_Suppress */
/* TODO : support for other compilers needed */
#if (defined(__GNUC__) && !defined(__NO_INLINE__)) || defined(_MSC_VER)
#define HAS_CPL_INLINE 1
@@ -315,7 +405,9 @@ typedef int GPtrDiff_t;
#else
#define CPL_INLINE
#endif
+/*! @endcond*/
+/*! @cond Doxygen_Suppress */
// Define NULL_AS_NULLPTR together with -std=c++11 -Wzero-as-null-pointer-constant with GCC
// to detect misuses of NULL
#if defined(NULL_AS_NULLPTR) && HAVE_CXX11
@@ -359,19 +451,23 @@ extern "C++" {
# define NULL 0
#endif
#endif /* defined(NULL_AS_NULLPTR) && HAVE_CXX11 */
-
+/*! @endcond */
#ifndef MAX
-# define MIN(a,b) ((ab) ? a : b)
+/** Macro to compute the minimum of 2 values */
+# define MIN(a,b) (((a)<(b)) ? (a) : (b))
+/** Macro to compute the maximum of 2 values */
+# define MAX(a,b) (((a)>(b)) ? (a) : (b))
#endif
#ifndef ABS
-# define ABS(x) ((x<0) ? (-1*(x)) : x)
+/** Macro to compute the absolute value */
+# define ABS(x) (((x)<0) ? (-1*(x)) : (x))
#endif
#ifndef M_PI
-# define M_PI 3.14159265358979323846
+/** PI definition */
+# define M_PI 3.14159265358979323846
/* 3.1415926535897932384626433832795 */
#endif
@@ -380,9 +476,11 @@ extern "C++" {
/* We use fabs() function instead of ABS() macro to avoid side */
/* effects. */
/* -------------------------------------------------------------------- */
+/*! @cond Doxygen_Suppress */
#ifndef CPLIsEqual
# define CPLIsEqual(x,y) (fabs((x) - (y)) < 0.0000000000001)
#endif
+/*! @endcond */
/* -------------------------------------------------------------------- */
/* Provide macros for case insensitive string comparisons. */
@@ -513,10 +611,14 @@ static inline char* CPL_afl_friendly_strstr(const char* haystack, const char* ne
# define STRCASECMP(a,b) (stricmp(a,b))
# define STRNCASECMP(a,b,n) (strnicmp(a,b,n))
# else
+/** Alias for strcasecmp() */
# define STRCASECMP(a,b) (strcasecmp(a,b))
+/** Alias for strncasecmp() */
# define STRNCASECMP(a,b,n) (strncasecmp(a,b,n))
# endif
+/** Alias for strncasecmp() == 0 */
# define EQUALN(a,b,n) (STRNCASECMP(a,b,n)==0)
+/** Alias for strcasecmp() == 0 */
# define EQUAL(a,b) (STRCASECMP(a,b)==0)
#endif
@@ -525,13 +627,17 @@ static inline char* CPL_afl_friendly_strstr(const char* haystack, const char* ne
* with CI, it is a case-insensitive comparison.
*--------------------------------------------------------------------- */
#ifndef STARTS_WITH_CI
+/** Returns whether a starts with b */
#define STARTS_WITH(a,b) (strncmp(a,b,strlen(b)) == 0)
+/** Returns whether a starts with b (case insensitive comparison) */
#define STARTS_WITH_CI(a,b) EQUALN(a,b,strlen(b))
#endif
+/*! @cond Doxygen_Suppress */
#ifndef CPL_THREADLOCAL
# define CPL_THREADLOCAL
#endif
+/*! @endcond */
/* -------------------------------------------------------------------- */
/* Handle isnan() and isinf(). Note that isinf() and isnan() */
@@ -547,10 +653,42 @@ static inline char* CPL_afl_friendly_strstr(const char* haystack, const char* ne
# define CPLIsNan(x) _isnan(x)
# define CPLIsInf(x) (!_isnan(x) && !_finite(x))
# define CPLIsFinite(x) _finite(x)
+#elif defined(__cplusplus) && defined(__MINGW32__) && __GNUC__ == 4 && __GNUC_MINOR__ == 2
+/* Hack for compatibility with ancient i586-mingw32msvc toolchain */
+extern "C++" {
+#include
+static inline int CPLIsNan(float f) { return std::isnan(f); }
+static inline int CPLIsNan(double f) { return std::isnan(f); }
+static inline int CPLIsInf(float f) { return std::isinf(f); }
+static inline int CPLIsInf(double f) { return std::isinf(f); }
+static inline int CPLIsFinite(float f) { return std::isfinite(f); }
+static inline int CPLIsFinite(double f) { return std::isfinite(f); }
+}
+#elif defined(__GNUC__) && ( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 4 ) )
+/* When including in C++11 the isnan() macro is undefined, so that */
+/* std::isnan() can work (#6489). This is a GCC specific workaround for now. */
+# define CPLIsNan(x) __builtin_isnan(x)
+# define CPLIsInf(x) __builtin_isinf(x)
+# define CPLIsFinite(x) __builtin_isfinite(x)
+#else
+/** Return whether a floating-pointer number is NaN */
+#if defined(__cplusplus) && defined(__GNUC__) && defined(__linux) && !defined(__ANDROID__)
+/* so to not get warning about conversion from double to float with */
+/* gcc -Wfloat-conversion when using isnan()/isinf() macros */
+extern "C++" {
+static inline int CPLIsNan(float f) { return __isnanf(f); }
+static inline int CPLIsNan(double f) { return __isnan(f); }
+static inline int CPLIsInf(float f) { return __isinff(f); }
+static inline int CPLIsInf(double f) { return __isinf(f); }
+static inline int CPLIsFinite(float f) { return !__isnanf(f) && !__isinff(f); }
+static inline int CPLIsFinite(double f) { return !__isnan(f) && !__isinf(f); }
+}
#else
# define CPLIsNan(x) isnan(x)
-# ifdef isinf
+# if defined(isinf) || defined(__FreeBSD__)
+/** Return whether a floating-pointer number is +/- infinty */
# define CPLIsInf(x) isinf(x)
+/** Return whether a floating-pointer number is finite */
# define CPLIsFinite(x) (!isnan(x) && !isinf(x))
# elif defined(__sun__)
# include
@@ -561,7 +699,9 @@ static inline char* CPL_afl_friendly_strstr(const char* haystack, const char* ne
# define CPLIsFinite(x) (!isnan(x))
# endif
#endif
+#endif
+/*! @cond Doxygen_Suppress */
/*---------------------------------------------------------------------
* CPL_LSB and CPL_MSB
* Only one of these 2 macros should be defined and specifies the byte
@@ -582,9 +722,11 @@ static inline char* CPL_afl_friendly_strstr(const char* haystack, const char* ne
#else
# define CPL_IS_LSB 0
#endif
+/*! @endcond */
#ifdef __cplusplus
+/*! @cond Doxygen_Suppress */
extern "C++" {
template struct CPLStaticAssert {};
@@ -603,16 +745,44 @@ template<> struct CPLStaticAssert
#define CPL_STATIC_ASSERT_IF_AVAILABLE(x)
#endif /* __cplusplus */
+/*! @endcond */
/*---------------------------------------------------------------------
* Little endian <==> big endian byte swap macros.
*--------------------------------------------------------------------*/
-#define CPL_SWAP16(x) \
- ((GUInt16)( \
- (((GUInt16)(x) & 0x00ffU) << 8) | \
- (((GUInt16)(x) & 0xff00U) >> 8) ))
+/** Byte-swap a 16bit unsigned integer */
+#define CPL_SWAP16(x) ((GUInt16)( ((GUInt16)(x) << 8) | ((GUInt16)(x) >> 8) ))
+#if defined(HAVE_GCC_BSWAP) && (defined(__i386__) || defined(__x86_64__))
+/* Could potentially be extended to other architectures but must be checked */
+/* that the intrinsic is indeed efficient */
+/* GCC (at least 4.6 or above) need that include */
+#include
+/** Byte-swap a 32bit unsigned integer */
+#define CPL_SWAP32(x) ((GUInt32)(__builtin_bswap32((GUInt32)(x))))
+/** Byte-swap a 64bit unsigned integer */
+#define CPL_SWAP64(x) ((GUInt64)(__builtin_bswap64((GUInt64)(x))))
+#elif defined(_MSC_VER)
+#define CPL_SWAP32(x) ((GUInt32)(_byteswap_ulong((GUInt32)(x))))
+#define CPL_SWAP64(x) ((GUInt64)(_byteswap_uint64((GUInt64)(x))))
+#else
+/** Byte-swap a 32bit unsigned integer */
+#define CPL_SWAP32(x) \
+ ((GUInt32)( \
+ (((GUInt32)(x) & (GUInt32)0x000000ffUL) << 24) | \
+ (((GUInt32)(x) & (GUInt32)0x0000ff00UL) << 8) | \
+ (((GUInt32)(x) & (GUInt32)0x00ff0000UL) >> 8) | \
+ (((GUInt32)(x) & (GUInt32)0xff000000UL) >> 24) ))
+
+/** Byte-swap a 64bit unsigned integer */
+#define CPL_SWAP64(x) \
+ (((GUInt64)(CPL_SWAP32((GUInt32)(x))) << 32) | \
+ (GUInt64)(CPL_SWAP32((GUInt32)((GUInt64)(x) >> 32))))
+
+#endif
+
+/** Byte-swap a 16 bit pointer */
#define CPL_SWAP16PTR(x) \
{ \
GByte byTemp, *_pabyDataT = (GByte *) (x); \
@@ -623,13 +793,9 @@ template<> struct CPLStaticAssert
_pabyDataT[1] = byTemp; \
}
-#define CPL_SWAP32(x) \
- ((GUInt32)( \
- (((GUInt32)(x) & (GUInt32)0x000000ffUL) << 24) | \
- (((GUInt32)(x) & (GUInt32)0x0000ff00UL) << 8) | \
- (((GUInt32)(x) & (GUInt32)0x00ff0000UL) >> 8) | \
- (((GUInt32)(x) & (GUInt32)0xff000000UL) >> 24) ))
+#if defined(MAKE_SANITIZE_HAPPY) || !(defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64))
+/** Byte-swap a 32 bit pointer */
#define CPL_SWAP32PTR(x) \
{ \
GByte byTemp, *_pabyDataT = (GByte *) (x); \
@@ -643,6 +809,7 @@ template<> struct CPLStaticAssert
_pabyDataT[2] = byTemp; \
}
+/** Byte-swap a 64 bit pointer */
#define CPL_SWAP64PTR(x) \
{ \
GByte byTemp, *_pabyDataT = (GByte *) (x); \
@@ -662,23 +829,33 @@ template<> struct CPLStaticAssert
_pabyDataT[4] = byTemp; \
}
+#else
-/* Until we have a safe 64 bits integer data type defined, we'll replace
- * this version of the CPL_SWAP64() macro with a less efficient one.
- */
-/*
-#define CPL_SWAP64(x) \
- ((uint64)( \
- (uint64)(((uint64)(x) & (uint64)0x00000000000000ffULL) << 56) | \
- (uint64)(((uint64)(x) & (uint64)0x000000000000ff00ULL) << 40) | \
- (uint64)(((uint64)(x) & (uint64)0x0000000000ff0000ULL) << 24) | \
- (uint64)(((uint64)(x) & (uint64)0x00000000ff000000ULL) << 8) | \
- (uint64)(((uint64)(x) & (uint64)0x000000ff00000000ULL) >> 8) | \
- (uint64)(((uint64)(x) & (uint64)0x0000ff0000000000ULL) >> 24) | \
- (uint64)(((uint64)(x) & (uint64)0x00ff000000000000ULL) >> 40) | \
- (uint64)(((uint64)(x) & (uint64)0xff00000000000000ULL) >> 56) ))
-*/
+/** Byte-swap a 32 bit pointer */
+#define CPL_SWAP32PTR(x) \
+{ \
+ GUInt32 _n32; \
+ void* _lx = x; \
+ memcpy(&_n32, _lx, 4); \
+ CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 4); \
+ _n32 = CPL_SWAP32(_n32); \
+ memcpy(_lx, &_n32, 4); \
+}
+/** Byte-swap a 64 bit pointer */
+#define CPL_SWAP64PTR(x) \
+{ \
+ GUInt64 _n64; \
+ void* _lx = x; \
+ memcpy(&_n64, _lx, 8); \
+ CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 8); \
+ _n64 = CPL_SWAP64(_n64); \
+ memcpy(_lx, &_n64, 8); \
+}
+
+#endif
+
+/** Byte-swap a 64 bit pointer */
#define CPL_SWAPDOUBLE(p) CPL_SWAP64PTR(p)
#ifdef CPL_MSB
@@ -693,22 +870,36 @@ template<> struct CPLStaticAssert
# define CPL_MSBPTR64(x) CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 8)
# define CPL_LSBPTR64(x) CPL_SWAP64PTR(x)
#else
+/** Return a 16bit word from a originally LSB ordered word */
# define CPL_LSBWORD16(x) (x)
+/** Return a 16bit word from a originally MSB ordered word */
# define CPL_MSBWORD16(x) CPL_SWAP16(x)
+/** Return a 32bit word from a originally LSB ordered word */
# define CPL_LSBWORD32(x) (x)
+/** Return a 32bit word from a originally MSB ordered word */
# define CPL_MSBWORD32(x) CPL_SWAP32(x)
+/** Byte-swap if necessary a 16bit word at the location pointed from a originally LSB ordered pointer */
# define CPL_LSBPTR16(x) CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 2)
+/** Byte-swap if necessary a 16bit word at the location pointed from a originally MSB ordered pointer */
# define CPL_MSBPTR16(x) CPL_SWAP16PTR(x)
+/** Byte-swap if necessary a 32bit word at the location pointed from a originally LSB ordered pointer */
# define CPL_LSBPTR32(x) CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 4)
+/** Byte-swap if necessary a 32bit word at the location pointed from a originally MSB ordered pointer */
# define CPL_MSBPTR32(x) CPL_SWAP32PTR(x)
+/** Byte-swap if necessary a 64bit word at the location pointed from a originally LSB ordered pointer */
# define CPL_LSBPTR64(x) CPL_STATIC_ASSERT_IF_AVAILABLE(sizeof(*(x)) == 1 || sizeof(*(x)) == 8)
+/** Byte-swap if necessary a 64bit word at the location pointed from a originally MSB ordered pointer */
# define CPL_MSBPTR64(x) CPL_SWAP64PTR(x)
#endif
-/** Return a Int16 from the 2 bytes ordered in LSB order at address x */
+/** Return a Int16 from the 2 bytes ordered in LSB order at address x.
+ * @deprecated Use rather CPL_LSBSINT16PTR or CPL_LSBUINT16PTR for explicit
+ * signedness. */
#define CPL_LSBINT16PTR(x) ((*(GByte*)(x)) | (*(((GByte*)(x))+1) << 8))
-/** Return a Int32 from the 4 bytes ordered in LSB order at address x */
+/** Return a Int32 from the 4 bytes ordered in LSB order at address x.
+ * @deprecated Use rather CPL_LSBSINT32PTR or CPL_LSBUINT32PTR for explicit
+ * signedness. */
#define CPL_LSBINT32PTR(x) ((*(GByte*)(x)) | (*(((GByte*)(x))+1) << 8) | \
(*(((GByte*)(x))+2) << 16) | (*(((GByte*)(x))+3) << 24))
@@ -724,7 +915,7 @@ template<> struct CPLStaticAssert
/** Return a unsigned Int32 from the 4 bytes ordered in LSB order at address x */
#define CPL_LSBUINT32PTR(x) ((GUInt32)CPL_LSBINT32PTR(x))
-
+/*! @cond Doxygen_Suppress */
/* Utility macro to explicitly mark intentionally unreferenced parameters. */
#ifndef UNREFERENCED_PARAM
# ifdef UNREFERENCED_PARAMETER /* May be defined by Windows API */
@@ -733,6 +924,7 @@ template<> struct CPLStaticAssert
# define UNREFERENCED_PARAM(param) ((void)param)
# endif /* UNREFERENCED_PARAMETER */
#endif /* UNREFERENCED_PARAM */
+/*! @endcond */
/***********************************************************************
* Define CPL_CVSID() macro. It can be disabled during a build by
@@ -742,6 +934,7 @@ template<> struct CPLStaticAssert
* being unused.
*/
+/*! @cond Doxygen_Suppress */
#ifndef DISABLE_CVSID
#if defined(__GNUC__) && __GNUC__ >= 4
# define CPL_CVSID(string) static const char cpl_cvsid[] __attribute__((used)) = string;
@@ -752,74 +945,142 @@ static const char *cvsid_aw() { return( cvsid_aw() ? NULL : cpl_cvsid ); }
#else
# define CPL_CVSID(string)
#endif
+/*! @endcond */
-/* Null terminated variadic */
/* We exclude mingw64 4.6 which seems to be broken regarding this */
#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(DOXYGEN_SKIP) && !(defined(__MINGW64__) && __GNUC__ == 4 && __GNUC_MINOR__ == 6)
+/** Null terminated variadic */
# define CPL_NULL_TERMINATED __attribute__((__sentinel__))
#else
+/** Null terminated variadic */
# define CPL_NULL_TERMINATED
#endif
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(DOXYGEN_SKIP)
+/** Tag a function to have printf() formatting */
#define CPL_PRINT_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__printf__, format_idx, arg_idx)))
+/** Tag a function to have scanf() formatting */
#define CPL_SCAN_FUNC_FORMAT( format_idx, arg_idx ) __attribute__((__format__ (__scanf__, format_idx, arg_idx)))
#else
+/** Tag a function to have printf() formatting */
#define CPL_PRINT_FUNC_FORMAT( format_idx, arg_idx )
+/** Tag a function to have scanf() formatting */
#define CPL_SCAN_FUNC_FORMAT( format_idx, arg_idx )
#endif
+#if defined(_MSC_VER) && _MSC_VER >= 1400 && (defined(GDAL_COMPILATION) || defined(CPL_ENABLE_MSVC_ANNOTATIONS))
+#include
+# if _MSC_VER > 1400
+/** Macro into which to wrap the format argument of a printf-like function.
+ * Only used if ANALYZE=1 is specified to nmake */
+# define CPL_FORMAT_STRING(arg) _Printf_format_string_ arg
+/** Macro into which to wrap the format argument of a sscanf-like function.
+ * Only used if ANALYZE=1 is specified to nmake */
+# define CPL_SCANF_FORMAT_STRING(arg) _Scanf_format_string_ arg
+# else
+/** Macro into which to wrap the format argument of a printf-like function */
+# define CPL_FORMAT_STRING(arg) __format_string arg
+/** Macro into which to wrap the format argument of a sscanf-like function. */
+# define CPL_SCANF_FORMAT_STRING(arg) arg
+# endif
+#else
+/** Macro into which to wrap the format argument of a printf-like function */
+# define CPL_FORMAT_STRING(arg) arg
+/** Macro into which to wrap the format argument of a sscanf-like function. */
+# define CPL_SCANF_FORMAT_STRING(arg) arg
+#endif /* defined(_MSC_VER) && _MSC_VER >= 1400 && defined(GDAL_COMPILATION) */
+
#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(DOXYGEN_SKIP)
+/** Qualifier to warn when the return value of a function is not used */
#define CPL_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
+/** Qualifier to warn when the return value of a function is not used */
#define CPL_WARN_UNUSED_RESULT
#endif
#if defined(__GNUC__) && __GNUC__ >= 4
+/** Qualifier for an argument that is unused */
# define CPL_UNUSED __attribute((__unused__))
#else
/* TODO: add cases for other compilers */
+/** Qualifier for an argument that is unused */
# define CPL_UNUSED
#endif
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(DOXYGEN_SKIP)
+/** Qualifier for a function that does not return at all (terminates the process) */
#define CPL_NO_RETURN __attribute__((noreturn))
#else
+/** Qualifier for a function that does not return at all (terminates the process) */
#define CPL_NO_RETURN
#endif
+/*! @cond Doxygen_Suppress */
/* Clang __has_attribute */
#ifndef __has_attribute
#define __has_attribute(x) 0 // Compatibility with non-clang compilers.
#endif
-#if ((defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))) || __has_attribute(returns_nonnull)) && !defined(DOXYGEN_SKIP)
+/*! @endcond */
+
+#if ((defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))) || __has_attribute(returns_nonnull)) && !defined(DOXYGEN_SKIP) && !defined(__INTEL_COMPILER)
+/** Qualifier for a function that does not return NULL */
# define CPL_RETURNS_NONNULL __attribute__((returns_nonnull))
#else
+/** Qualifier for a function that does not return NULL */
# define CPL_RETURNS_NONNULL
#endif
-
#if defined(__GNUC__) && __GNUC__ >= 4 && !defined(DOXYGEN_SKIP)
+/** restrict keyword to declare that pointers do not alias */
#define CPL_RESTRICT __restrict__
#else
+/** restrict keyword to declare that pointers do not alias */
#define CPL_RESTRICT
#endif
-/* Helper to remove the copy and assignment constructors so that the compiler
+#ifdef __cplusplus
+
+#if HAVE_CXX11 || _MSC_VER >= 1500
+
+/** To be used in public headers only. For non-public headers or .cpp files,
+ * use override directly. */
+# define CPL_OVERRIDE override
+
+#else
+
+/** To be used in public headers only. For non-public headers or .cpp files,
+ * use override directly. */
+# define CPL_OVERRIDE
+
+/* For GDAL source compilation only, ignore override if non C++11 compiler */
+#ifdef GDAL_COMPILATION
+# define override
+#endif
+
+#endif /* HAVE_CXX11 || _MSC_VER >= 1500 */
+
+#if HAVE_CXX11
+/** C++11 final qualifier */
+# define CPL_FINAL final
+
+/** Helper to remove the copy and assignment constructors so that the compiler
will not generate the default versions.
Must be placed in the private section of a class and should be at the end.
*/
-#ifdef __cplusplus
-
-#if HAVE_CXX11
-# define CPL_FINAL final
# define CPL_DISALLOW_COPY_ASSIGN(ClassName) \
ClassName( const ClassName & ) = delete; \
ClassName &operator=( const ClassName & ) = delete;
#else
+/** C++11 final qualifier */
# define CPL_FINAL
+
+/** Helper to remove the copy and assignment constructors so that the compiler
+ will not generate the default versions.
+
+ Must be placed in the private section of a class and should be at the end.
+*/
# define CPL_DISALLOW_COPY_ASSIGN(ClassName) \
ClassName( const ClassName & ); \
ClassName &operator=( const ClassName & );
@@ -842,28 +1103,33 @@ static const char *cvsid_aw() { return( cvsid_aw() ? NULL : cpl_cvsid ); }
#endif
#endif
-#if !defined(_MSC_VER) && !defined(__APPLE__)
+#if !defined(_MSC_VER) && !defined(__APPLE__) && !defined(_FORTIFY_SOURCE)
CPL_C_START
-#ifdef WARN_STANDARD_PRINTF
-int vsnprintf(char *str, size_t size, const char* fmt, va_list args) CPL_WARN_DEPRECATED("Use CPLvsnprintf() instead");
-int snprintf(char *str, size_t size, const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(3,4) CPL_WARN_DEPRECATED("Use CPLsnprintf() instead");
-int sprintf(char *str, const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(2, 3) CPL_WARN_DEPRECATED("Use CPLsnprintf() instead");
-#elif defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
-int sprintf(char *str, const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(2, 3) CPL_WARN_DEPRECATED("Use snprintf() or CPLsnprintf() instead");
-#endif
+# if defined(GDAL_COMPILATION) && defined(WARN_STANDARD_PRINTF)
+int vsnprintf(char *str, size_t size, const char* fmt, va_list args)
+ CPL_WARN_DEPRECATED("Use CPLvsnprintf() instead");
+int snprintf(char *str, size_t size, const char* fmt, ...)
+ CPL_PRINT_FUNC_FORMAT(3,4)
+ CPL_WARN_DEPRECATED("Use CPLsnprintf() instead");
+int sprintf(char *str, const char* fmt, ...)
+ CPL_PRINT_FUNC_FORMAT(2, 3)
+ CPL_WARN_DEPRECATED("Use CPLsnprintf() instead");
+# elif defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
+int sprintf(char *str, const char* fmt, ...)
+ CPL_PRINT_FUNC_FORMAT(2, 3)
+ CPL_WARN_DEPRECATED("Use snprintf() or CPLsnprintf() instead");
+# endif /* defined(GDAL_COMPILATION) && defined(WARN_STANDARD_PRINTF) */
CPL_C_END
#endif /* !defined(_MSC_VER) && !defined(__APPLE__) */
#if defined(MAKE_SANITIZE_HAPPY) || !(defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64))
+/*! @cond Doxygen_Suppress */
#define CPL_CPU_REQUIRES_ALIGNED_ACCESS
-#define CPL_IS_DOUBLE_A_INT(d) ( (d) >= INT_MIN && (d) <= INT_MAX && (double)(int)(d) == (d) )
-#else
-/* This is technically unspecified behaviour if the double is out of range, but works OK on x86 */
-#define CPL_IS_DOUBLE_A_INT(d) ( (double)(int)(d) == (d) )
+/*! @endcond */
#endif
#ifdef __cplusplus
-/* The size of C style arrays. */
+/** Returns the size of C style arrays. */
#define CPL_ARRAYSIZE(array) \
((sizeof(array) / sizeof(*(array))) / \
static_cast(!(sizeof(array) % sizeof(*(array)))))
@@ -883,12 +1149,15 @@ inline static bool CPL_TO_BOOL(int x) { return x != 0; }
#define HAVE_GCC_SYSTEM_HEADER
#endif
-#if defined(__clang__)
+#if ((defined(__clang__) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >=7))) || __GNUC__ >= 7) && HAVE_CXX11
+/** Macro for fallthrough in a switch case construct */
# define CPL_FALLTHROUGH [[clang::fallthrough]];
#else
+/** Macro for fallthrough in a switch case construct */
# define CPL_FALLTHROUGH
#endif
+/*! @cond Doxygen_Suppress */
// Define DEBUG_BOOL to compile in "MSVC mode", ie error out when
// a integer is assigned to a bool
// WARNING: use only at compilation time, since it is know to not work
@@ -970,5 +1239,6 @@ inline bool operator!= (const bool& one, const MSVCPedanticBool& other) { return
#define VOLATILE_BOOL volatile bool
#endif /* defined(__cplusplus) && defined(DEBUG_BOOL) */
+/*! @endcond */
#endif /* ndef CPL_BASE_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_progress.h b/modules/globebrowsing/ext/gdal/include/cpl_progress.h
index aa5fe523cc..08b9a5e86f 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_progress.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_progress.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id$
+ * $Id: cpl_progress.h 34518 2016-07-02 21:01:34Z goatbar $
*
* Project: CPL - Common Portability Library
* Author: Frank Warmerdam, warmerdam@pobox.com
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_quad_tree.h b/modules/globebrowsing/ext/gdal/include/cpl_quad_tree.h
index c02831aaaf..08a374a7e5 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_quad_tree.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_quad_tree.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_quad_tree.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_quad_tree.h 34931 2016-08-05 17:13:05Z rouault $
*
* Project: CPL - Common Portability Library
* Purpose: Implementation of quadtree building and searching functions.
@@ -50,14 +50,22 @@ CPL_C_START
/* Types */
+/** Describe a rectangle */
typedef struct {
- double minx, miny, maxx, maxy;
+ double minx; /**< Minimum x */
+ double miny; /**< Minimum y */
+ double maxx; /**< Maximum x */
+ double maxy; /**< Maximum y */
} CPLRectObj;
+/** Opaque type for a quad tree */
typedef struct _CPLQuadTree CPLQuadTree;
+/** CPLQuadTreeGetBoundsFunc */
typedef void (*CPLQuadTreeGetBoundsFunc)(const void* hFeature, CPLRectObj* pBounds);
+/** CPLQuadTreeForeachFunc */
typedef int (*CPLQuadTreeForeachFunc)(void* pElt, void* pUserData);
+/** CPLQuadTreeDumpFeatureFunc */
typedef void (*CPLQuadTreeDumpFeatureFunc)(const void* hFeature, int nIndentLevel, void* pUserData);
/* Functions */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_sha1.h b/modules/globebrowsing/ext/gdal/include/cpl_sha1.h
new file mode 100644
index 0000000000..7d3729fd8c
--- /dev/null
+++ b/modules/globebrowsing/ext/gdal/include/cpl_sha1.h
@@ -0,0 +1,53 @@
+/******************************************************************************
+ *
+ * Project: CPL - Common Portability Library
+ * Purpose: Implement SHA1
+ * Author: Even Rouault, even.rouault at spatialys.com
+ *
+ * SHA1 computation coming from Public Domain code at:
+ * https://github.com/B-Con/crypto-algorithms/blob/master/sha1.c
+ * by Brad Conte (brad AT bradconte.com)
+ *
+ ******************************************************************************
+ * Copyright (c) 2017, Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#ifndef CPL_SHA1_INCLUDED_H
+#define CPL_SHA1_INCLUDED_H
+
+#ifndef DOXYGEN_SKIP
+
+#include "cpl_port.h"
+
+#define CPL_SHA1_HASH_SIZE 20 // SHA1 outputs a 20 byte digest
+
+CPL_C_START
+
+/* Not CPL_DLL exported */
+void CPL_HMAC_SHA1(const void *pKey, size_t nKeyLen,
+ const void *pabyMessage, size_t nMessageLen,
+ GByte abyDigest[CPL_SHA1_HASH_SIZE]);
+
+CPL_C_END
+
+#endif /* #ifndef DOXYGEN_SKIP */
+
+#endif /* CPL_SHA1_INCLUDED_H */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_sha256.h b/modules/globebrowsing/ext/gdal/include/cpl_sha256.h
index 0868cf905c..60660734bd 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_sha256.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_sha256.h
@@ -1,4 +1,4 @@
-/* $Id: cpl_sha256.h 31777 2015-11-26 14:14:41Z rouault $ */
+/* $Id: cpl_sha256.h 34921 2016-08-04 22:26:31Z rouault $ */
/* The MIT License
@@ -29,6 +29,8 @@
#ifndef CPL_SHA256_INCLUDED_H
#define CPL_SHA256_INCLUDED_H
+#ifndef DOXYGEN_SKIP
+
#include "cpl_port.h"
#define CPL_SHA256_HASH_SIZE 32 /* 256 bit */
@@ -65,4 +67,6 @@ void CPL_DLL CPL_HMAC_SHA256(const void *pKey, size_t nKeyLen,
CPL_C_END
+#endif /* #ifndef DOXYGEN_SKIP */
+
#endif /* CPL_SHA256_INCLUDED_H */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_string.h b/modules/globebrowsing/ext/gdal/include/cpl_string.h
index c57b4679c6..46383c2d59 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_string.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_string.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_string.h 33788 2016-03-26 00:45:58Z goatbar $
+ * $Id: cpl_string.h 38064 2017-04-19 08:58:09Z rouault $
*
* Name: cpl_string.h
* Project: CPL - Common Portability Library
@@ -83,17 +83,30 @@ char CPL_DLL **CSLTokenizeString2( const char *pszString,
const char *pszDelimiter,
int nCSLTFlags ) CPL_WARN_UNUSED_RESULT;
+/** Flag for CSLTokenizeString2() to honour strings */
#define CSLT_HONOURSTRINGS 0x0001
+/** Flag for CSLTokenizeString2() to allow empty tokens */
#define CSLT_ALLOWEMPTYTOKENS 0x0002
+/** Flag for CSLTokenizeString2() to preserve quotes */
#define CSLT_PRESERVEQUOTES 0x0004
+/** Flag for CSLTokenizeString2() to preserve escape characters */
#define CSLT_PRESERVEESCAPES 0x0008
+/** Flag for CSLTokenizeString2() to strip leading spaces */
#define CSLT_STRIPLEADSPACES 0x0010
+/** Flag for CSLTokenizeString2() to strip trailaing spaces */
#define CSLT_STRIPENDSPACES 0x0020
int CPL_DLL CSLPrint(char **papszStrList, FILE *fpOut);
char CPL_DLL **CSLLoad(const char *pszFname) CPL_WARN_UNUSED_RESULT;
-char CPL_DLL **CSLLoad2(const char *pszFname, int nMaxLines, int nMaxCols,
- char** papszOptions) CPL_WARN_UNUSED_RESULT;
+#ifdef __cplusplus
+char CPL_DLL **CSLLoad2(
+ const char *pszFname, int nMaxLines, int nMaxCols,
+ const char * const * papszOptions) CPL_WARN_UNUSED_RESULT;
+#else
+char CPL_DLL **CSLLoad2(
+ const char *pszFname, int nMaxLines, int nMaxCols,
+ char **papszOptions) CPL_WARN_UNUSED_RESULT;
+#endif
int CPL_DLL CSLSave(char **papszStrList, const char *pszFname);
char CPL_DLL **CSLInsertStrings(char **papszStrList, int nInsertAtLineNo,
@@ -103,42 +116,69 @@ char CPL_DLL **CSLInsertString(char **papszStrList, int nInsertAtLineNo,
char CPL_DLL **CSLRemoveStrings(
char **papszStrList, int nFirstLineToDelete,
int nNumToRemove, char ***ppapszRetStrings) CPL_WARN_UNUSED_RESULT;
-int CPL_DLL CSLFindString( char **, const char * );
-int CPL_DLL CSLFindStringCaseSensitive( char **, const char * );
-int CPL_DLL CSLPartialFindString( char **papszHaystack,
- const char * pszNeedle );
+#ifdef __cplusplus
+int CPL_DLL CSLFindString( const char * const *papszList,
+ const char *pszTarget );
+int CPL_DLL CSLFindStringCaseSensitive( const char * const *papszList,
+ const char *pszTarget );
+int CPL_DLL CSLPartialFindString( const char * const *papszHaystack,
+ const char *pszNeedle );
+#else
+// Present non-const to C code that does not like passing non-const to const.
+// Should be ABI compatible with the const versions.
+int CPL_DLL CSLFindString( char **papszList, const char *pszTarget );
+int CPL_DLL CSLFindStringCaseSensitive( char * const *papszList,
+ const char *pszTarget );
+int CPL_DLL CSLPartialFindString( char * const *papszHaystack,
+ const char *pszNeedle );
+#endif
int CPL_DLL CSLFindName(char **papszStrList, const char *pszName);
int CPL_DLL CSLFetchBoolean( char **papszStrList, const char *pszKey,
int bDefault );
/* TODO: Deprecate CSLTestBoolean. Remove in GDAL 3.x. */
int CPL_DLL CSLTestBoolean( const char *pszValue );
+/* Do not use CPLTestBoolean in C++ code. Use CPLTestBool. */
int CPL_DLL CPLTestBoolean( const char *pszValue );
#ifdef __cplusplus
#ifdef DO_NOT_USE_DEBUG_BOOL
#define CPLTestBool(x) CPL_TO_BOOL(CPLTestBoolean(x))
-#else
+#define CPLFetchBool(list,key,default) \
+ CPL_TO_BOOL(CSLFetchBoolean(list,key,default))
+#else /* DO_NOT_USE_DEBUG_BOOL */
/* Prefer these for C++ code. */
#ifdef DEBUG_BOOL
extern "C++" {
#endif
bool CPL_DLL CPLTestBool( const char *pszValue );
+bool CPL_DLL CPLFetchBool( const char * const *papszStrList, const char *pszKey,
+ bool bDefault );
#ifdef DEBUG_BOOL
}
#endif
#endif
-bool CPL_DLL CPLFetchBool( const char **papszStrList, const char *pszKey,
- bool bDefault );
#endif /* __cplusplus */
const char CPL_DLL *
- CPLParseNameValue(const char *pszNameValue, char **ppszKey );
+ CPLParseNameValue( const char *pszNameValue, char **ppszKey );
+
+#ifdef __cplusplus
const char CPL_DLL *
- CSLFetchNameValue(char **papszStrList, const char *pszName);
+ CSLFetchNameValue( const char * const *papszStrList, const char *pszName);
const char CPL_DLL *
- CSLFetchNameValueDef(char **papszStrList, const char *pszName,
- const char *pszDefault );
+ CSLFetchNameValueDef( const char * const *papszStrList,
+ const char *pszName,
+ const char *pszDefault );
+#else
+const char CPL_DLL *
+ CSLFetchNameValue( char **papszStrList, const char *pszName);
+const char CPL_DLL *
+ CSLFetchNameValueDef( char **papszStrList,
+ const char *pszName,
+ const char *pszDefault );
+#endif
+
char CPL_DLL **
CSLFetchNameValueMultiple(char **papszStrList, const char *pszName);
char CPL_DLL **
@@ -154,11 +194,17 @@ void CPL_DLL CSLSetNameValueSeparator( char ** papszStrList,
char CPL_DLL ** CSLParseCommandLine(const char* pszCommandLine);
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for backlash quoting */
#define CPLES_BackslashQuotable 0
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for XML */
#define CPLES_XML 1
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for URL */
#define CPLES_URL 2
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for SQL */
#define CPLES_SQL 3
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for CSV */
#define CPLES_CSV 4
+/** Scheme for CPLEscapeString()/CPLUnescapeString() for XML (preserves quotes) */
#define CPLES_XML_BUT_QUOTES 5
char CPL_DLL *CPLEscapeString( const char *pszString, int nLength,
@@ -175,11 +221,12 @@ char CPL_DLL *CPLBase64Encode( int nBytes,
const GByte *pabyData ) CPL_WARN_UNUSED_RESULT;
int CPL_DLL CPLBase64DecodeInPlace( GByte* pszBase64 );
+/** Type of value */
typedef enum
{
- CPL_VALUE_STRING,
- CPL_VALUE_REAL,
- CPL_VALUE_INTEGER
+ CPL_VALUE_STRING, /**< String */
+ CPL_VALUE_REAL, /**< Real number */
+ CPL_VALUE_INTEGER /**< Integer */
} CPLValueType;
CPLValueType CPL_DLL CPLGetValueType(const char* pszValue);
@@ -191,42 +238,73 @@ size_t CPL_DLL CPLStrnlen(const char *pszStr, size_t nMaxLen);
/* -------------------------------------------------------------------- */
/* Locale independent formatting functions. */
/* -------------------------------------------------------------------- */
-int CPL_DLL CPLvsnprintf(char *str, size_t size, const char* fmt,
- va_list args) CPL_PRINT_FUNC_FORMAT (3, 0);
-int CPL_DLL CPLsnprintf(char *str, size_t size,
- const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(3,4);
-#if defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
-int CPL_DLL CPLsprintf(char *str, const char* fmt, ...)
- CPL_PRINT_FUNC_FORMAT(2, 3) CPL_WARN_DEPRECATED("Use CPLsnprintf instead");
+int CPL_DLL CPLvsnprintf( char *str, size_t size,
+ CPL_FORMAT_STRING(const char* fmt),
+ va_list args )
+ CPL_PRINT_FUNC_FORMAT(3, 0 );
+
+/* ALIAS_CPLSNPRINTF_AS_SNPRINTF might be defined to enable GCC 7 */
+/* -Wformat-truncation= warnings, but shouldn't be set for normal use */
+#if defined(ALIAS_CPLSNPRINTF_AS_SNPRINTF)
+#define CPLsnprintf snprintf
#else
-int CPL_DLL CPLsprintf(char *str, const char* fmt, ...)
+int CPL_DLL CPLsnprintf( char *str, size_t size,
+ CPL_FORMAT_STRING(const char* fmt), ... )
+ CPL_PRINT_FUNC_FORMAT(3, 4);
+#endif
+
+/*! @cond Doxygen_Suppress */
+#if defined(GDAL_COMPILATION) && !defined(DONT_DEPRECATE_SPRINTF)
+int CPL_DLL CPLsprintf( char *str, CPL_FORMAT_STRING(const char* fmt), ... )
+ CPL_PRINT_FUNC_FORMAT(2, 3)
+ CPL_WARN_DEPRECATED("Use CPLsnprintf instead");
+#else
+int CPL_DLL CPLsprintf( char *str, CPL_FORMAT_STRING(const char* fmt), ... )
CPL_PRINT_FUNC_FORMAT(2, 3);
#endif
-int CPL_DLL CPLprintf(const char* fmt, ...) CPL_PRINT_FUNC_FORMAT(1, 2);
-/* caution: only works with limited number of formats */
-int CPL_DLL CPLsscanf(const char* str, const char* fmt, ...)
- CPL_SCAN_FUNC_FORMAT(2, 3);
+/*! @endcond */
+int CPL_DLL CPLprintf( CPL_FORMAT_STRING(const char* fmt), ... )
+ CPL_PRINT_FUNC_FORMAT(1, 2);
-const char CPL_DLL *CPLSPrintf(const char *fmt, ...)
+/* For some reason Doxygen_Suppress is needed to avoid warning. Not sure why */
+/*! @cond Doxygen_Suppress */
+/* caution: only works with limited number of formats */
+int CPL_DLL CPLsscanf( const char* str,
+ CPL_SCANF_FORMAT_STRING(const char* fmt), ... )
+ CPL_SCAN_FUNC_FORMAT(2, 3);
+/*! @endcond */
+
+const char CPL_DLL *CPLSPrintf( CPL_FORMAT_STRING(const char *fmt), ... )
CPL_PRINT_FUNC_FORMAT(1, 2) CPL_WARN_UNUSED_RESULT;
-char CPL_DLL **CSLAppendPrintf(char **papszStrList, const char *fmt, ...)
+char CPL_DLL **CSLAppendPrintf( char **papszStrList,
+ CPL_FORMAT_STRING(const char *fmt), ... )
CPL_PRINT_FUNC_FORMAT(2, 3) CPL_WARN_UNUSED_RESULT;
-int CPL_DLL CPLVASPrintf(char **buf, const char *fmt, va_list args )
+int CPL_DLL CPLVASPrintf( char **buf,
+ CPL_FORMAT_STRING(const char *fmt), va_list args )
CPL_PRINT_FUNC_FORMAT(2, 0);
/* -------------------------------------------------------------------- */
/* RFC 23 character set conversion/recoding API (cpl_recode.cpp). */
/* -------------------------------------------------------------------- */
+/** Encoding of the current locale */
#define CPL_ENC_LOCALE ""
+/** UTF-8 encoding */
#define CPL_ENC_UTF8 "UTF-8"
+/** UTF-16 encoding */
#define CPL_ENC_UTF16 "UTF-16"
+/** UCS-2 encoding */
#define CPL_ENC_UCS2 "UCS-2"
+/** UCS-4 encoding */
#define CPL_ENC_UCS4 "UCS-4"
+/** ASCII encoding */
#define CPL_ENC_ASCII "ASCII"
+/** ISO-8859-1 (LATIN1) encoding */
#define CPL_ENC_ISO8859_1 "ISO-8859-1"
int CPL_DLL CPLEncodingCharSize( const char *pszEncoding );
+/*! @cond Doxygen_Suppress */
void CPL_DLL CPLClearRecodeWarningFlags( void );
+/*! @endcond */
char CPL_DLL *CPLRecode(
const char *pszSource, const char *pszSrcEncoding,
const char *pszDstEncoding ) CPL_WARN_UNUSED_RESULT CPL_RETURNS_NONNULL;
@@ -236,11 +314,11 @@ char CPL_DLL *CPLRecodeFromWChar(
wchar_t CPL_DLL *CPLRecodeToWChar(
const char *pszSource, const char *pszSrcEncoding,
const char *pszDstEncoding ) CPL_WARN_UNUSED_RESULT;
-int CPL_DLL CPLIsUTF8(const char* pabyData, int nLen);
+int CPL_DLL CPLIsUTF8( const char* pabyData, int nLen );
char CPL_DLL *CPLForceToASCII(
const char* pabyData, int nLen,
- char chReplacementChar) CPL_WARN_UNUSED_RESULT;
-int CPL_DLL CPLStrlenUTF8(const char *pszUTF8Str);
+ char chReplacementChar ) CPL_WARN_UNUSED_RESULT;
+int CPL_DLL CPLStrlenUTF8( const char *pszUTF8Str );
CPL_C_END
@@ -250,72 +328,72 @@ CPL_C_END
#if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
+extern "C++"
+{
+#ifndef DOXYGEN_SKIP
#include
-
-/*
- * Simple trick to avoid "using" declaration in header for new compilers
- * but make it still working with old compilers which throw C2614 errors.
- *
- * Define MSVC_OLD_STUPID_BEHAVIOUR
- * for old compilers: VC++ 5 and 6 as well as eVC++ 3 and 4.
- */
-
-/*
- * Detect old MSVC++ compiler <= 6.0
- * 1200 - VC++ 6.0
- * 1200-1202 - eVC++ 4.0
- */
-#if defined(_MSC_VER)
-# if (_MSC_VER <= 1202)
-# define MSVC_OLD_STUPID_BEHAVIOUR
-# endif
-#endif
-
-/* Avoid C2614 errors */
-#ifdef MSVC_OLD_STUPID_BEHAVIOUR
- using std::string;
-# define gdal_std_string string
-#else
-# define gdal_std_string std::string
#endif
//! Convenient string class based on std::string.
-class CPL_DLL CPLString : public gdal_std_string
+class CPL_DLL CPLString : public std::string
{
public:
+ /** Constructor */
CPLString(void) {}
- CPLString( const std::string &oStr ) : gdal_std_string( oStr ) {}
- CPLString( const char *pszStr ) : gdal_std_string( pszStr ) {}
+ /** Constructor */
+ // cppcheck-suppress noExplicitConstructor
+ CPLString( const std::string &oStr ) : std::string( oStr ) {}
+ /** Constructor */
+ // cppcheck-suppress noExplicitConstructor
+ CPLString( const char *pszStr ) : std::string( pszStr ) {}
+ /** Constructor */
+ CPLString( const char *pszStr, size_t n ) : std::string( pszStr, n ) {}
+ /** Return string as zero terminated character array */
operator const char* (void) const { return c_str(); }
+ /** Return character at specified index */
char& operator[](std::string::size_type i)
{
- return gdal_std_string::operator[](i);
+ return std::string::operator[](i);
}
+ /** Return character at specified index */
const char& operator[](std::string::size_type i) const
{
- return gdal_std_string::operator[](i);
+ return std::string::operator[](i);
}
+ /** Return character at specified index */
char& operator[](int i)
{
- return gdal_std_string::operator[](
+ return std::string::operator[](
static_cast(i));
}
+ /** Return character at specified index */
const char& operator[](int i) const
{
- return gdal_std_string::operator[](
+ return std::string::operator[](
static_cast(i));
}
+ // Note: This is standard in C++11.
+#ifndef HAVE_CXX11
+ /** Return last character (undefined behaviour if string is empty) */
+ const char& back() const { return operator[](size()-1); }
+ /** Return last character (undefined behaviour if string is empty) */
+ char& back() { return operator[](size()-1); }
+#endif
+
+ /** Clear the string */
void Clear() { resize(0); }
- // NULL safe assign and free.
- void Seize(char *pszValue)
+ /** Assign specified string and take ownership of it (assumed to be
+ * allocated with CPLMalloc()). NULL can be safely passed to clear the
+ * string. */
+ void Seize( char *pszValue )
{
if (pszValue == NULL )
Clear();
@@ -329,12 +407,19 @@ public:
/* There seems to be a bug in the way the compiler count indices...
* Should be CPL_PRINT_FUNC_FORMAT (1, 2) */
CPLString &Printf(
- const char *pszFormat, ... ) CPL_PRINT_FUNC_FORMAT (2, 3);
+ CPL_FORMAT_STRING(const char *pszFormat), ... )
+ CPL_PRINT_FUNC_FORMAT (2, 3);
CPLString &vPrintf(
- const char *pszFormat, va_list args ) CPL_PRINT_FUNC_FORMAT(2, 0);
+ CPL_FORMAT_STRING(const char *pszFormat), va_list args )
+ CPL_PRINT_FUNC_FORMAT(2, 0);
CPLString &FormatC( double dfValue, const char *pszFormat = NULL );
CPLString &Trim();
CPLString &Recode( const char *pszSrcEncoding, const char *pszDstEncoding );
+ CPLString &replaceAll(
+ const std::string &osBefore, const std::string& osAfter );
+ CPLString &replaceAll( const std::string &osBefore, char chAfter );
+ CPLString &replaceAll( char chBefore, const std::string &osAfter );
+ CPLString &replaceAll( char chBefore, char chAfter );
/* case insensitive find alternates */
size_t ifind( const std::string & str, size_t pos = 0 ) const;
@@ -343,9 +428,11 @@ public:
CPLString &tolower( void );
};
-CPLString CPLOPrintf(const char *pszFormat, ... ) CPL_PRINT_FUNC_FORMAT (1, 2);
-CPLString CPLOvPrintf(
- const char *pszFormat, va_list args) CPL_PRINT_FUNC_FORMAT (1, 0);
+CPLString CPL_DLL CPLOPrintf(CPL_FORMAT_STRING(const char *pszFormat), ... )
+ CPL_PRINT_FUNC_FORMAT (1, 2);
+CPLString CPL_DLL CPLOvPrintf(
+ CPL_FORMAT_STRING(const char *pszFormat), va_list args)
+ CPL_PRINT_FUNC_FORMAT (1, 0);
/* -------------------------------------------------------------------- */
/* URL processing functions, here since they depend on CPLString. */
@@ -380,9 +467,13 @@ class CPL_DLL CPLStringList
CPLStringList &Clear();
+ /** Return size of list */
int size() const { return Count(); }
int Count() const;
+ /** Return whether the list is empty. */
+ bool empty() const { return Count() == 0; }
+
CPLStringList &AddString( const char *pszNewString );
CPLStringList &AddStringDirectly( char *pszNewString );
@@ -393,8 +484,10 @@ class CPL_DLL CPLStringList
// CPLStringList &InsertStrings( int nInsertAtLineNo, char **papszNewLines );
// CPLStringList &RemoveStrings( int nFirstLineToDelete, int nNumToRemove=1 );
+ /** Return index of pszTarget in the list, or -1 */
int FindString( const char *pszTarget ) const
{ return CSLFindString( papszList, pszTarget ); }
+ /** Return index of pszTarget in the list (using partial search), or -1 */
int PartialFindString( const char *pszNeedle ) const
{ return CSLPartialFindString( papszList, pszNeedle ); }
@@ -409,25 +502,36 @@ class CPL_DLL CPLStringList
CPLStringList &SetNameValue( const char *pszKey, const char *pszValue );
CPLStringList &Assign( char **papszListIn, int bTakeOwnership=TRUE );
+ /** Assignment operator */
CPLStringList &operator=(char **papszListIn) {
return Assign( papszListIn, TRUE ); }
+ /** Assignment operator */
CPLStringList &operator=(const CPLStringList& oOther);
+ /** Return string at specified index */
char * operator[](int i);
+ /** Return string at specified index */
char * operator[](size_t i) { return (*this)[static_cast(i)]; }
+ /** Return string at specified index */
const char * operator[](int i) const;
+ /** Return string at specified index */
const char * operator[](size_t i) const {
return (*this)[static_cast(i)]; }
+ /** Return list. Ownership remains to the object */
char **List() { return papszList; }
char **StealList();
CPLStringList &Sort();
+ /** Returns whether the list is sorted */
int IsSorted() const { return bIsSorted; }
+ /** Return lists */
operator char**(void) { return List(); }
};
+} // extern "C++"
+
#endif /* def __cplusplus && !CPL_SUPRESS_CPLUSPLUS */
#endif /* CPL_STRING_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_time.h b/modules/globebrowsing/ext/gdal/include/cpl_time.h
index 7b57f4ab67..432b32f890 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_time.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_time.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_time.h 33783 2016-03-24 13:45:22Z goatbar $
+ * $Id: cpl_time.h 34518 2016-07-02 21:01:34Z goatbar $
*
* Name: cpl_time.h
* Project: CPL - Common Portability Library
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_virtualmem.h b/modules/globebrowsing/ext/gdal/include/cpl_virtualmem.h
index 271c5835f3..0aed5c76ea 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_virtualmem.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_virtualmem.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_virtualmem.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_virtualmem.h 36485 2016-11-24 07:54:20Z goatbar $
*
* Name: cpl_virtualmem.h
* Project: CPL - Common Portability Library
@@ -31,6 +31,8 @@
#ifndef CPL_VIRTUAL_MEM_INCLUDED
#define CPL_VIRTUAL_MEM_INCLUDED
+#include
+
#include "cpl_port.h"
#include "cpl_vsi.h"
@@ -110,7 +112,6 @@ typedef enum
VIRTUALMEM_READWRITE
} CPLVirtualMemAccessMode;
-
/** Return the size of a page of virtual memory.
*
* @return the page size.
@@ -173,7 +174,6 @@ CPLVirtualMem CPL_DLL *CPLVirtualMemNew(size_t nSize,
CPLVirtualMemFreeUserData pfnFreeUserData,
void *pCbkUserData);
-
/** Return if virtual memory mapping of a file is available.
*
* @return TRUE if virtual memory mapping of a file is available.
@@ -384,7 +384,6 @@ void CPL_DLL CPLVirtualMemPin(CPLVirtualMem* ctxt,
*/
void CPL_DLL CPLVirtualMemManagerTerminate(void);
-
CPL_C_END
#endif /* CPL_VIRTUAL_MEM_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_vsi.h b/modules/globebrowsing/ext/gdal/include/cpl_vsi.h
index 16768a21f8..94e5e647fa 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_vsi.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_vsi.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_vsi.h 33758 2016-03-21 09:06:22Z rouault $
+ * $Id: cpl_vsi.h 37640 2017-03-07 15:20:35Z rouault $
*
* Project: CPL - Common Portability Library
* Author: Frank Warmerdam, warmerdam@pobox.com
@@ -65,18 +65,21 @@
CPL_C_START
+/*! @cond Doxygen_Suppress */
#ifdef ENABLE_EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
#define EXPERIMENTAL_CPL_WARN_UNUSED_RESULT CPL_WARN_UNUSED_RESULT
#else
#define EXPERIMENTAL_CPL_WARN_UNUSED_RESULT
#endif
+/*! @endcond */
/* ==================================================================== */
-/* stdio file access functions. These may not support large */
-/* files, and don't necessarily go through the virtualization */
-/* API. */
+/* stdio file access functions. These do not support large */
+/* files, and do not go through the virtualization API. */
/* ==================================================================== */
+/*! @cond Doxygen_Suppress */
+
FILE CPL_DLL * VSIFOpen( const char *, const char * ) CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFClose( FILE * );
int CPL_DLL VSIFSeek( FILE *, long, int ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
@@ -88,19 +91,23 @@ size_t CPL_DLL VSIFRead( void *, size_t, size_t, FILE * ) EXPERIMENTAL_CPL_WARN
size_t CPL_DLL VSIFWrite( const void *, size_t, size_t, FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
char CPL_DLL *VSIFGets( char *, int, FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFPuts( const char *, FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
-int CPL_DLL VSIFPrintf( FILE *, const char *, ... ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT CPL_PRINT_FUNC_FORMAT(2, 3);
+int CPL_DLL VSIFPrintf( FILE *, CPL_FORMAT_STRING(const char *), ... ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT CPL_PRINT_FUNC_FORMAT(2, 3);
int CPL_DLL VSIFGetc( FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFPutc( int, FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIUngetc( int, FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFEof( FILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
+/*! @endcond */
+
/* ==================================================================== */
/* VSIStat() related. */
/* ==================================================================== */
+/*! @cond Doxygen_Suppress */
typedef struct stat VSIStatBuf;
int CPL_DLL VSIStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
+/*! @endcond */
#ifdef _WIN32
# define VSI_ISLNK(x) ( 0 ) /* N/A on Windows */
@@ -109,11 +116,16 @@ int CPL_DLL VSIStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
# define VSI_ISCHR(x) ((x) & S_IFCHR)
# define VSI_ISBLK(x) ( 0 ) /* N/A on Windows */
#else
+/** Test if the file is a symbolic link */
# define VSI_ISLNK(x) S_ISLNK(x)
+/** Test if the file is a regular file */
# define VSI_ISREG(x) S_ISREG(x)
+/** Test if the file is a directory */
# define VSI_ISDIR(x) S_ISDIR(x)
+/*! @cond Doxygen_Suppress */
# define VSI_ISCHR(x) S_ISCHR(x)
# define VSI_ISBLK(x) S_ISBLK(x)
+/*! @endcond */
#endif
/* ==================================================================== */
@@ -121,17 +133,24 @@ int CPL_DLL VSIStat( const char *, VSIStatBuf * ) CPL_WARN_UNUSED_RESULT;
/* defined, then provide prototypes for the large file API, */
/* otherwise redefine to use the regular api. */
/* ==================================================================== */
+
+/** Type for a file offset */
typedef GUIntBig vsi_l_offset;
+/** Maximum value for a file offset */
#define VSI_L_OFFSET_MAX GUINTBIG_MAX
+/*! @cond Doxygen_Suppress */
/* Make VSIL_STRICT_ENFORCE active in DEBUG builds */
#ifdef DEBUG
#define VSIL_STRICT_ENFORCE
#endif
+/*! @endcond */
#ifdef VSIL_STRICT_ENFORCE
+/** Opaque type for a FILE that implements the VSIVirtualHandle API */
typedef struct _VSILFILE VSILFILE;
#else
+/** Opaque type for a FILE that implements the VSIVirtualHandle API */
typedef FILE VSILFILE;
#endif
@@ -147,9 +166,19 @@ size_t CPL_DLL VSIFWriteL( const void *, size_t, size_t, VSILFILE * ) EXPERIMEN
int CPL_DLL VSIFEofL( VSILFILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFTruncateL( VSILFILE *, vsi_l_offset ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIFFlushL( VSILFILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
-int CPL_DLL VSIFPrintfL( VSILFILE *, const char *, ... ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT CPL_PRINT_FUNC_FORMAT(2, 3);
+int CPL_DLL VSIFPrintfL( VSILFILE *, CPL_FORMAT_STRING(const char *), ... ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT CPL_PRINT_FUNC_FORMAT(2, 3);
int CPL_DLL VSIFPutcL( int, VSILFILE * ) EXPERIMENTAL_CPL_WARN_UNUSED_RESULT;
+/** Range status */
+typedef enum
+{
+ VSI_RANGE_STATUS_UNKNOWN, /**< Unknown */
+ VSI_RANGE_STATUS_DATA, /**< Data present */
+ VSI_RANGE_STATUS_HOLE /**< Hole */
+} VSIRangeStatus;
+
+VSIRangeStatus CPL_DLL VSIFGetRangeStatusL( VSILFILE * fp, vsi_l_offset nStart, vsi_l_offset nLength );
+
int CPL_DLL VSIIngestFile( VSILFILE* fp,
const char* pszFilename,
GByte** ppabyRet,
@@ -157,22 +186,30 @@ int CPL_DLL VSIIngestFile( VSILFILE* fp,
GIntBig nMaxSize ) CPL_WARN_UNUSED_RESULT;
#if defined(VSI_STAT64_T)
+/** Type for VSIStatL() */
typedef struct VSI_STAT64_T VSIStatBufL;
#else
+/** Type for VSIStatL() */
#define VSIStatBufL VSIStatBuf
#endif
int CPL_DLL VSIStatL( const char *, VSIStatBufL * ) CPL_WARN_UNUSED_RESULT;
+/** Flag provided to VSIStatExL() to test if the file exists */
#define VSI_STAT_EXISTS_FLAG 0x1
+/** Flag provided to VSIStatExL() to query the nature (file/dir) of the file */
#define VSI_STAT_NATURE_FLAG 0x2
+/** Flag provided to VSIStatExL() to query the file size */
#define VSI_STAT_SIZE_FLAG 0x4
+/** Flag provided to VSIStatExL() to issue a VSIError in case of failure */
#define VSI_STAT_SET_ERROR_FLAG 0x8
int CPL_DLL VSIStatExL( const char * pszFilename, VSIStatBufL * psStatBuf, int nFlags ) CPL_WARN_UNUSED_RESULT;
int CPL_DLL VSIIsCaseSensitiveFS( const char * pszFilename );
+int CPL_DLL VSISupportsSparseFiles( const char* pszPath );
+
void CPL_DLL *VSIFGetNativeFileDescriptorL( VSILFILE* );
/* ==================================================================== */
@@ -185,6 +222,14 @@ void CPL_DLL VSIFree( void * );
void CPL_DLL *VSIRealloc( void *, size_t ) CPL_WARN_UNUSED_RESULT;
char CPL_DLL *VSIStrdup( const char * ) CPL_WARN_UNUSED_RESULT;
+void CPL_DLL *VSIMallocAligned( size_t nAlignment, size_t nSize ) CPL_WARN_UNUSED_RESULT;
+void CPL_DLL *VSIMallocAlignedAuto( size_t nSize ) CPL_WARN_UNUSED_RESULT;
+void CPL_DLL VSIFreeAligned( void* ptr );
+
+void CPL_DLL *VSIMallocAlignedAutoVerbose( size_t nSize, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSIMallocAlignedAutoVerbose() with FILE and LINE reporting */
+#define VSI_MALLOC_ALIGNED_AUTO_VERBOSE( size ) VSIMallocAlignedAutoVerbose(size,__FILE__,__LINE__)
+
/**
VSIMalloc2 allocates (nSize1 * nSize2) bytes.
In case of overflow of the multiplication, or if memory allocation fails, a
@@ -203,26 +248,36 @@ void CPL_DLL *VSIMalloc2( size_t nSize1, size_t nSize2 ) CPL_WARN_UNUSED_RESULT;
*/
void CPL_DLL *VSIMalloc3( size_t nSize1, size_t nSize2, size_t nSize3 ) CPL_WARN_UNUSED_RESULT;
-
+/** VSIMallocVerbose */
void CPL_DLL *VSIMallocVerbose( size_t nSize, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_MALLOC_VERBOSE */
#define VSI_MALLOC_VERBOSE( size ) VSIMallocVerbose(size,__FILE__,__LINE__)
+/** VSIMalloc2Verbose */
void CPL_DLL *VSIMalloc2Verbose( size_t nSize1, size_t nSize2, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_MALLOC2_VERBOSE */
#define VSI_MALLOC2_VERBOSE( nSize1, nSize2 ) VSIMalloc2Verbose(nSize1,nSize2,__FILE__,__LINE__)
+/** VSIMalloc3Verbose */
void CPL_DLL *VSIMalloc3Verbose( size_t nSize1, size_t nSize2, size_t nSize3, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_MALLOC3_VERBOSE */
#define VSI_MALLOC3_VERBOSE( nSize1, nSize2, nSize3 ) VSIMalloc3Verbose(nSize1,nSize2,nSize3,__FILE__,__LINE__)
+/** VSICallocVerbose */
void CPL_DLL *VSICallocVerbose( size_t nCount, size_t nSize, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_CALLOC_VERBOSE */
#define VSI_CALLOC_VERBOSE( nCount, nSize ) VSICallocVerbose(nCount,nSize,__FILE__,__LINE__)
+/** VSIReallocVerbose */
void CPL_DLL *VSIReallocVerbose( void* pOldPtr, size_t nNewSize, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_REALLOC_VERBOSE */
#define VSI_REALLOC_VERBOSE( pOldPtr, nNewSize ) VSIReallocVerbose(pOldPtr,nNewSize,__FILE__,__LINE__)
+/** VSIStrdupVerbose */
char CPL_DLL *VSIStrdupVerbose( const char* pszStr, const char* pszFile, int nLine ) CPL_WARN_UNUSED_RESULT;
+/** VSI_STRDUP_VERBOSE */
#define VSI_STRDUP_VERBOSE( pszStr ) VSIStrdupVerbose(pszStr,__FILE__,__LINE__)
-
GIntBig CPL_DLL CPLGetPhysicalRAM(void);
GIntBig CPL_DLL CPLGetUsablePhysicalRAM(void);
@@ -230,6 +285,7 @@ GIntBig CPL_DLL CPLGetUsablePhysicalRAM(void);
/* Other... */
/* ==================================================================== */
+/** Alias of VSIReadDir() */
#define CPLReadDir VSIReadDir
char CPL_DLL **VSIReadDir( const char * );
char CPL_DLL **VSIReadDirRecursive( const char *pszPath );
@@ -245,12 +301,16 @@ GIntBig CPL_DLL VSIGetDiskFreeSpace(const char *pszDirname);
/* Install special file access handlers. */
/* ==================================================================== */
void CPL_DLL VSIInstallMemFileHandler(void);
+/*! @cond Doxygen_Suppress */
void CPL_DLL VSIInstallLargeFileHandler(void);
+/*! @endcond */
void CPL_DLL VSIInstallSubFileHandler(void);
void VSIInstallCurlFileHandler(void);
void VSIInstallCurlStreamingFileHandler(void);
void VSIInstallS3FileHandler(void);
void VSIInstallS3StreamingFileHandler(void);
+void VSIInstallGSFileHandler(void);
+void VSIInstallGSStreamingFileHandler(void);
void VSIInstallGZipFileHandler(void); /* No reason to export that */
void VSIInstallZipFileHandler(void); /* No reason to export that */
void VSIInstallStdinHandler(void); /* No reason to export that */
@@ -259,7 +319,9 @@ void CPL_DLL VSIInstallSparseFileHandler(void);
void VSIInstallTarFileHandler(void); /* No reason to export that */
void CPL_DLL VSIInstallCryptFileHandler(void);
void CPL_DLL VSISetCryptKey(const GByte* pabyKey, int nKeySize);
+/*! @cond Doxygen_Suppress */
void CPL_DLL VSICleanupFileManager(void);
+/*! @endcond */
VSILFILE CPL_DLL *VSIFileFromMemBuffer( const char *pszFilename,
GByte *pabyData,
@@ -269,6 +331,7 @@ GByte CPL_DLL *VSIGetMemFileBuffer( const char *pszFilename,
vsi_l_offset *pnDataLength,
int bUnlinkAndSeize );
+/** Callback used by VSIStdoutSetRedirection() */
typedef size_t (*VSIWriteFunction)(const void* ptr, size_t size, size_t nmemb, FILE* stream);
void CPL_DLL VSIStdoutSetRedirection( VSIWriteFunction pFct, FILE* stream );
@@ -276,13 +339,16 @@ void CPL_DLL VSIStdoutSetRedirection( VSIWriteFunction pFct, FILE* stream );
/* Time querying. */
/* ==================================================================== */
+/*! @cond Doxygen_Suppress */
unsigned long CPL_DLL VSITime( unsigned long * );
const char CPL_DLL *VSICTime( unsigned long );
struct tm CPL_DLL *VSIGMTime( const time_t *pnTime,
struct tm *poBrokenTime );
struct tm CPL_DLL *VSILocalTime( const time_t *pnTime,
struct tm *poBrokenTime );
+/*! @endcond */
+/*! @cond Doxygen_Suppress */
/* -------------------------------------------------------------------- */
/* the following can be turned on for detailed logging of */
/* almost all IO calls. */
@@ -305,6 +371,7 @@ struct tm CPL_DLL *VSILocalTime( const time_t *pnTime,
#define VSIDebug2( f, a1, a2 ) {}
#define VSIDebug1( f, a1 ) {}
#endif
+/*! @endcond */
CPL_C_END
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_vsi_error.h b/modules/globebrowsing/ext/gdal/include/cpl_vsi_error.h
index 85f880f687..379d2f521e 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_vsi_error.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_vsi_error.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_vsi_error.h 33758 2016-03-21 09:06:22Z rouault $
+ * $Id: cpl_vsi_error.h 36769 2016-12-10 01:44:43Z goatbar $
*
* Project: VSI Virtual File System
* Purpose: Implement an error system for reporting file system errors.
@@ -54,13 +54,16 @@ typedef int VSIErrorNum;
#define VSIE_AWSInvalidCredentials 9
#define VSIE_AWSSignatureDoesNotMatch 10
-void CPL_DLL VSIError(VSIErrorNum err_no, const char *fmt, ...) CPL_PRINT_FUNC_FORMAT (2, 3);
+void CPL_DLL VSIError( VSIErrorNum err_no,
+ CPL_FORMAT_STRING(const char *fmt), ... )
+ CPL_PRINT_FUNC_FORMAT (2, 3);
void CPL_DLL CPL_STDCALL VSIErrorReset( void );
VSIErrorNum CPL_DLL CPL_STDCALL VSIGetLastErrorNo( void );
const char CPL_DLL * CPL_STDCALL VSIGetLastErrorMsg( void );
-int CPL_DLL CPL_STDCALL VSIToCPLError(CPLErr eErrClass, CPLErrorNum eDefaultErrorNo);
+int CPL_DLL CPL_STDCALL VSIToCPLError( CPLErr eErrClass,
+ CPLErrorNum eDefaultErrorNo );
CPL_C_END
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_vsi_virtual.h b/modules/globebrowsing/ext/gdal/include/cpl_vsi_virtual.h
index 66ccc6007a..79b91fe2b6 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_vsi_virtual.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_vsi_virtual.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_vsi_virtual.h 33759 2016-03-21 09:33:06Z rouault $
+ * $Id: cpl_vsi_virtual.h 36501 2016-11-25 14:09:24Z rouault $
*
* Project: VSI Virtual File System
* Purpose: Declarations for classes related to the virtual filesystem.
@@ -43,22 +43,35 @@
#include
#include
+// To avoid aliasing to GetDiskFreeSpace to GetDiskFreeSpaceA on Windows
+#ifdef GetDiskFreeSpace
+#undef GetDiskFreeSpace
+#endif
+
/************************************************************************/
/* VSIVirtualHandle */
/************************************************************************/
+/** Virtual file handle */
class CPL_DLL VSIVirtualHandle {
public:
virtual int Seek( vsi_l_offset nOffset, int nWhence ) = 0;
virtual vsi_l_offset Tell() = 0;
- virtual size_t Read( void *pBuffer, size_t nSize, size_t nMemb ) = 0;
- virtual int ReadMultiRange( int nRanges, void ** ppData, const vsi_l_offset* panOffsets, const size_t* panSizes );
- virtual size_t Write( const void *pBuffer, size_t nSize,size_t nMemb)=0;
+ virtual size_t Read( void *pBuffer, size_t nSize, size_t nCount ) = 0;
+ virtual int ReadMultiRange( int nRanges, void ** ppData,
+ const vsi_l_offset* panOffsets,
+ const size_t* panSizes );
+ virtual size_t Write( const void *pBuffer, size_t nSize,size_t nCount)=0;
virtual int Eof() = 0;
virtual int Flush() {return 0;}
virtual int Close() = 0;
- virtual int Truncate( CPL_UNUSED vsi_l_offset nNewSize ) { return -1; }
+ // Base implementation that only supports file extension.
+ virtual int Truncate( vsi_l_offset nNewSize );
virtual void *GetNativeFileDescriptor() { return NULL; }
+ virtual VSIRangeStatus GetRangeStatus( CPL_UNUSED vsi_l_offset nOffset,
+ CPL_UNUSED vsi_l_offset nLength )
+ { return VSI_RANGE_STATUS_UNKNOWN; }
+
virtual ~VSIVirtualHandle() { }
};
@@ -66,6 +79,7 @@ class CPL_DLL VSIVirtualHandle {
/* VSIFilesystemHandler */
/************************************************************************/
+#ifndef DOXYGEN_SKIP
class CPL_DLL VSIFilesystemHandler {
public:
@@ -94,12 +108,15 @@ public:
virtual int IsCaseSensitive( const char* pszFilename )
{ (void) pszFilename; return TRUE; }
virtual GIntBig GetDiskFreeSpace( const char* /* pszDirname */ ) { return -1; }
+ virtual int SupportsSparseFiles( const char* /* pszPath */ ) { return FALSE; }
};
+#endif /* #ifndef DOXYGEN_SKIP */
/************************************************************************/
/* VSIFileManager */
/************************************************************************/
+#ifndef DOXYGEN_SKIP
class CPL_DLL VSIFileManager
{
private:
@@ -119,7 +136,7 @@ public:
/* RemoveHandler is never defined. */
/* static void RemoveHandler( const std::string& osPrefix ); */
};
-
+#endif /* #ifndef DOXYGEN_SKIP */
/************************************************************************/
/* ==================================================================== */
@@ -127,6 +144,8 @@ public:
/* ==================================================================== */
/************************************************************************/
+#ifndef DOXYGEN_SKIP
+
class VSIArchiveEntryFileOffset
{
public:
@@ -185,12 +204,12 @@ public:
VSIArchiveFilesystemHandler();
virtual ~VSIArchiveFilesystemHandler();
- virtual int Stat( const char *pszFilename, VSIStatBufL *pStatBuf, int nFlags );
- virtual int Unlink( const char *pszFilename );
- virtual int Rename( const char *oldpath, const char *newpath );
- virtual int Mkdir( const char *pszDirname, long nMode );
- virtual int Rmdir( const char *pszDirname );
- virtual char **ReadDirEx( const char *pszDirname, int nMaxFiles );
+ virtual int Stat( const char *pszFilename, VSIStatBufL *pStatBuf, int nFlags ) CPL_OVERRIDE;
+ virtual int Unlink( const char *pszFilename ) CPL_OVERRIDE;
+ virtual int Rename( const char *oldpath, const char *newpath ) CPL_OVERRIDE;
+ virtual int Mkdir( const char *pszDirname, long nMode ) CPL_OVERRIDE;
+ virtual int Rmdir( const char *pszDirname ) CPL_OVERRIDE;
+ virtual char **ReadDirEx( const char *pszDirname, int nMaxFiles ) CPL_OVERRIDE;
virtual const VSIArchiveContent* GetContentOfArchive(const char* archiveFilename, VSIArchiveReader* poReader = NULL);
virtual char* SplitFilename(const char *pszFilename, CPLString &osFileInArchive, int bCheckMainFileExists);
@@ -198,11 +217,13 @@ public:
virtual int FindFileInArchive(const char* archiveFilename, const char* fileInArchiveName, const VSIArchiveEntry** archiveEntry);
};
+#endif /* #ifndef DOXYGEN_SKIP */
+
VSIVirtualHandle CPL_DLL *VSICreateBufferedReaderHandle(VSIVirtualHandle* poBaseHandle);
VSIVirtualHandle* VSICreateBufferedReaderHandle(VSIVirtualHandle* poBaseHandle,
const GByte* pabyBeginningContent,
vsi_l_offset nCheatFileSize);
-VSIVirtualHandle* VSICreateCachedFile( VSIVirtualHandle* poBaseHandle, size_t nChunkSize = 32768, size_t nCacheSize = 0 );
+VSIVirtualHandle CPL_DLL *VSICreateCachedFile( VSIVirtualHandle* poBaseHandle, size_t nChunkSize = 32768, size_t nCacheSize = 0 );
VSIVirtualHandle CPL_DLL *VSICreateGZipWritable( VSIVirtualHandle* poBaseHandle, int bRegularZLibIn, int bAutoCloseBaseHandle );
#endif /* ndef CPL_VSI_VIRTUAL_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_vsil_curl_priv.h b/modules/globebrowsing/ext/gdal/include/cpl_vsil_curl_priv.h
index 259dfac6d0..ba06e7853f 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_vsil_curl_priv.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_vsil_curl_priv.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cpl_vsil_curl_priv.h 31749 2015-11-25 02:32:55Z goatbar $
+ * $Id: cpl_vsil_curl_priv.h 36772 2016-12-10 06:29:22Z goatbar $
*
* Project: CPL - Common Portability Library
* Purpose: Private API for VSICurl
@@ -32,18 +32,22 @@
#include "cpl_vsi_virtual.h"
-/* NOTE: this is private API for GDAL internal use. May change without notice. */
-/* Used by the MBTiles driver for now */
+/* NOTE: this is private API for GDAL internal use. */
+/* May change without notice. */
+/* Used by the MBTiles driver for now. */
-/* Return TRUE to go on downloading, FALSE to stop */
-typedef int (*VSICurlReadCbkFunc) (VSILFILE* fp, void *pabyBuffer, size_t nBufferSize, void* pfnUserData);
+/* Return TRUE to go on downloading, FALSE to stop. */
+typedef int (*VSICurlReadCbkFunc) (VSILFILE* fp, void *pabyBuffer,
+ size_t nBufferSize, void* pfnUserData);
-/* fp must be a VSICurl file handle, otherwise bad things will happen ! */
-/* bStopOnInterrruptUntilUninstall must be set to TRUE if all downloads */
-/* must be canceled after a first one has been stopped by the callback function. */
-/* In that case, downloads will restart after uninstalling the callback. */
-int VSICurlInstallReadCbk(VSILFILE* fp, VSICurlReadCbkFunc pfnReadCbk, void* pfnUserData,
- int bStopOnInterrruptUntilUninstall);
-int VSICurlUninstallReadCbk(VSILFILE* fp);
+/* fp must be a VSICurl file handle, otherwise bad things will happen. */
+/* bStopOnInterruptUntilUninstall must be set to TRUE if all downloads */
+/* must be canceled after a first one has been stopped by the callback */
+/* function. In that case, downloads will restart after uninstalling the */
+/* callback. */
+int VSICurlInstallReadCbk( VSILFILE* fp, VSICurlReadCbkFunc pfnReadCbk,
+ void* pfnUserData,
+ int bStopOnInterruptUntilUninstall );
+int VSICurlUninstallReadCbk( VSILFILE* fp );
#endif // CPL_VSIL_CURL_PRIV_H_INCLUDED
diff --git a/modules/globebrowsing/ext/gdal/include/cpl_worker_thread_pool.h b/modules/globebrowsing/ext/gdal/include/cpl_worker_thread_pool.h
index d9a4331d13..9956b3e869 100644
--- a/modules/globebrowsing/ext/gdal/include/cpl_worker_thread_pool.h
+++ b/modules/globebrowsing/ext/gdal/include/cpl_worker_thread_pool.h
@@ -1,5 +1,5 @@
/**********************************************************************
- * $Id: cpl_worker_thread_pool.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cpl_worker_thread_pool.h 37003 2016-12-23 14:54:07Z goatbar $
*
* Project: CPL - Common Portability Library
* Purpose: CPL worker thread pool
@@ -41,6 +41,7 @@
* @since GDAL 2.1
*/
+#ifndef DOXYGEN_SKIP
class CPLWorkerThreadPool;
typedef struct
@@ -56,7 +57,7 @@ typedef struct
CPLWorkerThreadPool *poTP;
CPLJoinableThread *hThread;
int bMarkedAsWaiting;
- //CPLWorkerThreadJob *psNextJob;
+ // CPLWorkerThreadJob *psNextJob;
CPLMutex *hMutex;
CPLCond *hCond;
@@ -68,7 +69,9 @@ typedef enum
CPLWTS_STOP,
CPLWTS_ERROR
} CPLWorkerThreadState;
+#endif // ndef DOXYGEN_SKIP
+/** Pool of worker threads */
class CPL_DLL CPLWorkerThreadPool
{
std::vector aWT;
@@ -97,6 +100,7 @@ class CPL_DLL CPLWorkerThreadPool
bool SubmitJobs(CPLThreadFunc pfnFunc, const std::vector& apData);
void WaitCompletion(int nMaxRemainingJobs = 0);
+ /** Return the number of threads setup */
int GetThreadCount() const { return (int)aWT.size(); }
};
diff --git a/modules/globebrowsing/ext/gdal/include/cplkeywordparser.h b/modules/globebrowsing/ext/gdal/include/cplkeywordparser.h
index 70f0013d36..fb1ade9902 100644
--- a/modules/globebrowsing/ext/gdal/include/cplkeywordparser.h
+++ b/modules/globebrowsing/ext/gdal/include/cplkeywordparser.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: cplkeywordparser.h 33666 2016-03-07 05:21:07Z goatbar $
+ * $Id: cplkeywordparser.h 34931 2016-08-05 17:13:05Z rouault $
*
* Project: Common Portability Library
* Purpose: Implementation of CPLKeywordParser - a class for parsing
@@ -41,6 +41,8 @@
/* ==================================================================== */
/************************************************************************/
+/*! @cond Doxygen_Suppress */
+
class CPLKeywordParser
{
char **papszKeywordList;
@@ -63,4 +65,6 @@ public:
char **GetAllKeywords() { return papszKeywordList; }
};
+/*! @endcond */
+
#endif /* def CPL_KEYWORD_PARSER */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal.h b/modules/globebrowsing/ext/gdal/include/gdal.h
index 65395f6955..eed54376fc 100644
--- a/modules/globebrowsing/ext/gdal/include/gdal.h
+++ b/modules/globebrowsing/ext/gdal/include/gdal.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal.h 33852 2016-04-01 23:27:53Z goatbar $
+ * $Id: gdal.h 37723 2017-03-16 17:07:53Z rouault $
*
* Project: GDAL Core
* Purpose: GDAL Core C/Public declarations.
@@ -78,17 +78,18 @@ const char CPL_DLL * CPL_STDCALL GDALGetDataTypeName( GDALDataType );
GDALDataType CPL_DLL CPL_STDCALL GDALGetDataTypeByName( const char * );
GDALDataType CPL_DLL CPL_STDCALL GDALDataTypeUnion( GDALDataType, GDALDataType );
double CPL_DLL GDALAdjustValueToDataType( GDALDataType eDT, double dfValue, int* pbClamped, int* pbRounded );
+GDALDataType CPL_STDCALL GDALGetNonComplexDataType( GDALDataType );
/**
* status of the asynchronous stream
*/
typedef enum
{
- GARIO_PENDING = 0,
- GARIO_UPDATE = 1,
- GARIO_ERROR = 2,
- GARIO_COMPLETE = 3,
- GARIO_TypeCount = 4
+ GARIO_PENDING = 0,
+ GARIO_UPDATE = 1,
+ GARIO_ERROR = 2,
+ GARIO_COMPLETE = 3,
+ GARIO_TypeCount = 4
} GDALAsyncStatusType;
const char CPL_DLL * CPL_STDCALL GDALGetAsyncStatusTypeName( GDALAsyncStatusType );
@@ -157,7 +158,9 @@ typedef struct
double dfYSize;
} GDALRasterIOExtraArg;
+#ifndef DOXYGEN_SKIP
#define RASTERIO_EXTRA_ARG_CURRENT_VERSION 1
+#endif
/** Macro to initialize an instance of GDALRasterIOExtraArg structure.
* @since GDAL 2.0
@@ -208,8 +211,14 @@ const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
/* "well known" metadata items. */
+/** Metadata item for dataset that indicates the spatial interpreation of a
+ * pixel */
#define GDALMD_AREA_OR_POINT "AREA_OR_POINT"
+/** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents an
+ * area */
# define GDALMD_AOP_AREA "Area"
+/** Value for GDALMD_AREA_OR_POINT that indicates that a pixel represents a
+ * point */
# define GDALMD_AOP_POINT "Point"
/* -------------------------------------------------------------------- */
@@ -217,7 +226,9 @@ const char CPL_DLL *GDALGetPaletteInterpretationName( GDALPaletteInterp );
/* */
/* error codes 100 to 299 reserved for GDAL. */
/* -------------------------------------------------------------------- */
+#ifndef DOXYGEN_SKIP
#define CPLE_WrongFormat (CPLErrorNum)200
+#endif
/* -------------------------------------------------------------------- */
/* Define handle types related to various internal classes. */
@@ -346,11 +357,15 @@ GDALCreateCopy( GDALDriverH, const char *, GDALDatasetH,
GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriver( const char * pszFilename,
char ** papszFileList );
+
+GDALDriverH CPL_DLL CPL_STDCALL GDALIdentifyDriverEx(
+ const char *pszFilename, unsigned int nIdentifyFlags,
+ const char *const *papszAllowedDrivers, const char *const *papszFileList);
+
GDALDatasetH CPL_DLL CPL_STDCALL
GDALOpen( const char *pszFilename, GDALAccess eAccess ) CPL_WARN_UNUSED_RESULT;
GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_WARN_UNUSED_RESULT;
-
/* Note: we define GDAL_OF_READONLY and GDAL_OF_UPDATE to be on purpose */
/* equals to GA_ReadOnly and GA_Update */
@@ -384,7 +399,6 @@ GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_
*/
#define GDAL_OF_VECTOR 0x04
-
/** Allow gnm drivers to be used.
* Used by GDALOpenEx().
* @since GDAL 2.1
@@ -449,8 +463,14 @@ GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenShared( const char *, GDALAccess ) CPL_
*/
#define GDAL_OF_HASHSET_BLOCK_ACCESS 0x200
+#ifndef DOXYGEN_SKIP
+/* Reserved for a potential future alternative to GDAL_OF_ARRAY_BLOCK_ACCESS
+ * and GDAL_OF_HASHSET_BLOCK_ACCESS */
#define GDAL_OF_RESERVED_1 0x300
+
+/** Mask to detect the block access method */
#define GDAL_OF_BLOCK_ACCESS_MASK 0x300
+#endif
GDALDatasetH CPL_DLL CPL_STDCALL GDALOpenEx( const char* pszFilename,
unsigned int nOpenFlags,
@@ -467,7 +487,9 @@ void CPL_DLL CPL_STDCALL GDALDestroyDriver( GDALDriverH );
int CPL_DLL CPL_STDCALL GDALRegisterDriver( GDALDriverH );
void CPL_DLL CPL_STDCALL GDALDeregisterDriver( GDALDriverH );
void CPL_DLL CPL_STDCALL GDALDestroyDriverManager( void );
+#ifndef DOXYGEN_SKIP
void CPL_DLL GDALDestroy( void );
+#endif
CPLErr CPL_DLL CPL_STDCALL GDALDeleteDataset( GDALDriverH, const char * );
CPLErr CPL_DLL CPL_STDCALL GDALRenameDataset( GDALDriverH,
const char * pszNewName,
@@ -548,6 +570,7 @@ void CPL_DLL CPL_STDCALL GDALSetDescription( GDALMajorObjectH, const char * );
/* GDALDataset class ... normally this represents one file. */
/* ==================================================================== */
+/** Name of driver metadata item for layer creation option list */
#define GDAL_DS_LAYER_CREATIONOPTIONLIST "DS_LAYER_CREATIONOPTIONLIST"
GDALDriverH CPL_DLL CPL_STDCALL GDALGetDatasetDriver( GDALDatasetH );
@@ -606,6 +629,7 @@ CPLErr CPL_DLL CPL_STDCALL GDALSetGCPs( GDALDatasetH, int, const GDAL_GCP *,
void CPL_DLL * CPL_STDCALL GDALGetInternalHandle( GDALDatasetH, const char * );
int CPL_DLL CPL_STDCALL GDALReferenceDataset( GDALDatasetH );
int CPL_DLL CPL_STDCALL GDALDereferenceDataset( GDALDatasetH );
+int CPL_DLL CPL_STDCALL GDALReleaseDataset( GDALDatasetH );
CPLErr CPL_DLL CPL_STDCALL
GDALBuildOverviews( GDALDatasetH, const char *, int, int *,
@@ -622,7 +646,8 @@ CPLErr CPL_DLL CPL_STDCALL GDALDatasetCopyWholeRaster(
GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
CPLErr CPL_DLL CPL_STDCALL GDALRasterBandCopyWholeRaster(
- GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand, char **papszOptions,
+ GDALRasterBandH hSrcBand, GDALRasterBandH hDstBand,
+ const char * const * constpapszOptions,
GDALProgressFunc pfnProgress, void *pProgressData ) CPL_WARN_UNUSED_RESULT;
CPLErr CPL_DLL
@@ -640,6 +665,12 @@ OGRLayerH CPL_DLL GDALDatasetCreateLayer( GDALDatasetH, const char *,
char ** );
OGRLayerH CPL_DLL GDALDatasetCopyLayer( GDALDatasetH, OGRLayerH, const char *,
char ** );
+void CPL_DLL GDALDatasetResetReading( GDALDatasetH );
+OGRFeatureH CPL_DLL GDALDatasetGetNextFeature( GDALDatasetH hDS,
+ OGRLayerH* phBelongingLayer,
+ double* pdfProgressPct,
+ GDALProgressFunc pfnProgress,
+ void* pProgressData );
int CPL_DLL GDALDatasetTestCapability( GDALDatasetH, const char * );
OGRLayerH CPL_DLL GDALDatasetExecuteSQL( GDALDatasetH, const char *,
OGRGeometryH, const char * );
@@ -651,7 +682,6 @@ OGRErr CPL_DLL GDALDatasetStartTransaction(GDALDatasetH hDS, int bForce);
OGRErr CPL_DLL GDALDatasetCommitTransaction(GDALDatasetH hDS);
OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
-
/* ==================================================================== */
/* GDALRasterBand ... one band/channel in a dataset. */
/* ==================================================================== */
@@ -684,16 +714,22 @@ OGRErr CPL_DLL GDALDatasetRollbackTransaction(GDALDatasetH hDS);
(eSrcType == GDT_CFloat64 ? \
((double *)papoSource)[ii * 2] : 0)))))))))))
+/** Type of functions to pass to GDALAddDerivedBandPixelFunc.
+ * @since GDAL 2.2 */
typedef CPLErr
(*GDALDerivedPixelFunc)(void **papoSources, int nSources, void *pData,
- int nBufXSize, int nBufYSize,
- GDALDataType eSrcType, GDALDataType eBufType,
+ int nBufXSize, int nBufYSize,
+ GDALDataType eSrcType, GDALDataType eBufType,
int nPixelSpace, int nLineSpace);
GDALDataType CPL_DLL CPL_STDCALL GDALGetRasterDataType( GDALRasterBandH );
void CPL_DLL CPL_STDCALL
GDALGetBlockSize( GDALRasterBandH, int * pnXSize, int * pnYSize );
+CPLErr CPL_DLL CPL_STDCALL
+GDALGetActualBlockSize( GDALRasterBandH, int nXBlockOff, int nYBlockOff,
+ int *pnXValid, int *pnYValid );
+
CPLErr CPL_DLL CPL_STDCALL GDALRasterAdviseRead( GDALRasterBandH hRB,
int nDSXOff, int nDSYOff, int nDSXSize, int nDSYSize,
int nBXSize, int nBYSize, GDALDataType eBDataType, char **papszOptions );
@@ -815,11 +851,42 @@ int CPL_DLL CPL_STDCALL GDALGetMaskFlags( GDALRasterBandH hBand );
CPLErr CPL_DLL CPL_STDCALL
GDALCreateMaskBand( GDALRasterBandH hBand, int nFlags );
+/** Flag returned by GDALGetMaskFlags() to indicate that all pixels are valid */
#define GMF_ALL_VALID 0x01
+/** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
+ * valid for all bands */
#define GMF_PER_DATASET 0x02
+/** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
+ * an alpha band */
#define GMF_ALPHA 0x04
+/** Flag returned by GDALGetMaskFlags() to indicate that the mask band is
+ * computed from nodata values */
#define GMF_NODATA 0x08
+/** Flag returned by GDALGetDataCoverageStatus() when the driver does not
+ * implement GetDataCoverageStatus(). This flag should be returned together
+ * with GDAL_DATA_COVERAGE_STATUS_DATA */
+#define GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED 0x01
+
+/** Flag returned by GDALGetDataCoverageStatus() when there is (potentially)
+ * data in the queried window. Can be combined with the binary or operator
+ * with GDAL_DATA_COVERAGE_STATUS_UNIMPLEMENTED or
+ * GDAL_DATA_COVERAGE_STATUS_EMPTY */
+#define GDAL_DATA_COVERAGE_STATUS_DATA 0x02
+
+/** Flag returned by GDALGetDataCoverageStatus() when there is nodata in the
+ * queried window. This is typically identified by the concept of missing block
+ * in formats that supports it.
+ * Can be combined with the binary or operator with
+ * GDAL_DATA_COVERAGE_STATUS_DATA */
+#define GDAL_DATA_COVERAGE_STATUS_EMPTY 0x04
+
+int CPL_DLL CPL_STDCALL GDALGetDataCoverageStatus( GDALRasterBandH hBand,
+ int nXOff, int nYOff,
+ int nXSize, int nYSize,
+ int nMaskFlagStop,
+ double* pdfDataPct );
+
/* ==================================================================== */
/* GDALAsyncReader */
/* ==================================================================== */
@@ -843,8 +910,10 @@ void CPL_DLL CPL_STDCALL GDALSwapWordsEx( void *pData, int nWordSize, size_t nWo
int nWordSkip );
void CPL_DLL CPL_STDCALL
- GDALCopyWords( const void * pSrcData, GDALDataType eSrcType, int nSrcPixelOffset,
- void * pDstData, GDALDataType eDstType, int nDstPixelOffset,
+ GDALCopyWords( const void * CPL_RESTRICT pSrcData,
+ GDALDataType eSrcType, int nSrcPixelOffset,
+ void * CPL_RESTRICT pDstData,
+ GDALDataType eDstType, int nDstPixelOffset,
int nWordCount );
void CPL_DLL
@@ -873,7 +942,9 @@ double CPL_DLL CPL_STDCALL GDALDecToPackedDMS( double );
/* Note to developers : please keep this section in sync with ogr_core.h */
#ifndef GDAL_VERSION_INFO_DEFINED
+#ifndef DOXYGEN_SKIP
#define GDAL_VERSION_INFO_DEFINED
+#endif
const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
#endif
@@ -890,29 +961,31 @@ int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
#endif
-typedef struct {
- double dfLINE_OFF;
- double dfSAMP_OFF;
- double dfLAT_OFF;
- double dfLONG_OFF;
- double dfHEIGHT_OFF;
+/** Strucutre to store Rational Polynomial Coefficients / Rigorous Projection
+ * Model. See http://geotiff.maptools.org/rpc_prop.html */
+typedef struct
+{
+ double dfLINE_OFF; /*!< Line offset */
+ double dfSAMP_OFF; /*!< Sample/Pixel offset */
+ double dfLAT_OFF; /*!< Latitude offset */
+ double dfLONG_OFF; /*!< Longitude offset */
+ double dfHEIGHT_OFF; /*!< Height offset */
- double dfLINE_SCALE;
- double dfSAMP_SCALE;
- double dfLAT_SCALE;
- double dfLONG_SCALE;
- double dfHEIGHT_SCALE;
+ double dfLINE_SCALE; /*!< Line scale */
+ double dfSAMP_SCALE; /*!< Sample/Pixel scale */
+ double dfLAT_SCALE; /*!< Latitude scale */
+ double dfLONG_SCALE; /*!< Longitude scale */
+ double dfHEIGHT_SCALE; /*!< Height scale */
- double adfLINE_NUM_COEFF[20];
- double adfLINE_DEN_COEFF[20];
- double adfSAMP_NUM_COEFF[20];
- double adfSAMP_DEN_COEFF[20];
-
- double dfMIN_LONG;
- double dfMIN_LAT;
- double dfMAX_LONG;
- double dfMAX_LAT;
+ double adfLINE_NUM_COEFF[20]; /*!< Line Numerator Coefficients */
+ double adfLINE_DEN_COEFF[20]; /*!< Line Denominator Coefficients */
+ double adfSAMP_NUM_COEFF[20]; /*!< Sample/Pixel Numerator Coefficients */
+ double adfSAMP_DEN_COEFF[20]; /*!< Sample/Pixel Denominator Coefficients */
+ double dfMIN_LONG; /*!< Minimum longitude */
+ double dfMIN_LAT; /*!< Minimum latitude */
+ double dfMAX_LONG; /*!< Maximum longitude */
+ double dfMAX_LAT; /*!< Maximum latitude */
} GDALRPCInfo;
int CPL_DLL CPL_STDCALL GDALExtractRPCInfo( char **, GDALRPCInfo * );
@@ -950,12 +1023,12 @@ void CPL_DLL CPL_STDCALL GDALCreateColorRamp( GDALColorTableH hTable,
int nEndIndex, const GDALColorEntry *psEndColor );
/* ==================================================================== */
-/* Raster Attribute Table */
+/* Raster Attribute Table */
/* ==================================================================== */
/** Field type of raster attribute table */
typedef enum {
- /*! Integer field */ GFT_Integer,
+ /*! Integer field */ GFT_Integer,
/*! Floating point (double) field */ GFT_Real,
/*! String field */ GFT_String
} GDALRATFieldType;
@@ -1048,7 +1121,6 @@ void CPL_DLL* CPL_STDCALL
int CPL_DLL CPL_STDCALL GDALRATGetRowOfValue( GDALRasterAttributeTableH, double );
-
/* ==================================================================== */
/* GDAL Cache Management */
/* ==================================================================== */
@@ -1100,6 +1172,7 @@ CPLVirtualMem CPL_DLL* GDALGetVirtualMemAuto( GDALRasterBandH hBand,
GIntBig *pnLineSpace,
char **papszOptions ) CPL_WARN_UNUSED_RESULT;
+/**! Enumeration to describe the tile organization */
typedef enum
{
/*! Tile Interleaved by Pixel: tile (0,0) with internal band interleaved by pixel organization, tile (1, 0), ... */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_alg.h b/modules/globebrowsing/ext/gdal/include/gdal_alg.h
deleted file mode 100644
index 0235012bbd..0000000000
--- a/modules/globebrowsing/ext/gdal/include/gdal_alg.h
+++ /dev/null
@@ -1,603 +0,0 @@
-/******************************************************************************
- * $Id: gdal_alg.h 33715 2016-03-13 08:52:06Z goatbar $
- *
- * Project: GDAL Image Processing Algorithms
- * Purpose: Prototypes, and definitions for various GDAL based algorithms.
- * Author: Frank Warmerdam, warmerdam@pobox.com
- *
- ******************************************************************************
- * Copyright (c) 2001, Frank Warmerdam
- * Copyright (c) 2008-2012, Even Rouault
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ****************************************************************************/
-
-#ifndef GDAL_ALG_H_INCLUDED
-#define GDAL_ALG_H_INCLUDED
-
-/**
- * \file gdal_alg.h
- *
- * Public (C callable) GDAL algorithm entry points, and definitions.
- */
-
-#ifndef DOXYGEN_SKIP
-#include "gdal.h"
-#include "cpl_minixml.h"
-#include "ogr_api.h"
-#endif
-
-CPL_C_START
-
-int CPL_DLL CPL_STDCALL GDALComputeMedianCutPCT( GDALRasterBandH hRed,
- GDALRasterBandH hGreen,
- GDALRasterBandH hBlue,
- int (*pfnIncludePixel)(int,int,void*),
- int nColors,
- GDALColorTableH hColorTable,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-int CPL_DLL CPL_STDCALL GDALDitherRGB2PCT( GDALRasterBandH hRed,
- GDALRasterBandH hGreen,
- GDALRasterBandH hBlue,
- GDALRasterBandH hTarget,
- GDALColorTableH hColorTable,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-int CPL_DLL CPL_STDCALL GDALChecksumImage( GDALRasterBandH hBand,
- int nXOff, int nYOff, int nXSize, int nYSize );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALComputeProximity( GDALRasterBandH hSrcBand,
- GDALRasterBandH hProximityBand,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALFillNodata( GDALRasterBandH hTargetBand,
- GDALRasterBandH hMaskBand,
- double dfMaxSearchDist,
- int bDeprecatedOption,
- int nSmoothingIterations,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALPolygonize( GDALRasterBandH hSrcBand,
- GDALRasterBandH hMaskBand,
- OGRLayerH hOutLayer, int iPixValField,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALFPolygonize( GDALRasterBandH hSrcBand,
- GDALRasterBandH hMaskBand,
- OGRLayerH hOutLayer, int iPixValField,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALSieveFilter( GDALRasterBandH hSrcBand, GDALRasterBandH hMaskBand,
- GDALRasterBandH hDstBand,
- int nSizeThreshold, int nConnectedness,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-/*
- * Warp Related.
- */
-
-typedef int
-(*GDALTransformerFunc)( void *pTransformerArg,
- int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-#define GDAL_GTI2_SIGNATURE "GTI2"
-
-typedef struct {
- GByte abySignature[4];
- const char *pszClassName;
- GDALTransformerFunc pfnTransform;
- void (*pfnCleanup)( void * pTransformerArg );
- CPLXMLNode *(*pfnSerialize)( void * pTransformerArg );
- void* (*pfnCreateSimilar)( void* pTransformerArg, double dfSrcRatioX, double dfSrcRatioY );
-} GDALTransformerInfo;
-
-void CPL_DLL GDALDestroyTransformer( void *pTransformerArg );
-int CPL_DLL GDALUseTransformer( void *pTransformerArg,
- int bDstToSrc, int nPointCount,
- double *x, double *y, double *z,
- int *panSuccess );
-void* GDALCreateSimilarTransformer( void* psTransformerArg, double dfSrcRatioX, double dfSrcRatioY );
-
-
-/* High level transformer for going from image coordinates on one file
- to image coordinates on another, potentially doing reprojection,
- utilizing GCPs or using the geotransform. */
-
-void CPL_DLL *
-GDALCreateGenImgProjTransformer( GDALDatasetH hSrcDS, const char *pszSrcWKT,
- GDALDatasetH hDstDS, const char *pszDstWKT,
- int bGCPUseOK, double dfGCPErrorThreshold,
- int nOrder );
-void CPL_DLL *
-GDALCreateGenImgProjTransformer2( GDALDatasetH hSrcDS, GDALDatasetH hDstDS,
- char **papszOptions );
-void CPL_DLL *
-GDALCreateGenImgProjTransformer3( const char *pszSrcWKT,
- const double *padfSrcGeoTransform,
- const char *pszDstWKT,
- const double *padfDstGeoTransform );
-void CPL_DLL GDALSetGenImgProjTransformerDstGeoTransform( void *,
- const double * );
-void CPL_DLL GDALDestroyGenImgProjTransformer( void * );
-int CPL_DLL GDALGenImgProjTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-void GDALSetTransformerDstGeoTransform( void *, const double * );
-
-/* Geo to geo reprojection transformer. */
-void CPL_DLL *
-GDALCreateReprojectionTransformer( const char *pszSrcWKT,
- const char *pszDstWKT );
-void CPL_DLL GDALDestroyReprojectionTransformer( void * );
-int CPL_DLL GDALReprojectionTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-/* GCP based transformer ... forward is to georef coordinates */
-void CPL_DLL *
-GDALCreateGCPTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
- int nReqOrder, int bReversed );
-
-/* GCP based transformer with refinement of the GCPs ... forward is to georef coordinates */
-void CPL_DLL *
-GDALCreateGCPRefineTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
- int nReqOrder, int bReversed, double tolerance, int minimumGcps);
-
-void CPL_DLL GDALDestroyGCPTransformer( void *pTransformArg );
-int CPL_DLL GDALGCPTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-/* Thin Plate Spine transformer ... forward is to georef coordinates */
-
-void CPL_DLL *
-GDALCreateTPSTransformer( int nGCPCount, const GDAL_GCP *pasGCPList,
- int bReversed );
-void CPL_DLL GDALDestroyTPSTransformer( void *pTransformArg );
-int CPL_DLL GDALTPSTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-char CPL_DLL ** RPCInfoToMD( GDALRPCInfo *psRPCInfo );
-
-/* RPC based transformer ... src is pixel/line/elev, dst is long/lat/elev */
-
-void CPL_DLL *
-GDALCreateRPCTransformer( GDALRPCInfo *psRPC, int bReversed,
- double dfPixErrThreshold,
- char **papszOptions );
-void CPL_DLL GDALDestroyRPCTransformer( void *pTransformArg );
-int CPL_DLL GDALRPCTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-/* Geolocation transformer */
-
-void CPL_DLL *
-GDALCreateGeoLocTransformer( GDALDatasetH hBaseDS,
- char **papszGeolocationInfo,
- int bReversed );
-void CPL_DLL GDALDestroyGeoLocTransformer( void *pTransformArg );
-int CPL_DLL GDALGeoLocTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-/* Approximate transformer */
-void CPL_DLL *
-GDALCreateApproxTransformer( GDALTransformerFunc pfnRawTransformer,
- void *pRawTransformerArg, double dfMaxError );
-void CPL_DLL GDALApproxTransformerOwnsSubtransformer( void *pCBData,
- int bOwnFlag );
-void CPL_DLL GDALDestroyApproxTransformer( void *pApproxArg );
-int CPL_DLL GDALApproxTransform(
- void *pTransformArg, int bDstToSrc, int nPointCount,
- double *x, double *y, double *z, int *panSuccess );
-
-
-int CPL_DLL CPL_STDCALL
-GDALSimpleImageWarp( GDALDatasetH hSrcDS,
- GDALDatasetH hDstDS,
- int nBandCount, int *panBandList,
- GDALTransformerFunc pfnTransform,
- void *pTransformArg,
- GDALProgressFunc pfnProgress,
- void *pProgressArg,
- char **papszWarpOptions );
-
-CPLErr CPL_DLL CPL_STDCALL
-GDALSuggestedWarpOutput( GDALDatasetH hSrcDS,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg,
- double *padfGeoTransformOut,
- int *pnPixels, int *pnLines );
-CPLErr CPL_DLL CPL_STDCALL
-GDALSuggestedWarpOutput2( GDALDatasetH hSrcDS,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg,
- double *padfGeoTransformOut,
- int *pnPixels, int *pnLines,
- double *padfExtents,
- int nOptions );
-
-CPLXMLNode CPL_DLL *
-GDALSerializeTransformer( GDALTransformerFunc pfnFunc, void *pTransformArg );
-CPLErr CPL_DLL GDALDeserializeTransformer( CPLXMLNode *psTree,
- GDALTransformerFunc *ppfnFunc,
- void **ppTransformArg );
-
-CPLErr CPL_DLL
-GDALTransformGeolocations( GDALRasterBandH hXBand,
- GDALRasterBandH hYBand,
- GDALRasterBandH hZBand,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg,
- GDALProgressFunc pfnProgress,
- void *pProgressArg,
- char **papszOptions );
-
-/* -------------------------------------------------------------------- */
-/* Contour Line Generation */
-/* -------------------------------------------------------------------- */
-
-typedef CPLErr (*GDALContourWriter)( double dfLevel, int nPoints,
- double *padfX, double *padfY, void * );
-
-typedef void *GDALContourGeneratorH;
-
-GDALContourGeneratorH CPL_DLL
-GDAL_CG_Create( int nWidth, int nHeight,
- int bNoDataSet, double dfNoDataValue,
- double dfContourInterval, double dfContourBase,
- GDALContourWriter pfnWriter, void *pCBData );
-CPLErr CPL_DLL GDAL_CG_FeedLine( GDALContourGeneratorH hCG,
- double *padfScanline );
-void CPL_DLL GDAL_CG_Destroy( GDALContourGeneratorH hCG );
-
-typedef struct
-{
- void *hLayer;
-
- double adfGeoTransform[6];
-
- int nElevField;
- int nIDField;
- int nNextID;
-} OGRContourWriterInfo;
-
-CPLErr CPL_DLL
-OGRContourWriter( double, int, double *, double *, void *pInfo );
-
-CPLErr CPL_DLL
-GDALContourGenerate( GDALRasterBandH hBand,
- double dfContourInterval, double dfContourBase,
- int nFixedLevelCount, double *padfFixedLevels,
- int bUseNoData, double dfNoDataValue,
- void *hLayer, int iIDField, int iElevField,
- GDALProgressFunc pfnProgress, void *pProgressArg );
-
-/************************************************************************/
-/* Rasterizer API - geometries burned into GDAL raster. */
-/************************************************************************/
-
-CPLErr CPL_DLL
-GDALRasterizeGeometries( GDALDatasetH hDS,
- int nBandCount, int *panBandList,
- int nGeomCount, OGRGeometryH *pahGeometries,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg,
- double *padfGeomBurnValue,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-CPLErr CPL_DLL
-GDALRasterizeLayers( GDALDatasetH hDS,
- int nBandCount, int *panBandList,
- int nLayerCount, OGRLayerH *pahLayers,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg,
- double *padfLayerBurnValues,
- char **papszOptions,
- GDALProgressFunc pfnProgress,
- void *pProgressArg );
-
-CPLErr CPL_DLL
-GDALRasterizeLayersBuf( void *pData, int nBufXSize, int nBufYSize,
- GDALDataType eBufType, int nPixelSpace, int nLineSpace,
- int nLayerCount, OGRLayerH *pahLayers,
- const char *pszDstProjection,
- double *padfDstGeoTransform,
- GDALTransformerFunc pfnTransformer,
- void *pTransformArg, double dfBurnValue,
- char **papszOptions, GDALProgressFunc pfnProgress,
- void *pProgressArg );
-
-
-/************************************************************************/
-/* Gridding interface. */
-/************************************************************************/
-
-/** Gridding Algorithms */
-typedef enum {
- /*! Inverse distance to a power */ GGA_InverseDistanceToAPower = 1,
- /*! Moving Average */ GGA_MovingAverage = 2,
- /*! Nearest Neighbor */ GGA_NearestNeighbor = 3,
- /*! Minimum Value (Data Metric) */ GGA_MetricMinimum = 4,
- /*! Maximum Value (Data Metric) */ GGA_MetricMaximum = 5,
- /*! Data Range (Data Metric) */ GGA_MetricRange = 6,
- /*! Number of Points (Data Metric) */ GGA_MetricCount = 7,
- /*! Average Distance (Data Metric) */ GGA_MetricAverageDistance = 8,
- /*! Average Distance Between Data Points (Data Metric) */
- GGA_MetricAverageDistancePts = 9,
- /*! Linear interpolation (from Delaunay triangulation. Since GDAL 2.1 */
- GGA_Linear = 10,
- /*! Inverse distance to a power with nearest neighbor search for max points */
- GGA_InverseDistanceToAPowerNearestNeighbor = 11
-} GDALGridAlgorithm;
-
-/** Inverse distance to a power method control options */
-typedef struct
-{
- /*! Weighting power. */
- double dfPower;
- /*! Smoothing parameter. */
- double dfSmoothing;
- /*! Reserved for future use. */
- double dfAnisotropyRatio;
- /*! Reserved for future use. */
- double dfAnisotropyAngle;
- /*! The first radius (X axis if rotation angle is 0) of search ellipse. */
- double dfRadius1;
- /*! The second radius (Y axis if rotation angle is 0) of search ellipse. */
- double dfRadius2;
- /*! Angle of ellipse rotation in degrees.
- *
- * Ellipse rotated counter clockwise.
- */
- double dfAngle;
- /*! Maximum number of data points to use.
- *
- * Do not search for more points than this number.
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMaxPoints;
- /*! Minimum number of data points to use.
- *
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMinPoints;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridInverseDistanceToAPowerOptions;
-
-typedef struct
-{
- /*! Weighting power. */
- double dfPower;
- /*! The radius of search circle. */
- double dfRadius;
-
- /*! Maximum number of data points to use.
- *
- * Do not search for more points than this number.
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMaxPoints;
- /*! Minimum number of data points to use.
- *
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMinPoints;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridInverseDistanceToAPowerNearestNeighborOptions;
-
-/** Moving average method control options */
-typedef struct
-{
- /*! The first radius (X axis if rotation angle is 0) of search ellipse. */
- double dfRadius1;
- /*! The second radius (Y axis if rotation angle is 0) of search ellipse. */
- double dfRadius2;
- /*! Angle of ellipse rotation in degrees.
- *
- * Ellipse rotated counter clockwise.
- */
- double dfAngle;
- /*! Minimum number of data points to average.
- *
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMinPoints;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridMovingAverageOptions;
-
-/** Nearest neighbor method control options */
-typedef struct
-{
- /*! The first radius (X axis if rotation angle is 0) of search ellipse. */
- double dfRadius1;
- /*! The second radius (Y axis if rotation angle is 0) of search ellipse. */
- double dfRadius2;
- /*! Angle of ellipse rotation in degrees.
- *
- * Ellipse rotated counter clockwise.
- */
- double dfAngle;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridNearestNeighborOptions;
-
-/** Data metrics method control options */
-typedef struct
-{
- /*! The first radius (X axis if rotation angle is 0) of search ellipse. */
- double dfRadius1;
- /*! The second radius (Y axis if rotation angle is 0) of search ellipse. */
- double dfRadius2;
- /*! Angle of ellipse rotation in degrees.
- *
- * Ellipse rotated counter clockwise.
- */
- double dfAngle;
- /*! Minimum number of data points to average.
- *
- * If less amount of points found the grid node considered empty and will
- * be filled with NODATA marker.
- */
- GUInt32 nMinPoints;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridDataMetricsOptions;
-
-/** Linear method control options */
-typedef struct
-{
- /*! In case the point to be interpolated does not fit into a triangle of
- * the Delaunay triangulation, use that maximum distance to search a nearest
- * neighbour, or use nodata otherwise. If set to -1, the search distance is infinite.
- * If set to 0, nodata value will be always used.
- */
- double dfRadius;
- /*! No data marker to fill empty points. */
- double dfNoDataValue;
-} GDALGridLinearOptions;
-
-
-CPLErr CPL_DLL
-GDALGridCreate( GDALGridAlgorithm, const void *, GUInt32,
- const double *, const double *, const double *,
- double, double, double, double,
- GUInt32, GUInt32, GDALDataType, void *,
- GDALProgressFunc, void *);
-
-typedef struct GDALGridContext GDALGridContext;
-
-GDALGridContext CPL_DLL*
-GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
- GUInt32 nPoints,
- const double *padfX, const double *padfY, const double *padfZ,
- int bCallerWillKeepPointArraysAlive );
-
-void CPL_DLL GDALGridContextFree(GDALGridContext* psContext);
-
-CPLErr CPL_DLL GDALGridContextProcess(GDALGridContext* psContext,
- double dfXMin, double dfXMax, double dfYMin, double dfYMax,
- GUInt32 nXSize, GUInt32 nYSize, GDALDataType eType, void *pData,
- GDALProgressFunc pfnProgress, void *pProgressArg );
-
-GDAL_GCP CPL_DLL *
-GDALComputeMatchingPoints( GDALDatasetH hFirstImage,
- GDALDatasetH hSecondImage,
- char **papszOptions,
- int *pnGCPCount );
-
-/************************************************************************/
-/* Delaunay triangulation interface. */
-/************************************************************************/
-
-typedef struct
-{
- int anVertexIdx[3]; /* index to the padfX/padfY arrays */
- int anNeighborIdx[3]; /* index to GDALDelaunayTriangulation.pasFacets, or -1 */
- /* anNeighborIdx[k] is the triangle to the opposite side */
- /* of the opposite segment of anVertexIdx[k] */
-} GDALTriFacet;
-
-/* Conversion from cartesian (x,y) to barycentric (l1,l2,l3) with :
- l1 = dfMul1X * (x - dfCxtX) + dfMul1Y * (y - dfCstY)
- l2 = dfMul2X * (x - dfCxtX) + dfMul2Y * (y - dfCstY)
- l3 = 1 - l1 - l2
-*/
-typedef struct
-{
- double dfMul1X;
- double dfMul1Y;
- double dfMul2X;
- double dfMul2Y;
- double dfCstX;
- double dfCstY;
-} GDALTriBarycentricCoefficients;
-
-typedef struct
-{
- int nFacets;
- GDALTriFacet *pasFacets; /* nFacets elements */
- GDALTriBarycentricCoefficients *pasFacetCoefficients; /* nFacets elements */
-} GDALTriangulation;
-
-int CPL_DLL GDALHasTriangulation(void);
-
-GDALTriangulation CPL_DLL *GDALTriangulationCreateDelaunay(int nPoints,
- const double* padfX,
- const double* padfY);
-int CPL_DLL GDALTriangulationComputeBarycentricCoefficients(
- GDALTriangulation* psDT,
- const double* padfX,
- const double* padfY);
-int CPL_DLL GDALTriangulationComputeBarycentricCoordinates(
- const GDALTriangulation* psDT,
- int nFacetIdx,
- double dfX,
- double dfY,
- double* pdfL1,
- double* pdfL2,
- double* pdfL3);
-int CPL_DLL GDALTriangulationFindFacetBruteForce( const GDALTriangulation* psDT,
- double dfX,
- double dfY,
- int* panOutputFacetIdx );
-int CPL_DLL GDALTriangulationFindFacetDirected( const GDALTriangulation* psDT,
- int nFacetIdx,
- double dfX,
- double dfY,
- int* panOutputFacetIdx );
-void CPL_DLL GDALTriangulationFree(GDALTriangulation* psDT);
-
-// GDAL internal use only
-void GDALTriangulationTerminate(void);
-
-CPL_C_END
-
-#endif /* ndef GDAL_ALG_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_alg_priv.h b/modules/globebrowsing/ext/gdal/include/gdal_alg_priv.h
deleted file mode 100644
index 88b0d1179b..0000000000
--- a/modules/globebrowsing/ext/gdal/include/gdal_alg_priv.h
+++ /dev/null
@@ -1,209 +0,0 @@
-/******************************************************************************
- * $Id: gdal_alg_priv.h 33757 2016-03-20 20:22:33Z goatbar $
- *
- * Project: GDAL Image Processing Algorithms
- * Purpose: Prototypes and definitions for various GDAL based algorithms:
- * private declarations.
- * Author: Andrey Kiselev, dron@ak4719.spb.edu
- *
- ******************************************************************************
- * Copyright (c) 2008, Andrey Kiselev
- * Copyright (c) 2010-2013, Even Rouault
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ****************************************************************************/
-
-#ifndef GDAL_ALG_PRIV_H_INCLUDED
-#define GDAL_ALG_PRIV_H_INCLUDED
-
-#include "gdal_alg.h"
-
-CPL_C_START
-
-/** Source of the burn value */
-typedef enum {
- /*! Use value from padfBurnValue */ GBV_UserBurnValue = 0,
- /*! Use value from the Z coordinate */ GBV_Z = 1,
- /*! Use value form the M value */ GBV_M = 2
-} GDALBurnValueSrc;
-
-typedef enum {
- GRMA_Replace = 0,
- GRMA_Add = 1,
-} GDALRasterMergeAlg;
-
-typedef struct {
- unsigned char * pabyChunkBuf;
- int nXSize;
- int nYSize;
- int nBands;
- GDALDataType eType;
- double *padfBurnValue;
- GDALBurnValueSrc eBurnValueSource;
- GDALRasterMergeAlg eMergeAlg;
-} GDALRasterizeInfo;
-
-/************************************************************************/
-/* Low level rasterizer API. */
-/************************************************************************/
-
-typedef void (*llScanlineFunc)( void *, int, int, int, double );
-typedef void (*llPointFunc)( void *, int, int, double );
-
-void GDALdllImagePoint( int nRasterXSize, int nRasterYSize,
- int nPartCount, int *panPartSize,
- double *padfX, double *padfY, double *padfVariant,
- llPointFunc pfnPointFunc, void *pCBData );
-
-void GDALdllImageLine( int nRasterXSize, int nRasterYSize,
- int nPartCount, int *panPartSize,
- double *padfX, double *padfY, double *padfVariant,
- llPointFunc pfnPointFunc, void *pCBData );
-
-void GDALdllImageLineAllTouched(int nRasterXSize, int nRasterYSize,
- int nPartCount, int *panPartSize,
- double *padfX, double *padfY,
- double *padfVariant,
- llPointFunc pfnPointFunc, void *pCBData );
-
-void GDALdllImageFilledPolygon(int nRasterXSize, int nRasterYSize,
- int nPartCount, int *panPartSize,
- double *padfX, double *padfY,
- double *padfVariant,
- llScanlineFunc pfnScanlineFunc, void *pCBData );
-
-CPL_C_END
-
-/************************************************************************/
-/* Polygon Enumerator */
-/************************************************************************/
-
-#define GP_NODATA_MARKER -51502112
-
-template class GDALRasterPolygonEnumeratorT
-
-{
-private:
- void MergePolygon( int nSrcId, int nDstId );
- int NewPolygon( DataType nValue );
-
-public: // these are intended to be readonly.
-
- GInt32 *panPolyIdMap;
- DataType *panPolyValue;
-
- int nNextPolygonId;
- int nPolyAlloc;
-
- int nConnectedness;
-
-public:
- GDALRasterPolygonEnumeratorT( int nConnectedness=4 );
- ~GDALRasterPolygonEnumeratorT();
-
- void ProcessLine( DataType *panLastLineVal, DataType *panThisLineVal,
- GInt32 *panLastLineId, GInt32 *panThisLineId,
- int nXSize );
-
- void CompleteMerges();
-
- void Clear();
-};
-
-struct IntEqualityTest
-{
- bool operator()(GInt32 a, GInt32 b) { return a == b; }
-};
-
-typedef GDALRasterPolygonEnumeratorT GDALRasterPolygonEnumerator;
-
-typedef void* (*GDALTransformDeserializeFunc)( CPLXMLNode *psTree );
-
-void* GDALRegisterTransformDeserializer(const char* pszTransformName,
- GDALTransformerFunc pfnTransformerFunc,
- GDALTransformDeserializeFunc pfnDeserializeFunc);
-void GDALUnregisterTransformDeserializer(void* pData);
-
-void GDALCleanupTransformDeserializerMutex();
-
-/* Transformer cloning */
-
-void* GDALCreateTPSTransformerInt( int nGCPCount, const GDAL_GCP *pasGCPList,
- int bReversed, char** papszOptions );
-
-void CPL_DLL * GDALCloneTransformer( void *pTransformerArg );
-
-/************************************************************************/
-/* Color table related */
-/************************************************************************/
-
-/* definitions exists for T = GUInt32 and T = GUIntBig */
-template int
-GDALComputeMedianCutPCTInternal( GDALRasterBandH hRed,
- GDALRasterBandH hGreen,
- GDALRasterBandH hBlue,
- GByte* pabyRedBand,
- GByte* pabyGreenBand,
- GByte* pabyBlueBand,
- int (*pfnIncludePixel)(int,int,void*),
- int nColors,
- int nBits,
- T* panHistogram,
- GDALColorTableH hColorTable,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-int GDALDitherRGB2PCTInternal( GDALRasterBandH hRed,
- GDALRasterBandH hGreen,
- GDALRasterBandH hBlue,
- GDALRasterBandH hTarget,
- GDALColorTableH hColorTable,
- int nBits,
- GInt16* pasDynamicColorMap,
- int bDither,
- GDALProgressFunc pfnProgress,
- void * pProgressArg );
-
-#define PRIME_FOR_65536 98317
-
-/* See HashHistogram structure in gdalmediancut.cpp and ColorIndex structure in gdaldither.cpp */
-/* 6 * sizeof(int) should be the size of the largest of both structures */
-#define MEDIAN_CUT_AND_DITHER_BUFFER_SIZE_65536 (6 * sizeof(int) * PRIME_FOR_65536)
-
-
-/************************************************************************/
-/* Float comparison function. */
-/************************************************************************/
-
-/**
- * Units in the Last Place. This specifies how big an error we are willing to
- * accept in terms of the value of the least significant digit of the floating
- * point number’s representation. MAX_ULPS can also be interpreted in terms of
- * how many representable floats we are willing to accept between A and B.
- */
-#define MAX_ULPS 10
-
-GBool GDALFloatEquals(float A, float B);
-
-struct FloatEqualityTest
-{
- bool operator()(float a, float b) { return GDALFloatEquals(a,b) == TRUE; }
-};
-
-#endif /* ndef GDAL_ALG_PRIV_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_avx2_emulation.hpp b/modules/globebrowsing/ext/gdal/include/gdal_avx2_emulation.hpp
new file mode 100644
index 0000000000..d84da1b8aa
--- /dev/null
+++ b/modules/globebrowsing/ext/gdal/include/gdal_avx2_emulation.hpp
@@ -0,0 +1,240 @@
+/******************************************************************************
+ * Project: GDAL
+ * Purpose: AVX2 emulation with SSE2 + a few SSE4.1 emulation
+ * Author: Even Rouault
+ *
+ ******************************************************************************
+ * Copyright (c) 2016, Even Rouault
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ ****************************************************************************/
+
+#ifndef GDAL_AVX2_EMULATION_H_INCLUDED
+#define GDAL_AVX2_EMULATION_H_INCLUDED
+
+#include
+
+#ifdef __SSE4_1__
+#include
+
+#define GDALmm_min_epu16 _mm_min_epu16
+#define GDALmm_max_epu16 _mm_max_epu16
+#define GDALmm_mullo_epi32 _mm_mullo_epi32
+
+#else
+// Emulation of SSE4.1 _mm_min_epu16 and _mm_max_epu16 with SSE2 only
+
+static inline __m128i GDALAVX2Emul_mm_cmple_epu16 (__m128i x, __m128i y)
+{
+ return _mm_cmpeq_epi16(_mm_subs_epu16(x, y), _mm_setzero_si128() );
+}
+
+static inline __m128i GDALAVX2Emul_mm_ternary(__m128i mask,
+ __m128i then_reg,
+ __m128i else_reg)
+{
+ return _mm_or_si128(_mm_and_si128(mask, then_reg),
+ _mm_andnot_si128(mask, else_reg));
+}
+
+static inline __m128i GDALmm_min_epu16 (__m128i x, __m128i y)
+{
+ const __m128i mask = GDALAVX2Emul_mm_cmple_epu16(x, y);
+ return GDALAVX2Emul_mm_ternary(mask, x, y);
+}
+
+static inline __m128i GDALmm_max_epu16 (__m128i x, __m128i y)
+{
+ const __m128i mask = GDALAVX2Emul_mm_cmple_epu16(x, y);
+ return GDALAVX2Emul_mm_ternary(mask, y, x);
+}
+
+static inline __m128i GDALmm_mullo_epi32 (__m128i x, __m128i y)
+{
+ const __m128i mul02 = _mm_shuffle_epi32(_mm_mul_epu32(x, y), 2 << 2);
+ const __m128i mul13 = _mm_shuffle_epi32(_mm_mul_epu32(_mm_srli_si128(x, 4),
+ _mm_srli_si128(y, 4)),
+ 2 << 2);
+ return _mm_unpacklo_epi32(mul02, mul13);;
+}
+#endif // __SSE4_1__
+
+
+#ifdef __AVX2__
+
+#include
+
+typedef __m256i GDALm256i;
+
+#define GDALmm256_set1_epi8 _mm256_set1_epi8
+#define GDALmm256_set1_epi16 _mm256_set1_epi16
+#define GDALmm256_setzero_si256 _mm256_setzero_si256
+#define GDALmm256_load_si256 _mm256_load_si256
+#define GDALmm256_store_si256 _mm256_store_si256
+#define GDALmm256_storeu_si256 _mm256_storeu_si256
+#define GDALmm256_cmpeq_epi8 _mm256_cmpeq_epi8
+#define GDALmm256_sad_epu8 _mm256_sad_epu8
+#define GDALmm256_add_epi32 _mm256_add_epi32
+#define GDALmm256_andnot_si256 _mm256_andnot_si256
+#define GDALmm256_and_si256 _mm256_and_si256
+#define GDALmm256_or_si256 _mm256_or_si256
+#define GDALmm256_min_epu8 _mm256_min_epu8
+#define GDALmm256_max_epu8 _mm256_max_epu8
+#define GDALmm256_extracti128_si256 _mm256_extracti128_si256
+#define GDALmm256_cvtepu8_epi16 _mm256_cvtepu8_epi16
+#define GDALmm256_madd_epi16 _mm256_madd_epi16
+#define GDALmm256_min_epu16 _mm256_min_epu16
+#define GDALmm256_max_epu16 _mm256_max_epu16
+#define GDALmm256_cvtepu16_epi32 _mm256_cvtepu16_epi32
+#define GDALmm256_cvtepu16_epi64 _mm256_cvtepu16_epi64
+#define GDALmm256_cvtepu32_epi64 _mm256_cvtepu32_epi64
+#define GDALmm256_mullo_epi32 _mm256_mullo_epi32
+#define GDALmm256_add_epi64 _mm256_add_epi64
+#define GDALmm256_add_epi16 _mm256_add_epi16
+#define GDALmm256_sub_epi16 _mm256_sub_epi16
+#define GDALmm256_min_epi16 _mm256_min_epi16
+#define GDALmm256_max_epi16 _mm256_max_epi16
+
+#else
+
+typedef struct
+{
+ __m128i low;
+ __m128i high;
+} GDALm256i;
+
+static inline GDALm256i GDALmm256_set1_epi8(char c)
+{
+ GDALm256i reg;
+ reg.low = _mm_set1_epi8(c);
+ reg.high = _mm_set1_epi8(c);
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_set1_epi16(short s)
+{
+ GDALm256i reg;
+ reg.low = _mm_set1_epi16(s);
+ reg.high = _mm_set1_epi16(s);
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_setzero_si256()
+{
+ GDALm256i reg;
+ reg.low = _mm_setzero_si128();
+ reg.high = _mm_setzero_si128();
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_load_si256(GDALm256i const * p)
+{
+ GDALm256i reg;
+ reg.low = _mm_load_si128((__m128i const*)p);
+ reg.high = _mm_load_si128((__m128i const*)((char*)p+16));
+ return reg;
+}
+
+static inline void GDALmm256_store_si256(GDALm256i * p, GDALm256i reg)
+{
+ _mm_store_si128((__m128i*)p, reg.low);
+ _mm_store_si128((__m128i*)((char*)p+16), reg.high);
+}
+
+static inline void GDALmm256_storeu_si256(GDALm256i * p, GDALm256i reg)
+{
+ _mm_storeu_si128((__m128i*)p, reg.low);
+ _mm_storeu_si128((__m128i*)((char*)p+16), reg.high);
+}
+
+#define DEFINE_BINARY_MM256(mm256name, mm128name) \
+static inline GDALm256i mm256name(GDALm256i r1, GDALm256i r2) \
+{ \
+ GDALm256i reg; \
+ reg.low = mm128name(r1.low, r2.low); \
+ reg.high = mm128name(r1.high, r2.high); \
+ return reg; \
+}
+
+DEFINE_BINARY_MM256(GDALmm256_cmpeq_epi8, _mm_cmpeq_epi8)
+DEFINE_BINARY_MM256(GDALmm256_sad_epu8, _mm_sad_epu8)
+DEFINE_BINARY_MM256(GDALmm256_add_epi32, _mm_add_epi32)
+DEFINE_BINARY_MM256(GDALmm256_andnot_si256, _mm_andnot_si128)
+DEFINE_BINARY_MM256(GDALmm256_and_si256, _mm_and_si128)
+DEFINE_BINARY_MM256(GDALmm256_or_si256, _mm_or_si128)
+DEFINE_BINARY_MM256(GDALmm256_min_epu8, _mm_min_epu8)
+DEFINE_BINARY_MM256(GDALmm256_max_epu8, _mm_max_epu8)
+DEFINE_BINARY_MM256(GDALmm256_madd_epi16, _mm_madd_epi16)
+DEFINE_BINARY_MM256(GDALmm256_min_epu16, GDALmm_min_epu16)
+DEFINE_BINARY_MM256(GDALmm256_max_epu16, GDALmm_max_epu16)
+DEFINE_BINARY_MM256(GDALmm256_mullo_epi32, GDALmm_mullo_epi32)
+DEFINE_BINARY_MM256(GDALmm256_add_epi64, _mm_add_epi64)
+DEFINE_BINARY_MM256(GDALmm256_add_epi16, _mm_add_epi16)
+DEFINE_BINARY_MM256(GDALmm256_sub_epi16, _mm_sub_epi16)
+DEFINE_BINARY_MM256(GDALmm256_min_epi16, _mm_min_epi16)
+DEFINE_BINARY_MM256(GDALmm256_max_epi16, _mm_max_epi16)
+
+static inline __m128i GDALmm256_extracti128_si256(GDALm256i reg, int index)
+{
+ return (index == 0) ? reg.low : reg.high;
+}
+
+static inline GDALm256i GDALmm256_cvtepu8_epi16(__m128i reg128)
+{
+ GDALm256i reg;
+ reg.low = _mm_unpacklo_epi8(reg128, _mm_setzero_si128());
+ reg.high = _mm_unpacklo_epi8(_mm_shuffle_epi32(reg128, 2 | (3 << 2)),
+ _mm_setzero_si128());
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_cvtepu16_epi32(__m128i reg128)
+{
+ GDALm256i reg;
+ reg.low = _mm_unpacklo_epi16(reg128, _mm_setzero_si128());
+ reg.high = _mm_unpacklo_epi16(_mm_shuffle_epi32(reg128, 2 | (3 << 2)),
+ _mm_setzero_si128());
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_cvtepu16_epi64(__m128i reg128)
+{
+ GDALm256i reg;
+ reg.low = _mm_unpacklo_epi32(_mm_unpacklo_epi16(reg128,
+ _mm_setzero_si128()),
+ _mm_setzero_si128());
+ reg.high = _mm_unpacklo_epi32(_mm_unpacklo_epi16(
+ _mm_srli_si128(reg128, 4),
+ _mm_setzero_si128()),
+ _mm_setzero_si128());
+ return reg;
+}
+
+static inline GDALm256i GDALmm256_cvtepu32_epi64(__m128i reg128)
+{
+ GDALm256i reg;
+ reg.low = _mm_unpacklo_epi32(reg128, _mm_setzero_si128());
+ reg.high = _mm_unpacklo_epi32(_mm_shuffle_epi32(reg128, 2 | (3 << 2)),
+ _mm_setzero_si128());
+ return reg;
+}
+
+#endif
+
+#endif /* GDAL_AVX2_EMULATION_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_frmts.h b/modules/globebrowsing/ext/gdal/include/gdal_frmts.h
index 44d06f86c5..f7495afd48 100644
--- a/modules/globebrowsing/ext/gdal/include/gdal_frmts.h
+++ b/modules/globebrowsing/ext/gdal/include/gdal_frmts.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal_frmts.h 33351 2016-02-03 15:52:38Z goatbar $
+ * $Id: gdal_frmts.h 36731 2016-12-07 11:08:07Z rouault $
*
* Project: GDAL
* Purpose: Prototypes for all format specific driver initialization.
@@ -186,6 +186,10 @@ void CPL_DLL GDALRegister_WMTS(void);
void CPL_DLL GDALRegister_SAFE(void);
void CPL_DLL GDALRegister_SENTINEL2(void);
void CPL_DLL GDALRegister_mrf(void);
+void CPL_DLL GDALRegister_RRASTER(void);
+void CPL_DLL GDALRegister_Derived(void);
+void CPL_DLL GDALRegister_JP2Lura(void);
+void CPL_DLL GDALRegister_PRF(void);
CPL_C_END
#endif /* ndef GDAL_FRMTS_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_mdreader.h b/modules/globebrowsing/ext/gdal/include/gdal_mdreader.h
index 2c69a56a9b..93e3c754fd 100644
--- a/modules/globebrowsing/ext/gdal/include/gdal_mdreader.h
+++ b/modules/globebrowsing/ext/gdal/include/gdal_mdreader.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal_mdreader.h 33694 2016-03-10 17:54:30Z goatbar $
+ * $Id: gdal_mdreader.h 35883 2016-10-24 05:49:15Z goatbar $
*
* Project: GDAL Core
* Purpose: Read metadata (mainly the remote sensing imagery) from files of
@@ -31,7 +31,6 @@
#ifndef GDAL_MDREADER_H_INCLUDED
#define GDAL_MDREADER_H_INCLUDED
-
#include "cpl_port.h"
#include "gdal_priv.h"
@@ -88,7 +87,6 @@ typedef enum {
MDR_LS | MDR_RE | MDR_KOMPSAT | MDR_EROS | MDR_ALOS /**< any reader */
} MDReaders;
-
/**
* The base class for all metadata readers
*/
@@ -156,11 +154,13 @@ protected:
virtual char** AddXMLNameValueToList(char** papszList, const char *pszName,
const char *pszValue);
protected:
+//! @cond Doxygen_Suppress
char **m_papszIMDMD;
char **m_papszRPCMD;
char **m_papszIMAGERYMD;
char **m_papszDEFAULTMD;
bool m_bIsMetadataLoad;
+//! @endcond
};
/**
@@ -187,7 +187,9 @@ public:
char **papszSiblingFiles,
GUInt32 nType = MDR_ANY);
protected:
+//! @cond Doxygen_Suppress
GDALMDReaderBase *m_pReader;
+//! @endcond
};
// misc
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_pam.h b/modules/globebrowsing/ext/gdal/include/gdal_pam.h
index 83a14a0f60..cdfa9e985a 100644
--- a/modules/globebrowsing/ext/gdal/include/gdal_pam.h
+++ b/modules/globebrowsing/ext/gdal/include/gdal_pam.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal_pam.h 33694 2016-03-10 17:54:30Z goatbar $
+ * $Id: gdal_pam.h 36501 2016-11-25 14:09:24Z rouault $
*
* Project: GDAL Core
* Purpose: Declaration for Peristable Auxiliary Metadata classes.
@@ -30,6 +30,8 @@
#ifndef GDAL_PAM_H_INCLUDED
#define GDAL_PAM_H_INCLUDED
+//! @cond Doxygen_Suppress
+
#include "gdal_priv.h"
class GDALPamRasterBand;
@@ -68,7 +70,7 @@ class GDALPamRasterBand;
/* GDAL PAM Flags */
/* ERO 2011/04/13 : GPF_AUXMODE seems to be unimplemented */
-#define GPF_DIRTY 0x01 // .pam file needs to be written on close
+#define GPF_DIRTY 0x01 // .pam file needs to be written on close
#define GPF_TRIED_READ_FAILED 0x02 // no need to keep trying to read .pam.
#define GPF_DISABLED 0x04 // do not try any PAM stuff.
#define GPF_AUXMODE 0x08 // store info in .aux (HFA) file.
@@ -87,7 +89,7 @@ class GDALDatasetPamInfo
public:
char *pszPamFilename;
- char *pszProjection;
+ char *pszProjection;
int bHaveGeoTransform;
double adfGeoTransform[6];
@@ -102,11 +104,13 @@ public:
int bHasMetadata;
};
+//! @endcond
/* ******************************************************************** */
/* GDALPamDataset */
/* ******************************************************************** */
+/** PAM dataset */
class CPL_DLL GDALPamDataset : public GDALDataset
{
friend class GDALPamRasterBand;
@@ -115,8 +119,9 @@ class CPL_DLL GDALPamDataset : public GDALDataset
int IsPamFilenameAPotentialSiblingFile();
protected:
- GDALPamDataset(void);
+ GDALPamDataset(void);
+//! @cond Doxygen_Suppress
int nPamFlags;
GDALDatasetPamInfo *psPam;
@@ -138,54 +143,57 @@ class CPL_DLL GDALPamDataset : public GDALDataset
const char *GetPhysicalFilename();
void SetSubdatasetName( const char *);
const char *GetSubdatasetName();
+//! @endcond
public:
virtual ~GDALPamDataset();
- virtual void FlushCache(void);
+ virtual void FlushCache(void) CPL_OVERRIDE;
- virtual const char *GetProjectionRef(void);
- virtual CPLErr SetProjection( const char * );
+ virtual const char *GetProjectionRef(void) CPL_OVERRIDE;
+ virtual CPLErr SetProjection( const char * ) CPL_OVERRIDE;
- virtual CPLErr GetGeoTransform( double * );
- virtual CPLErr SetGeoTransform( double * );
+ virtual CPLErr GetGeoTransform( double * ) CPL_OVERRIDE;
+ virtual CPLErr SetGeoTransform( double * ) CPL_OVERRIDE;
- virtual int GetGCPCount();
- virtual const char *GetGCPProjection();
- virtual const GDAL_GCP *GetGCPs();
+ virtual int GetGCPCount() CPL_OVERRIDE;
+ virtual const char *GetGCPProjection() CPL_OVERRIDE;
+ virtual const GDAL_GCP *GetGCPs() CPL_OVERRIDE;
virtual CPLErr SetGCPs( int nGCPCount, const GDAL_GCP *pasGCPList,
- const char *pszGCPProjection );
+ const char *pszGCPProjection ) CPL_OVERRIDE;
virtual CPLErr SetMetadata( char ** papszMetadata,
- const char * pszDomain = "" );
+ const char * pszDomain = "" ) CPL_OVERRIDE;
virtual CPLErr SetMetadataItem( const char * pszName,
const char * pszValue,
- const char * pszDomain = "" );
- virtual char **GetMetadata( const char * pszDomain = "" );
+ const char * pszDomain = "" ) CPL_OVERRIDE;
+ virtual char **GetMetadata( const char * pszDomain = "" ) CPL_OVERRIDE;
virtual const char *GetMetadataItem( const char * pszName,
- const char * pszDomain = "" );
+ const char * pszDomain = "" ) CPL_OVERRIDE;
- virtual char **GetFileList(void);
+ virtual char **GetFileList(void) CPL_OVERRIDE;
+//! @cond Doxygen_Suppress
virtual CPLErr CloneInfo( GDALDataset *poSrcDS, int nCloneInfoFlags );
virtual CPLErr IBuildOverviews( const char *pszResampling,
int nOverviews, int *panOverviewList,
int nListBands, int *panBandList,
GDALProgressFunc pfnProgress,
- void * pProgressData );
-
+ void * pProgressData ) CPL_OVERRIDE;
// "semi private" methods.
void MarkPamDirty() { nPamFlags |= GPF_DIRTY; }
GDALDatasetPamInfo *GetPamInfo() { return psPam; }
int GetPamFlags() { return nPamFlags; }
void SetPamFlags(int nValue ) { nPamFlags = nValue; }
+//! @endcond
private:
- CPL_DISALLOW_COPY_ASSIGN(GDALPamDataset);
+ CPL_DISALLOW_COPY_ASSIGN(GDALPamDataset)
};
+//! @cond Doxygen_Suppress
/* ==================================================================== */
/* GDALRasterBandPamInfo */
/* */
@@ -223,16 +231,18 @@ typedef struct {
GDALRasterAttributeTable *poDefaultRAT;
} GDALRasterBandPamInfo;
-
+//! @endcond
/* ******************************************************************** */
/* GDALPamRasterBand */
/* ******************************************************************** */
+
+/** PAM raster band */
class CPL_DLL GDALPamRasterBand : public GDALRasterBand
{
friend class GDALPamDataset;
protected:
-
+//! @cond Doxygen_Suppress
virtual CPLXMLNode *SerializeToXML( const char *pszVRTPath );
virtual CPLErr XMLInit( CPLXMLNode *, const char * );
@@ -240,67 +250,72 @@ class CPL_DLL GDALPamRasterBand : public GDALRasterBand
void PamClear();
GDALRasterBandPamInfo *psPam;
+//! @endcond
public:
GDALPamRasterBand();
- GDALPamRasterBand(int bForceCachedIO);
+//! @cond Doxygen_Suppress
+ explicit GDALPamRasterBand(int bForceCachedIO);
+//! @endcond
virtual ~GDALPamRasterBand();
- virtual void SetDescription( const char * );
+ virtual void SetDescription( const char * ) CPL_OVERRIDE;
- virtual CPLErr SetNoDataValue( double );
- virtual double GetNoDataValue( int *pbSuccess = NULL );
- virtual CPLErr DeleteNoDataValue();
+ virtual CPLErr SetNoDataValue( double ) CPL_OVERRIDE;
+ virtual double GetNoDataValue( int *pbSuccess = NULL ) CPL_OVERRIDE;
+ virtual CPLErr DeleteNoDataValue() CPL_OVERRIDE;
- virtual CPLErr SetColorTable( GDALColorTable * );
- virtual GDALColorTable *GetColorTable();
+ virtual CPLErr SetColorTable( GDALColorTable * ) CPL_OVERRIDE;
+ virtual GDALColorTable *GetColorTable() CPL_OVERRIDE;
- virtual CPLErr SetColorInterpretation( GDALColorInterp );
- virtual GDALColorInterp GetColorInterpretation();
+ virtual CPLErr SetColorInterpretation( GDALColorInterp ) CPL_OVERRIDE;
+ virtual GDALColorInterp GetColorInterpretation() CPL_OVERRIDE;
- virtual const char *GetUnitType();
- CPLErr SetUnitType( const char * );
+ virtual const char *GetUnitType() CPL_OVERRIDE;
+ CPLErr SetUnitType( const char * ) CPL_OVERRIDE;
- virtual char **GetCategoryNames();
- virtual CPLErr SetCategoryNames( char ** );
+ virtual char **GetCategoryNames() CPL_OVERRIDE;
+ virtual CPLErr SetCategoryNames( char ** ) CPL_OVERRIDE;
- virtual double GetOffset( int *pbSuccess = NULL );
- CPLErr SetOffset( double );
- virtual double GetScale( int *pbSuccess = NULL );
- CPLErr SetScale( double );
+ virtual double GetOffset( int *pbSuccess = NULL ) CPL_OVERRIDE;
+ CPLErr SetOffset( double ) CPL_OVERRIDE;
+ virtual double GetScale( int *pbSuccess = NULL ) CPL_OVERRIDE;
+ CPLErr SetScale( double ) CPL_OVERRIDE;
virtual CPLErr GetHistogram( double dfMin, double dfMax,
int nBuckets, GUIntBig * panHistogram,
int bIncludeOutOfRange, int bApproxOK,
- GDALProgressFunc, void *pProgressData );
+ GDALProgressFunc, void *pProgressData ) CPL_OVERRIDE;
virtual CPLErr GetDefaultHistogram( double *pdfMin, double *pdfMax,
int *pnBuckets, GUIntBig ** ppanHistogram,
int bForce,
- GDALProgressFunc, void *pProgressData);
+ GDALProgressFunc, void *pProgressData) CPL_OVERRIDE;
virtual CPLErr SetDefaultHistogram( double dfMin, double dfMax,
- int nBuckets, GUIntBig *panHistogram );
+ int nBuckets, GUIntBig *panHistogram ) CPL_OVERRIDE;
virtual CPLErr SetMetadata( char ** papszMetadata,
- const char * pszDomain = "" );
+ const char * pszDomain = "" ) CPL_OVERRIDE;
virtual CPLErr SetMetadataItem( const char * pszName,
const char * pszValue,
- const char * pszDomain = "" );
+ const char * pszDomain = "" ) CPL_OVERRIDE;
- virtual GDALRasterAttributeTable *GetDefaultRAT();
- virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * );
+ virtual GDALRasterAttributeTable *GetDefaultRAT() CPL_OVERRIDE;
+ virtual CPLErr SetDefaultRAT( const GDALRasterAttributeTable * ) CPL_OVERRIDE;
+//! @cond Doxygen_Suppress
// new in GDALPamRasterBand.
virtual CPLErr CloneInfo( GDALRasterBand *poSrcBand, int nCloneInfoFlags );
// "semi private" methods.
GDALRasterBandPamInfo *GetPamInfo() { return psPam; }
-
+//! @endcond
private:
- CPL_DISALLOW_COPY_ASSIGN(GDALPamRasterBand);
+ CPL_DISALLOW_COPY_ASSIGN(GDALPamRasterBand)
};
+//! @cond Doxygen_Suppress
// These are mainly helper functions for internal use.
int CPL_DLL PamParseHistogram( CPLXMLNode *psHistItem,
double *pdfMin, double *pdfMax,
@@ -321,4 +336,6 @@ const char CPL_DLL * PamAllocateProxy( const char * );
const char CPL_DLL * PamDeallocateProxy( const char * );
void CPL_DLL PamCleanProxyDB( void );
+//! @endcond
+
#endif /* ndef GDAL_PAM_H_INCLUDED */
diff --git a/modules/globebrowsing/ext/gdal/include/gdal_priv.h b/modules/globebrowsing/ext/gdal/include/gdal_priv.h
index 76ba9a6879..c34d2f9a15 100644
--- a/modules/globebrowsing/ext/gdal/include/gdal_priv.h
+++ b/modules/globebrowsing/ext/gdal/include/gdal_priv.h
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: gdal_priv.h 33808 2016-03-29 21:15:28Z goatbar $
+ * $Id: gdal_priv.h 37723 2017-03-16 17:07:53Z rouault $
*
* Name: gdal_priv.h
* Project: GDAL Core
@@ -69,17 +69,20 @@ class GDALAsyncReader;
#include