Skip to content
Commits on Source (44)
......@@ -123,7 +123,7 @@ GDAL_INCLUDE = -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore \
# libtool targets and help variables
LIBGDAL := libgdal.la
LIBGDAL_CURRENT := 26
LIBGDAL_REVISION := 2
LIBGDAL_REVISION := 3
LIBGDAL_AGE := 0
# native build targets and variables
......
include GDALmake.opt
GDAL_OBJ = $(GDAL_ROOT)/frmts/o/*.o \
$(GDAL_ROOT)/gcore/*.o \
$(GDAL_ROOT)/port/*.o \
$(GDAL_ROOT)/alg/*.o \
$(GDAL_ROOT)/apps/commonutils.o \
$(GDAL_ROOT)/apps/gdalinfo_lib.o \
$(GDAL_ROOT)/apps/gdal_translate_lib.o \
$(GDAL_ROOT)/apps/gdalwarp_lib.o \
$(GDAL_ROOT)/apps/ogr2ogr_lib.o \
$(GDAL_ROOT)/apps/gdaldem_lib.o \
$(GDAL_ROOT)/apps/nearblack_lib.o \
$(GDAL_ROOT)/apps/gdal_grid_lib.o \
$(GDAL_ROOT)/apps/gdal_rasterize_lib.o \
$(GDAL_ROOT)/apps/gdalbuildvrt_lib.o
GDAL_OBJ += $(GDAL_ROOT)/ogr/ogrsf_frmts/o/*.o
GDAL_OBJ = frmts/o/*.o \
gcore/*.o \
port/*.o \
alg/*.o \
apps/commonutils.o \
apps/gdalinfo_lib.o \
apps/gdal_translate_lib.o \
apps/gdalwarp_lib.o \
apps/ogr2ogr_lib.o \
apps/gdaldem_lib.o \
apps/nearblack_lib.o \
apps/gdal_grid_lib.o \
apps/gdal_rasterize_lib.o \
apps/gdalbuildvrt_lib.o
GDAL_OBJ += ogr/ogrsf_frmts/o/*.o
ifeq ($(GNM_ENABLED),yes)
GDAL_OBJ += $(GDAL_ROOT)/gnm/*.o $(GDAL_ROOT)/gnm/gnm_frmts/o/*.o
GDAL_OBJ += gnm/*.o gnm/gnm_frmts/o/*.o
endif
ifeq ($(HAVE_LERC),yes)
GDAL_OBJ += $(GDAL_ROOT)/third_party/o/*.o
GDAL_OBJ += third_party/o/*.o
endif
include ./ogr/file.lst
......
= GDAL/OGR 3.0.3 Release Notes =
The 3.0.3 release is a bug fix release.
== Build ==
* Fix build against Poppler 0.83
* Unix build: do not use absolute path in linking command (#2075)
* Windows build: add HDF5_H5_IS_DLL variable to switch the scenario when HDF5 is built as a DLL (#1931)
* MacOSX builds: Removed unnecessary header include and changed strnlen to CPLStrnlen (#1920)
== Port ==
* /vsicurl (and derived filesystems): fix concurrency issue with multithreaded reads (#1244)
== Algorithms ==
* Contour algorithm: fix (over) precision issue when comparing pixel value to NoData on Float32 rasters (#1987)
* Multithreaded warper: make sure a transformer object is used by the thread which created it (#1989). This workarounds a PROJ bug also fixed per https://github.com/OSGeo/PROJ/pull/1726
* GDALFillNodata: fix crash when smooth_iterations is used, and with some progress functions such as the one used by Python (#1184)
== GDAL core ==
* Block cache: fix corruption on multithreaded write on datasets (#2011)
* GDALUnrolledCopy<GByte,2,1>: fix SSE2-only implementation (when SSSE3 is not available)
== GDAL utilities ==
* gdal2tiles: update cache calculation (#2020)
== GDAL drivers ==
BYN driver:
* based on spec & content of .byn files, fix nodata value for Int32 encoded products
COASP driver:
* fix crash on invalid filename. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19740
IRIS driver:
* make identification more restrictive to avoid false-positive identification of raw binary formats such as ENVI (#1961)
GRIB driver:
* do not do erroneous K->C unit conversion for derived forecasts whose content is not a temperature, but a derived quantity, such as spread
* update GRIB tables to degrib 2.24
* add missing entries in MeteoAtmoChem table
* add more values from Table 4.5 in Surface type table
* add support for template 4.48 Optical Properties of Aerosol
* avoid erroneous K->C conversion for Dew point depression
GTiff driver:
* Do not write TOWGS84 that come from EPSG codes, unless GTIFF_WRITE_TOWGS84=YES is explicitly set
* internal libtiff: tif_ojpeg.c: fix regression of https://gitlab.com/libtiff/libtiff/issues/172
HFA driver:
* fix writing of compressed file when a RLE run count is in the [0x4000,0x8000[ range or [0x400000, 0x800000[ (#2150)
PDF driver:
* fix crash on corrupted file. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19098
* fix use-after-free on some corrupted PDF files. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19400
PDS driver:
* fix opening of datasets with BSQ organization (or single band), where one band is larger than 2 GB (2.3 regression)
* nasakeywordhandler: fixes to be able to read some labels with metadata items whose value is a list on several lines
VRT driver:
* Python support: add Python 3.8 compatibility
* VRT warp: do not fail if a block has no corresponding source pixels (#1985)
* fix requesting a downsampling version of the mask band of a source that has masks and overviews
* avoid Invalid-enum-value behaviour. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19391
WMS driver:
* [AGS]: Remove unused parameters from url
== OGR core ==
* OGRLinearRing::isPointOnRingBoundary(): fix incomplete test that could falsely return true if the point was aligned with a segment, but not between the nodes. Impact correct reconstruction of holes in shapefile driver
* OGRGeometryFactory::ForceTo(): fix crash when forcing a MultiPolygon Z/M/ZM to a CompoundCurve (#2120)
* SQLite dialect: fix issue when using JOIN on a layer without fast filter count capability
== OGR spatial reference ==
* Revise how SRS methods deal with TOWGS84:
- no longer attach a TOWGS84 transformation, unless the user sets the OSR_ADD_TOWGS84_ON_IMPORT_FROM_EPSG=YES configuration option
- Add a OGRSpatialReference::AddGuessedTOWGS84() to attach such a transformation, when possible.
- exportToProj4(): if the SRS has no transformation to WGS84, attach a +towgs84 if the SRS has a EPSG code and AddGuessedToWGS84() succeeds. Can be disabled with the OSR_ADD_TOWGS84_ON_EXPORT_TO_PROJ4 = NO configuration option.
- exportToWkt() with WKT1 format: Add a OSR_ADD_TOWGS84_ON_EXPORT_TO_WKT1 = YES/NO configuration option, which defaults to NO. If set to YES, then a transformation to WGS84 using AddGuessedToWGS84() logic is researched to add a TOWGS84[] node.
* Fix use-after-free issue when destroying a OGRSpatialReference object in a thread when another thread has created it but has been destroy in-between
* Add a OSRGetPROJSearchPaths() function and a SWIG osr.GetPROJVersionMicro()
* Coordinate transformation: add a OSR_CT_USE_DEFAULT_EPSG_TOWGS84 configuration option that can be set to YES to explicit honour default TOWGS84 terms of a EPSG code
* Coordinate transformation: add a OGR_CT_OP_SELECTION=PROJ/BEST_ACCURACY/FIRST_MATCHING config option. With PROJ >= 6.3, make PROJ the default. Otherwise default to BEST_ACCURACY. Previous behaviour was FIRST_MATCHING. BEST_ACCURACY matches closely the behaviour of PROJ 6.3.0, except that it is evaluated just once per call to OGRProjCT::Transform()
* PROJ logging: distinguish PROJ and PROJ_TRACE debug keys for respectively PROJ DEBUG and TRACE levels
== OGR utilities ==
* ogrinfo: fix to output WKT2 SRS by default. Was done correctly for several geometry column, but not single one
== OGR drivers ==
CAD driver:
* Fix read ellipse and arc (fix #1886)
DXF driver:
* fix handling of SPLINE whose first knot is at a very very close to zero negative (#1969)
ElasticSearch driver:
* translate constructs like CAST(field_name AS CHARACTER[(x)]) = 'foo' to ES query language
GeoJSON driver:
* on reading of a file that use crs.name = urn:ogc:def:crs:OGC:1.3:CRS84, report EPSG:4326 as we used to do in GDAL 2 (#2035)
* Advertise UTF-8 encoding of strings. In other words: the StringsAsUTF8 flag is TRUE (#2151).
* add a DATE_AS_STRING open option that can be set to YES to disable autodetection of date/time/datetime
GeoJSONSeq & TopoJSON drivers:
* avoid false positive detection and errors on unrelated http[s]:// filenames
MITAB driver:
* identify correctly GDA2020 datum (fixes https://github.com/OSGeo/PROJ/issues/1752)
* do not set (by default) TOWGS84 when reading a known Datum
OAPIF driver:
* avoid issues with double slash when building a /collections URL
Shapefile driver:
* identify a EPSG code if the confidence is >= 90. Fixes https://github.com/OSGeo/PROJ/issues/1799
VRT driver:
* set OAMS_TRADITIONAL_GIS_ORDER for LayerSRS (#1975)
XLSX driver:
* avoid Invalid-enum-value error. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19337
WFS driver:
* skip silently GeoServer EPSG:404000 dummy CRS
== Python bindings ==
* make the feature iterator on the layer call ResetReading()
* osgeo/__init__.py: add hint&workaround for ImportError on Windows Python >= 3.8
= GDAL/OGR 3.0.2 Release Notes =
 
The 3.0.2 release is a bug fix release.
......
......@@ -564,6 +564,14 @@ CPLErr GDALContourGenerateEx( GDALRasterBandH hBand, void *hLayer,
if ( opt ) {
useNoData = true;
noDataValue = CPLAtof( opt );
if( GDALGetRasterDataType(hBand) == GDT_Float32 )
{
int bClamped = FALSE;
int bRounded = FALSE;
noDataValue = GDALAdjustValueToDataType(GDT_Float32,
noDataValue,
&bClamped, &bRounded );
}
}
int idField = -1;
......
......@@ -71,7 +71,7 @@
#endif
CPL_CVSID("$Id: gdalwarpkernel.cpp 483a697e9d0aeb95719053738a6fd7cd30fec4d7 2019-06-18 18:16:34 +0200 Even Rouault $")
CPL_CVSID("$Id: gdalwarpkernel.cpp 08482d982fe16b91e5b185046d10afb915025f8e 2019-11-12 13:45:30 +0100 Even Rouault $")
constexpr double BAND_DENSITY_THRESHOLD = 0.0000000001;
constexpr float SRC_DENSITY_THRESHOLD = 0.000000001f;
......@@ -204,11 +204,28 @@ struct _GWKJobStruct
int (*pfnProgress)(GWKJobStruct* psJob);
void *pTransformerArg;
// Just used during thread initialization phase.
GDALTransformerFunc pfnTransformerInit;
void *pTransformerArgInit;
void (*pfnFunc)(void*); // used by GWKRun() to assign the proper pTransformerArg
} ;
struct GWKThreadInitData
{
GDALTransformerFunc pfnTransformerInit = nullptr;
void *pTransformerArgInit = nullptr;
void *pTransformerArg = nullptr;
GIntBig nThreadId = 0;
};
struct GWKThreadData
{
CPLWorkerThreadPool* poThreadPool = nullptr;
GWKJobStruct* pasThreadJob = nullptr;
CPLCond* hCond = nullptr;
CPLMutex* hCondMutex = nullptr;
void* pTransformerArgInput = nullptr; // owned by calling layer. Not to be destroyed
std::map<GIntBig, void*> mapThreadToTransformerArg{};
};
/************************************************************************/
/* GWKProgressThread() */
/************************************************************************/
......@@ -277,11 +294,11 @@ static CPLErr GWKGenericMonoThread( GDALWarpKernel *poWK,
static void GWKThreadInitTransformer(void* pData)
{
GWKJobStruct* psJob = static_cast<GWKJobStruct*>(pData);
if( psJob->pTransformerArg == nullptr )
psJob->pTransformerArg =
GDALCloneTransformer(psJob->pTransformerArgInit);
if( psJob->pTransformerArg != nullptr )
GWKThreadInitData* psInitData = static_cast<GWKThreadInitData*>(pData);
if( psInitData->pTransformerArg == nullptr )
psInitData->pTransformerArg =
GDALCloneTransformer(psInitData->pTransformerArgInit);
if( psInitData->pTransformerArg != nullptr )
{
// In case of lazy opening (for example RPCDEM), do a dummy
// transformation to be sure that the DEM is really opened with the
......@@ -291,24 +308,17 @@ static void GWKThreadInitTransformer(void* pData)
double dfZ = 0.0;
int bSuccess = FALSE;
CPLPushErrorHandler(CPLQuietErrorHandler);
psJob->pfnTransformerInit(psJob->pTransformerArg, TRUE, 1,
psInitData->pfnTransformerInit(psInitData->pTransformerArg, TRUE, 1,
&dfX, &dfY, &dfZ, &bSuccess );
CPLPopErrorHandler();
}
psInitData->nThreadId = CPLGetPID();
}
/************************************************************************/
/* GWKThreadsCreate() */
/************************************************************************/
typedef struct
{
CPLWorkerThreadPool* poThreadPool;
GWKJobStruct* pasThreadJob;
CPLCond* hCond;
CPLMutex* hCondMutex;
} GWKThreadData;
void* GWKThreadsCreate( char** papszWarpOptions,
GDALTransformerFunc pfnTransformer,
void* pTransformerArg )
......@@ -328,11 +338,7 @@ void* GWKThreadsCreate( char** papszWarpOptions,
if( nThreads > 128 )
nThreads = 128;
GWKThreadData* psThreadData = static_cast<GWKThreadData *>(
VSI_CALLOC_VERBOSE(1, sizeof(GWKThreadData)));
if( psThreadData == nullptr )
return nullptr;
GWKThreadData* psThreadData = new GWKThreadData();
CPLCond* hCond = nullptr;
if( nThreads )
hCond = CPLCreateCond();
......@@ -360,18 +366,22 @@ void* GWKThreadsCreate( char** papszWarpOptions,
}
CPLReleaseMutex(psThreadData->hCondMutex);
std::vector<std::unique_ptr<GWKThreadInitData>> apoInitData;
std::vector<void*> apInitData;
for( int i = 0; i < nThreads; i++ )
{
psThreadData->pasThreadJob[i].hCond = psThreadData->hCond;
psThreadData->pasThreadJob[i].hCondMutex = psThreadData->hCondMutex;
psThreadData->pasThreadJob[i].pfnTransformerInit = pfnTransformer;
psThreadData->pasThreadJob[i].pTransformerArgInit = pTransformerArg;
std::unique_ptr<GWKThreadInitData> poInitData(new GWKThreadInitData());
poInitData->pfnTransformerInit = pfnTransformer;
poInitData->pTransformerArgInit = pTransformerArg;
if( i == 0 )
psThreadData->pasThreadJob[i].pTransformerArg = pTransformerArg;
poInitData->pTransformerArg = pTransformerArg;
else
psThreadData->pasThreadJob[i].pTransformerArg = nullptr;
apInitData.push_back(&(psThreadData->pasThreadJob[i]));
poInitData->pTransformerArg = nullptr;
apoInitData.push_back(std::move(poInitData));
apInitData.push_back(apoInitData.back().get());
}
psThreadData->poThreadPool = new (std::nothrow) CPLWorkerThreadPool();
......@@ -386,7 +396,7 @@ void* GWKThreadsCreate( char** papszWarpOptions,
for( int i = 1; i < nThreads; i++ )
{
if( psThreadData->pasThreadJob[i].pTransformerArg == nullptr )
if( apoInitData[i]->pTransformerArg == nullptr )
{
CPLDebug("WARP", "Cannot deserialize transformer");
bTransformerCloningSuccess = false;
......@@ -394,13 +404,24 @@ void* GWKThreadsCreate( char** papszWarpOptions,
}
}
if( !bTransformerCloningSuccess )
if( bTransformerCloningSuccess )
{
psThreadData->pTransformerArgInput = pTransformerArg;
for( int i = 0; i < nThreads; i++ )
{
const auto nThreadId = apoInitData[i]->nThreadId;
CPLAssert(psThreadData->mapThreadToTransformerArg.find(nThreadId) ==
psThreadData->mapThreadToTransformerArg.end());
psThreadData->mapThreadToTransformerArg[nThreadId] =
apoInitData[i]->pTransformerArg;
}
}
else
{
for( int i = 1; i < nThreads; i++ )
{
if( psThreadData->pasThreadJob[i].pTransformerArg )
GDALDestroyTransformer(psThreadData->
pasThreadJob[i].pTransformerArg);
if( apoInitData[i]->pTransformerArg )
GDALDestroyTransformer(apoInitData[i]->pTransformerArg);
}
CPLFree(psThreadData->pasThreadJob);
psThreadData->pasThreadJob = nullptr;
......@@ -427,15 +448,10 @@ void GWKThreadsEnd( void* psThreadDataIn )
GWKThreadData* psThreadData = static_cast<GWKThreadData *>(psThreadDataIn);
if( psThreadData->poThreadPool )
{
const int nThreads = psThreadData->poThreadPool->GetThreadCount();
if( psThreadData->pasThreadJob )
for( auto& pair: psThreadData->mapThreadToTransformerArg )
{
for( int i = 1; i < nThreads; i++ )
{
if( psThreadData->pasThreadJob[i].pTransformerArg )
GDALDestroyTransformer(psThreadData->
pasThreadJob[i].pTransformerArg);
}
if( pair.second != psThreadData->pTransformerArgInput )
GDALDestroyTransformer(pair.second);
}
delete psThreadData->poThreadPool;
}
......@@ -444,9 +460,27 @@ void GWKThreadsEnd( void* psThreadDataIn )
CPLDestroyCond(psThreadData->hCond);
if( psThreadData->hCondMutex )
CPLDestroyMutex(psThreadData->hCondMutex);
CPLFree(psThreadData);
delete psThreadData;
}
/************************************************************************/
/* ThreadFuncAdapter() */
/************************************************************************/
static void ThreadFuncAdapter(void* pData)
{
// Assign the pTransformerArg created in the current thread to this job
// This workarounds the PROJ bug fixed in https://github.com/OSGeo/PROJ/pull/1726
GWKJobStruct* psJob = static_cast<GWKJobStruct *>(pData);
const GWKThreadData* psThreadData =
static_cast<const GWKThreadData*>(psJob->poWK->psThreadData);
auto oIter = psThreadData->mapThreadToTransformerArg.find(CPLGetPID());
CPLAssert(oIter != psThreadData->mapThreadToTransformerArg.end());
psJob->pTransformerArg = oIter->second;
psJob->pfnFunc(pData);
}
/************************************************************************/
/* GWKRun() */
/************************************************************************/
......@@ -519,7 +553,8 @@ static CPLErr GWKRun( GDALWarpKernel *poWK,
psThreadData->pasThreadJob[i].pfnProgress = GWKProgressThread;
else
psThreadData->pasThreadJob[i].pfnProgress = nullptr;
psThreadData->poThreadPool->SubmitJob( pfnFunc,
psThreadData->pasThreadJob[i].pfnFunc = pfnFunc;
psThreadData->poThreadPool->SubmitJob( ThreadFuncAdapter,
static_cast<void*>(&psThreadData->pasThreadJob[i]) );
}
......
......@@ -53,7 +53,7 @@
#include "ogr_api.h"
#include "ogr_core.h"
CPL_CVSID("$Id: gdalwarpoperation.cpp fc772a7e94b9c97f62a72e3eab60fa20b97b9f92 2019-08-12 01:18:04 +0200 Even Rouault $")
CPL_CVSID("$Id: gdalwarpoperation.cpp 776e6027755b1ec5045a2592c565ec164fca0d73 2019-11-12 14:20:18 +0100 Even Rouault $")
struct _GDALWarpChunk {
int dx, dy, dsx, dsy;
......@@ -447,6 +447,19 @@ int GDALWarpOperation::ValidateOptions()
return FALSE;
}
const bool bErrorOutIfEmptySourceWindow = CPLFetchBool(
psOptions->papszWarpOptions,
"ERROR_OUT_IF_EMPTY_SOURCE_WINDOW", true);
if( !bErrorOutIfEmptySourceWindow &&
CSLFetchNameValue(psOptions->papszWarpOptions, "INIT_DEST") == nullptr )
{
CPLError( CE_Failure, CPLE_IllegalArg,
"GDALWarpOptions.Validate(): "
"ERROR_OUT_IF_EMPTY_SOURCE_WINDOW=FALSE can only be used "
"if INIT_DEST is set");
return FALSE;
}
return TRUE;
}
......@@ -1769,7 +1782,14 @@ CPLErr GDALWarpOperation::WarpRegionToBuffer(
if( hWarpMutex != nullptr )
CPLReleaseMutex( hWarpMutex );
if( eErr != CE_None )
{
const bool bErrorOutIfEmptySourceWindow = CPLFetchBool(
psOptions->papszWarpOptions,
"ERROR_OUT_IF_EMPTY_SOURCE_WINDOW", true);
if( !bErrorOutIfEmptySourceWindow )
return CE_None;
return eErr;
}
}
/* -------------------------------------------------------------------- */
......@@ -2719,10 +2739,21 @@ CPLErr GDALWarpOperation::ComputeSourceWindow(
/* -------------------------------------------------------------------- */
if( nFailedCount > nSamplePoints - 5 )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Too many points (%d out of %d) failed to transform, "
"unable to compute output bounds.",
nFailedCount, nSamplePoints );
const bool bErrorOutIfEmptySourceWindow = CPLFetchBool(
psOptions->papszWarpOptions,
"ERROR_OUT_IF_EMPTY_SOURCE_WINDOW", true);
if( bErrorOutIfEmptySourceWindow )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Too many points (%d out of %d) failed to transform, "
"unable to compute output bounds.",
nFailedCount, nSamplePoints );
}
else
{
CPLDebug("WARP", "Cannot determine source window for %d,%d,%d,%d",
nDstXOff, nDstYOff, nDstXSize, nDstYSize);
}
return CE_Failure;
}
......
......@@ -45,7 +45,7 @@
#include "cpl_vsi.h"
#include "gdal.h"
CPL_CVSID("$Id: rasterfill.cpp c23515b39f088883adf93428c484747e4dcf3a56 2019-02-04 15:11:12 +0100 Even Rouault $")
CPL_CVSID("$Id: rasterfill.cpp 47fc5963633c59f05e820ca575bbddfe88573739 2020-01-07 21:15:46 +0100 Even Rouault $")
/************************************************************************/
/* GDALFilterLine() */
......@@ -875,7 +875,7 @@ GDALFillNodata( GDALRasterBandH hTargetBand,
GDALFlushRasterCache( hMaskBand );
void *pScaledProgress =
GDALCreateScaledProgress( dfProgressRatio, 1.0, pfnProgress, nullptr );
GDALCreateScaledProgress( dfProgressRatio, 1.0, pfnProgress, pProgressArg );
eErr = GDALMultiFilter( hTargetBand, hMaskBand, hFiltMaskBand,
nSmoothingIterations,
......
......@@ -53,7 +53,7 @@
#include "ogrsf_frmts.h"
CPL_CVSID("$Id: ogrinfo.cpp b628c5c75561341c377d2356a2c3d24af1d7756b 2019-03-28 23:35:51 +0100 Even Rouault $")
CPL_CVSID("$Id: ogrinfo.cpp 89c0d84eefe6b89d8f5d3b35781ccbddd1dccbad 2019-12-18 12:11:59 +0100 Even Rouault $")
bool bVerbose = true;
bool bSuperQuiet = false;
......@@ -349,7 +349,11 @@ static void ReportOnLayer( OGRLayer * poLayer, const char *pszWHERE,
}
else
{
poSRS->exportToPrettyWkt(&pszWKT);
CPLString osWKTFormat("FORMAT=");
osWKTFormat += pszWKTFormat;
const char* const apszWKTOptions[] =
{ osWKTFormat.c_str(), "MULTILINE=YES", nullptr };
poSRS->exportToWkt(&pszWKT, apszWKTOptions);
}
printf("Layer SRS WKT:\n%s\n", pszWKT);
......
......@@ -23,13 +23,15 @@ $SCRIPT_DIR/../common_install.sh
# Build proj
(cd proj; ./autogen.sh && CFLAGS='-DPROJ_RENAME_SYMBOLS' CXXFLAGS='-DPROJ_RENAME_SYMBOLS' PKG_CONFIG_PATH="/usr/local/opt/sqlite/lib/pkgconfig" ./configure --disable-static --prefix=/tmp/install && make -j3 && make -j3 install)
rm /tmp/install/lib/libproj.la
rm /tmp/install/lib/libproj.dylib
mv /tmp/install/lib/libproj.15.dylib /tmp/install/lib/libinternalproj.15.dylib
ln -s libinternalproj.15.dylib /tmp/install/lib/libinternalproj.dylib
find /tmp/install/lib
# build GDAL
cd gdal
./configure --prefix=$HOME/install-gdal --enable-debug --with-jpeg12 --with-geotiff=internal --with-png=internal --with-proj=/tmp/install --with-sqlite3=/usr/local/opt/sqlite
./configure --prefix=$HOME/install-gdal --enable-debug --with-jpeg12 --with-geotiff=internal --with-png=internal --with-proj=/tmp/install --with-sqlite3=/usr/local/opt/sqlite --without-pg --without-jasper --without-webp --without-netcdf
make USER_DEFS="-Wextra -Werror" -j3
cd apps
make USER_DEFS="-Wextra -Werror" test_ogrsf
......
......@@ -2,7 +2,7 @@
set -e
export PYTHONPATH=$PWD/gdal/swig/python/build/lib.macosx-10.12-intel-2.7:$PWD/gdal/swig/python/build/lib.macosx-10.11-x86_64-2.7:$PWD/gdal/swig/python/build/lib.macosx-10.12-x86_64-2.7
export PYTHONPATH=$PWD/gdal/swig/python/build/lib.macosx-10.13-x86_64-2.7
export PYTEST="pytest -vv -p no:sugar --color=no"
echo 'Running CPP unit tests'
......
gdal (3.0.2+dfsg-1~exp2) UNRELEASED; urgency=medium
gdal (3.0.3~rc1+dfsg-1) experimental; urgency=medium
* New upstream release candidate.
-- Bas Couwenberg <sebastic@debian.org> Wed, 08 Jan 2020 14:33:12 +0100
gdal (3.0.2+dfsg-1) unstable; urgency=medium
* Drop Provides: ${python3:Provides}.
* Drop Name field from upstream metadata.
* Add lintian overrides for manpage issues.
* Add lintian override for no-dh-sequencer.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Thu, 07 Nov 2019 18:38:01 +0100
-- Bas Couwenberg <sebastic@debian.org> Wed, 08 Jan 2020 05:51:12 +0100
gdal (3.0.2+dfsg-1~exp1) experimental; urgency=medium
......@@ -123,6 +132,44 @@ gdal (2.5.0~beta1+dfsg-1~exp1) experimental; urgency=medium
-- Bas Couwenberg <sebastic@debian.org> Fri, 19 Apr 2019 15:34:30 +0200
gdal (2.4.3+dfsg-2) UNRELEASED; urgency=medium
* Drop Provides: ${python3:Provides}.
-- Bas Couwenberg <sebastic@debian.org> Thu, 07 Nov 2019 18:38:01 +0100
gdal (2.4.3+dfsg-1) unstable; urgency=medium
* New upstream release.
* Update watch file for 2.4.x releases.
* Drop CVE-2019-17545.patch, included upstream.
* Drop Python 2 support.
(closes: #936590)
-- Bas Couwenberg <sebastic@debian.org> Mon, 04 Nov 2019 12:59:11 +0100
gdal (2.4.2+dfsg-2) unstable; urgency=medium
* Bump Standards-Version to 4.4.1, no changes.
* Update PIE hardening conditional, trusty is EOL.
* Re-enable CFITSIO support, license issues are resolved.
(closes: #932464)
* Add upstream patch to fix CVE-2019-17545.
* Add lintian override for spelling-error-in-binary.
* Add lintian override for spelling-error-in-binary false positive.
* Update lintian overrides for file-references-package-build-path.
-- Bas Couwenberg <sebastic@debian.org> Tue, 15 Oct 2019 09:42:55 +0200
gdal (2.4.2+dfsg-1) unstable; urgency=medium
* New upstream release.
* Update gbp.conf to use --source-only-changes by default.
* Update watch file to check version directories.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Sun, 07 Jul 2019 14:13:35 +0200
gdal (2.4.1+dfsg-1~exp1) experimental; urgency=medium
* New upstream release.
......@@ -136,6 +183,7 @@ gdal (2.4.1~rc1+dfsg-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Add -DACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1 to CFLAGS for PROJ 6.0.0.
* Update ogdi (build) dependencies for 4.0.0.
* Update watch file for 2.4.1 pre-releases.
* Refresh patches.
* Drop package name from lintian overrides.
......
......@@ -190,10 +190,8 @@ Depends: python3-gdal (= ${binary:Version}),
${misc:Depends}
Suggests: libgdal-grass
Breaks: gdal-bin (<< 1.10.0-0~),
python-gdal (<< 2.5.0~),
python3-gdal (<< 3.0.1+dfsg-1~exp3~)
Replaces: python-gdal (<< 2.5.0~),
python3-gdal (<< 3.0.1+dfsg-1~exp3~)
python-gdal (<< 2.4.3~)
Replaces: python-gdal (<< 2.4.3~)
Description: Geospatial Data Abstraction Library - Utility programs
GDAL is a translator library for raster geospatial data formats.
As a library, it presents a single abstract data model to the
......
# Man pages are automatically generated with sphinx.
hyphen-used-as-minus-sign
manpage-has-errors-from-man
binary-without-manpage
hyphen-used-as-minus-sign *
manpage-has-errors-from-man *
binary-without-manpage *
manpage-without-executable *
manpage-has-bad-whatis-entry *
# Breaks for python-gdal vs gdal-bin due to gdal_retile.1 collision
# in pre-1.10 versions distributed in experimental. Just for safety.
......
# Man pages are automatically generated with sphinx.
hyphen-used-as-minus-sign
hyphen-used-as-minus-sign *
manpage-has-bad-whatis-entry *
# False positive on: "(319) 369-3131"
copyright-year-in-future 3131 *
......
......@@ -740,7 +740,7 @@
GDALRegister_Envisat@Base 1.8.0
GDALRegister_FAST@Base 1.8.0
GDALRegister_FIT@Base 1.8.0
GDALRegister_FITS@Base 3.0.1
GDALRegister_FITS@Base 2.4.2
GDALRegister_FujiBAS@Base 1.8.0
GDALRegister_GFF@Base 1.8.0
GDALRegister_GIF@Base 1.8.0
......
# Not worth the effort
testsuite-autopkgtest-missing
# False positive, sequencer is excluded for custom targets
no-dh-sequencer
......@@ -39,7 +39,7 @@
#include "gdal_frmts.h"
#include "gdal_priv.h"
CPL_CVSID("$Id: coasp_dataset.cpp e13dcd4dc171dfeed63f912ba06b9374ce4f3bb2 2018-03-18 21:37:41Z Even Rouault $")
CPL_CVSID("$Id: coasp_dataset.cpp a7ae5e6f64689138615e640994f9b38739231873 2019-12-30 13:20:40 +0100 Even Rouault $")
constexpr int TYPE_GENERIC = 0;
constexpr int TYPE_GEOREF = 1;
......@@ -388,9 +388,6 @@ GDALDataset *COASPDataset::Open( GDALOpenInfo *poOpenInfo )
/* Create a fresh dataset for us to work with */
COASPDataset *poDS = new COASPDataset();
if (poDS == nullptr)
return nullptr;
/* Steal the file pointer for the header */
poDS->fpHdr = poOpenInfo->fpL;
poOpenInfo->fpL = nullptr;
......@@ -402,6 +399,13 @@ GDALDataset *COASPDataset::Open( GDALOpenInfo *poOpenInfo )
char *pszDir = VSIStrdup(CPLGetPath(poDS->pszFileName));
const char *pszExt = "rc";
int nNull = static_cast<int>(strlen(pszBaseName)) - 1;
if( nNull <= 0 )
{
VSIFree(pszDir);
VSIFree(pszBaseName);
delete poDS;
return nullptr;
}
char *pszBase = (char *)CPLMalloc(nNull);
strncpy(pszBase, pszBaseName, nNull);
pszBase[nNull - 1] = '\0';
......
......@@ -3,6 +3,9 @@ PROVENANCE
This directory contains a *modified* version of degrib 2.14:
http://www.mdl.nws.noaa.gov/~degrib/download/archive/degrib-20171016.tar.gz
With metaname.cpp update to degrib 2.24:
https://sats.nws.noaa.gov/~degrib/download/archive/degrib-20190620.tar.gz
and a *modified* version of g2clib 1.6.0:
http://www.nco.ncep.noaa.gov/pmb/codes/GRIB2/g2clib-1.6.0.tar (Last updated: 02/18/2016)
......
......@@ -524,9 +524,10 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
&& (templat != GS4_RADAR) && (templat != GS4_SATELLITE)
&& (templat != GS4_SATELLITE_SYNTHETIC)
&& (templat != GS4_DERIVED_INTERVAL)
&& (templat != GS4_ANALYSIS_CHEMICAL) ) {
&& (templat != GS4_ANALYSIS_CHEMICAL)
&& (templat != GS4_OPTICAL_PROPERTIES_AEROSOL) ) {
errSprintf ("This was only designed for templates 0, 1, 2, 5, 6, 7, 8, 9, "
"10, 11, 12, 15, 20, 30, 32, 40. Template found = %d\n", templat);
"10, 11, 12, 15, 20, 30, 32, 40, 48. Template found = %d\n", templat);
inv->validTime = 0;
inv->foreSec = 0;
......@@ -556,19 +557,22 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
}
return 1;
}
if( secLen < 19 - 5 + 4 )
unsigned nOffset = 0;
if( templat == GS4_ANALYSIS_CHEMICAL ) {
nOffset = 16 - 14;
}
else if( templat == GS4_OPTICAL_PROPERTIES_AEROSOL )
{
nOffset = 38 - 14;
}
if( secLen < nOffset + 19 - 5 + 4 )
return -8;
cat = (*buffer)[10 - 5];
subcat = (*buffer)[11 - 5];
if( templat == GS4_ANALYSIS_CHEMICAL )
{
if( secLen < 21 - 5 + 4 )
return -8;
genProcess = (*buffer)[14 - 5];
}
else
genProcess = (*buffer)[12 - 5];
genProcess = (*buffer)[nOffset + 12 - 5];
genID = 0;
probType = 0;
lowerProb = 0;
......@@ -581,10 +585,6 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
timeRangeUnit = 255;
lenTime = 0;
} else {
int nOffset = 0;
if( templat == GS4_ANALYSIS_CHEMICAL ) {
nOffset = 2;
}
genID = (*buffer)[nOffset + 14 - 5];
/* Compute forecast time. */
foreTimeUnit = (*buffer)[nOffset + 18 - 5];
......@@ -728,6 +728,22 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
}
}
uChar derivedFcst = (uChar)-1; // not determined
switch (templat) {
case GS4_DERIVED:
case GS4_DERIVED_CLUSTER_RECTANGULAR_AREA:
case GS4_DERIVED_CLUSTER_CIRCULAR_AREA:
case GS4_DERIVED_INTERVAL:
case GS4_DERIVED_INTERVAL_CLUSTER_RECTANGULAR_AREA:
case GS4_DERIVED_INTERVAL_CLUSTER_CIRCULAR_AREA:
if( secLen >= 35 ) {
derivedFcst = (uChar) (*buffer)[35 - 5];
}
break;
default:
break;
}
if (timeRangeUnit == 255) {
timeRangeUnit = 1;
lenTime = DoubleToSInt4Clamp(
......@@ -820,11 +836,6 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
sndSurfValue = 0;
f_sndValue = 0;
} else {
unsigned int nOffset = 0;
if( templat == GS4_ANALYSIS_CHEMICAL ) {
nOffset = 2;
}
if( secLen < nOffset + 31 - 5 + 4)
return -8;
fstSurfType = (*buffer)[nOffset + 23 - 5];
......@@ -859,7 +870,9 @@ enum { GS4_ANALYSIS, GS4_ENSEMBLE, GS4_DERIVED, GS4_PROBABIL_PNT = 5,
/* Find out what the name of this variable is. */
ParseElemName (mstrVersion, center, subcenter, prodType, templat, cat, subcat,
lenTime, timeRangeUnit, statProcessID, timeIncrType, genID, probType, lowerProb,
upperProb, &(inv->element), &(inv->comment),
upperProb,
derivedFcst,
&(inv->element), &(inv->comment),
&(inv->unitName), &convert, percentile, genProcess,
f_fstValue, fstSurfValue, f_sndValue, sndSurfValue);
......