Skip to content
Commits on Source (6)
......@@ -274,11 +274,6 @@ ifeq ($(HAVE_XERCES),yes)
CPPFLAGS += -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS)
endif
#
# Enable NAS format
#
HAVE_NAS = @HAVE_NAS@
#
# Expat XML Parser for KML, GPX, GeoRSS (and GML if no Xerces C++)
#
......@@ -446,10 +441,6 @@ GIF_SETTING = @GIF_SETTING@
FITS_SETTING = @FITS_SETTING@
OGDI_SETTING = @HAVE_OGDI@
ODBC_SETTING = @ODBC_SETTING@
# PGeo driver is built-in when ODBC is available
PGEO_SETTING = @ODBC_SETTING@
MSSQLSPATIAL_SETTING = @ODBC_SETTING@
GEOMEDIA_SETTING = @ODBC_SETTING@
NETCDF_SETTING = @NETCDF_SETTING@
LIBZ_SETTING = @LIBZ_SETTING@
LIBLZMA_SETTING = @LIBLZMA_SETTING@
......@@ -581,10 +572,6 @@ ifneq ($(PCIDSK_SETTING),no)
GDAL_FORMATS += pcidsk
endif
ifeq ($(HAVE_SQLITE),yes)
GDAL_FORMATS := $(GDAL_FORMATS) rasterlite mbtiles
endif
ifeq ($(HAVE_POSTGISRASTER),yes)
GDAL_FORMATS := $(GDAL_FORMATS) postgisraster
endif
......
= GDAL/OGR 2.5.0 Release Notes (Preliminary, up to 0f569d394dc77da244c8cc1d5d791e0bbe5010c6) =
= GDAL/OGR 2.5.0 Release Notes =
 
== In a nutshell... ==
 
......@@ -15,6 +15,7 @@
- PDF: add a COMPOSITION_FILE creation option to generate a complex document
- PDS4: subdataset creation support, read/write table/vector support
* Support for minimal builds on Unix (#1250)
* Add a docker/ directory with Dockerfile for different configurations
* Continued code linting
 
== New installed files ==
......@@ -48,7 +49,7 @@ All:
* PROJ >= 6.0 is a required external dependency
* libgeotiff >= 1.5 should be used for builds with external libgeotiff
* Poppler: drop support for Poppler older than 0.23.0
* Poppler: add support for 0.72.0, 0.73.0, 0.75.0
* Poppler: add support for 0.72.0, 0.73.0, 0.75.0, 0.76.0
 
== GDAL X.Y.Z - Overview of Changes ==
 
......@@ -57,7 +58,7 @@ Port:
* MiniXML: Fix wrong node order when calling CPLAddXMLAttributeAndValue() after CPLCreateXMLElementAndValue()
* /vsicurl/: ReadMultiRange(): use default implementation if there is a single range (#1206)
* /vsicurl/: ignore proxy CONNECT response headers (#1211)
* /vsicurl/: automatically detect signed URLs where host ends with a port number; also detect signed URLs as created iwth the AWS4-HMAC-SHA256 method (#1456)
* /vsicurl/: automatically detect signed URLs where host ends with a port number; also detect signed URLs as created with the AWS4-HMAC-SHA256 method (#1456)
* /vsizip/: Add config option to create zip64 extra fields by default (#1267)
* /vsis3/, /vsigs/, /vsiaz/: add HTTP retry logic in writing code paths
* Fix data race in VSIFileManager::Get
......@@ -75,6 +76,7 @@ Core:
* RasterBand/Dataset::RasterIO(): enforce access mode on write
* PAM: preserve existing metadata when setting new one (#1430)
* RawDataset: use generic RasterIO() implementation when non-nearest resampling is asked (#1301)
* DumpJPK2CodeStream(): dump PLT and POC markers
 
Algorithms:
* RPC transformer: test success code of GDALRPCTransform() in GDALCreateRPCTransformer()
......@@ -88,6 +90,7 @@ Algorithms:
* rasterize: fix crash when working buffer is larger than 2GB (#1338)
 
Utilities:
* gdal_translate: add "-nogcp" option (#1469)
* gdaldem hillshade: add -igor option (#1330)
* gdalwarp -crop_to_cutline: do not round computed target extent to be aligned on the grid of the source raster if -tr is set (restore partially pre 2.4 behaviour) (#1173)
* gdalwarp: assume -tap when using -crop_to_cutline, -tr and -wo CUTLINE_ALL_TOUCHED=TRUE, so as to avoid issues with polygons smaller than 1x1 pixels (#1360)
......@@ -159,6 +162,9 @@ MRF driver:
* sparse index and internal resampling fixes
* fix integer overflow. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13974
 
MrSID driver:
* fix potential crash when a zoom level cannot be opened
netCDF driver:
* implement support for NetCDF-4 groups on reading (#1180)
* support complex data types (#1218)
......@@ -179,6 +185,7 @@ PCIDSK driver:
PDF driver:
* Add a COMPOSITION_FILE creation option to generate a complex document
* And a gdal_create_pdf.py sample script
* Fix selection of Poppler PDF layers with duplicate names (#1477)
* avoid division by zero when generating from vector content whose bounding box is almost a horizontal or vertical line. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13408
 
PDS3:
......@@ -206,6 +213,7 @@ XPM driver:
 
XYZ driver:
* add creation options DECIMAL_PRECISION and SIGNIFICANT_DIGITS like with AAIGrid
* fix regression regarding header lines that are not X,Y,Z (#1472)
 
== OGR X.Y.Z - Overview of Changes ==
 
......@@ -271,6 +279,9 @@ GMLAS driver:
* avoid null pointer dereference on some schemas
* do not use space as separator for schema filename in XSD open option (#1452)
 
GMT driver:
* use file extension based detection to accept files without header (#1461)
MongoDB driver:
* fix releated to filters in GetFeature()
 
......@@ -317,7 +328,7 @@ PGDump driver:
* Fix emitted SQL when UNLOGGED=ON
 
PLScenes driver:
* update plscenesconf.json with SkySatCollect
* update plscenesconf.json with SkySatCollect and add missing fields for PSOrthoTile
 
SDTS driver:
* error out if too many errors are raised to avoid timeout in oss-fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13819.
......@@ -356,7 +367,7 @@ All bindings:
Python bindings:
* fix Dataset.ReadAsRaster() on CInt16 data type (#82)
* adding overviewLevel option to WarpOptions
* add noGCP options to gdal.Translate()
 
= GDAL/OGR 2.4.0 Release Notes =
 
......
......@@ -47,13 +47,13 @@ struct Point
};
inline
bool operator==(Point lhs, Point rhs)
bool operator==(const Point& lhs, const Point& rhs)
{
return (lhs.x == rhs.x) && (lhs.y == rhs.y);
}
inline
std::ostream & operator<<(std::ostream & o, Point p)
std::ostream & operator<<(std::ostream & o, const Point& p)
{
o << p.x << " " << p.y;
return o;
......
......@@ -34,7 +34,7 @@
#include "commonutils.h"
#include "gdal_utils_priv.h"
CPL_CVSID("$Id: gdal_translate_bin.cpp 7601a637dfd204948d00f4691c08f02eb7584de5 2019-04-12 04:29:21 -0500 Norman Barker $")
CPL_CVSID("$Id: gdal_translate_bin.cpp 743d0ce0d7ea6bdc710b6b2950d1e8c34243797f 2019-04-23 08:10:30 -0400 fechen123 $")
/* ******************************************************************* */
/* Usage() */
......@@ -56,7 +56,7 @@ static void Usage(const char* pszErrorMsg, int bShort)
" [-projwin ulx uly lrx lry] [-projwin_srs srs_def]\n"
" [-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value]\n"
" [-a_scale value] [-a_offset value]\n"
" [-gcp pixel line easting northing [elevation]]*\n"
" [-nogcp] [-gcp pixel line easting northing [elevation]]*\n"
" |-colorinterp{_bn} {red|green|blue|alpha|gray|undefined}]\n"
" |-colorinterp {red|green|blue|alpha|gray|undefined},...]\n"
" [-mo \"META-TAG=VALUE\"]* [-q] [-sds]\n"
......
......@@ -54,7 +54,7 @@
#include "ogr_spatialref.h"
#include "vrtdataset.h"
CPL_CVSID("$Id: gdal_translate_lib.cpp 7601a637dfd204948d00f4691c08f02eb7584de5 2019-04-12 04:29:21 -0500 Norman Barker $")
CPL_CVSID("$Id: gdal_translate_lib.cpp 743d0ce0d7ea6bdc710b6b2950d1e8c34243797f 2019-04-23 08:10:30 -0400 fechen123 $")
static int ArgIsNumeric( const char * );
static void AttachMetadata( GDALDatasetH, char ** );
......@@ -192,6 +192,9 @@ struct GDALTranslateOptions
GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. */
char *pszOutputSRS;
/*! does not copy source GCP into destination dataset (when TRUE) */
bool bNoGCP;
/*! number of GCPS to be added to the output dataset */
int nGCPCount;
......@@ -927,6 +930,7 @@ GDALDatasetH GDALTranslate( const char *pszDest, GDALDatasetH hSrcDataset,
&& CSLCount(psOptions->papszMetadataOptions) == 0 && bAllBandsInOrder
&& psOptions->eMaskMode == MASK_AUTO
&& bSpatialArrangementPreserved
&& !psOptions->bNoGCP
&& psOptions->nGCPCount == 0 && !bGotBounds
&& psOptions->pszOutputSRS == nullptr && !psOptions->bSetNoData && !psOptions->bUnsetNoData
&& psOptions->nRGBExpand == 0 && !psOptions->bNoRAT
......@@ -1215,7 +1219,7 @@ GDALDatasetH GDALTranslate( const char *pszDest, GDALDatasetH hSrcDataset,
poVDS->SetGCPs( psOptions->nGCPCount, psOptions->pasGCPs, pszGCPProjection );
}
else if( GDALGetGCPCount( hSrcDataset ) > 0 )
else if( !psOptions->bNoGCP && GDALGetGCPCount( hSrcDataset ) > 0 )
{
const int nGCPs = GDALGetGCPCount(hSrcDataset);
......@@ -2104,6 +2108,7 @@ GDALTranslateOptions *GDALTranslateOptionsNew(char** papszArgv, GDALTranslateOpt
psOptions->dfLRX = 0.0;
psOptions->dfLRY = 0.0;
psOptions->pszOutputSRS = nullptr;
psOptions->bNoGCP = false;
psOptions->nGCPCount = 0;
psOptions->pasGCPs = nullptr;
psOptions->adfULLR[0] = 0;
......@@ -2254,6 +2259,10 @@ GDALTranslateOptions *GDALTranslateOptionsNew(char** papszArgv, GDALTranslateOpt
if( psOptionsForBinary )
psOptionsForBinary->bCopySubDatasets = TRUE;
}
else if (EQUAL(papszArgv[i], "-nogcp"))
{
psOptions->bNoGCP = true;
}
else if( i + 4 < argc && EQUAL(papszArgv[i],"-gcp") )
{
/* -gcp pixel line easting northing [elev] */
......@@ -2647,6 +2656,14 @@ GDALTranslateOptions *GDALTranslateOptionsNew(char** papszArgv, GDALTranslateOpt
}
}
if (psOptions->nGCPCount > 0 && psOptions->bNoGCP)
{
CPLError(CE_Failure, CPLE_IllegalArg,
"-nogcp and -gcp cannot be used as the same time" );
GDALTranslateOptionsFree(psOptions);
return nullptr;
}
if( bOutsideExplicitlySet &&
psOptions->nOXSizePixel == 0 && psOptions->dfOXSizePct == 0.0 &&
psOptions->nOYSizePixel == 0 && psOptions->dfOYSizePct == 0.0 )
......
#ifndef DOXYGEN_SKIP
/* $Id: gdal_utilities.dox 2bfb2825ccf7bff1ab4ed0c6bc069cafab1598c3 2019-04-12 19:27:30 +0200 Even Rouault $ */
/* $Id: gdal_utilities.dox 743d0ce0d7ea6bdc710b6b2950d1e8c34243797f 2019-04-23 08:10:30 -0400 fechen123 $ */
#endif /* DOXYGEN_SKIP */
/*!
......@@ -176,7 +176,7 @@ and exit.
\htmlonly
<p>
$Id: gdal_utilities.dox 2bfb2825ccf7bff1ab4ed0c6bc069cafab1598c3 2019-04-12 19:27:30 +0200 Even Rouault $
$Id: gdal_utilities.dox 743d0ce0d7ea6bdc710b6b2950d1e8c34243797f 2019-04-23 08:10:30 -0400 fechen123 $
</p>
\endhtmlonly
*/
......@@ -327,7 +327,7 @@ gdal_translate [--help-general]
[-projwin ulx uly lrx lry] [-projwin_srs srs_def]
[-a_srs srs_def] [-a_ullr ulx uly lrx lry] [-a_nodata value]
[-a_scale value] [-a_offset value]
[-gcp pixel line easting northing [elevation]]*
[-nogcp] [-gcp pixel line easting northing [elevation]]*
|-colorinterp{_bn} {red|green|blue|alpha|gray|undefined}]
|-colorinterp {red|green|blue|alpha|gray|undefined},...]
[-mo "META-TAG=VALUE"]* [-q] [-sds]
......@@ -458,6 +458,9 @@ value to set on the output dataset if possible.</dd>
output format driver. Multiple <b>-co</b> options may be listed. See <a class="el"
href="formats_list.html" title="GDAL Raster Formats">format specific
documentation for legal creation options for each format</a>.</dd>
<dt> <b>-nogcp</b></dt><dd>
Do not copy the GCPs in the source dataset to the output dataset.
</dd>
<dt> <b>-gcp</b> <i>pixel line easting northing elevation</i>:</dt><dd>
Add the indicated ground control point to the output dataset. This option
may be provided multiple times to provide a set of GCPs.
......
This diff is collapsed.
......@@ -1354,9 +1354,15 @@ OGRFORMATS_ENABLED_CFLAGS=
OGRFORMATS_DISABLED=
AC_DEFUN([INTERNAL_FORMATS],[aaigrid adrg aigrid airsar arg blx bmp bsb cals ceos ceos2 coasp cosar ctg dimap dted e00grid elas envisat ers fit gff gsg gxf hf2 idrisi ignfheightasciigrid ilwis ingr iris iso8211 jaxapalsar jdem kmlsuperoverlay l1b leveller map mrf msgn ngsgeoid nitf northwood pds prf r raw rmf rs2 safe saga sdts sentinel2 sgi sigdem srtmhgt terragen til tsx usgsdem xpm xyz zmap])
AC_DEFUN([INTERNAL_OPT_FORMATS],[eeda grib plmosaic ozi pdf rda rik wcs wms wmts daas])
AC_DEFUN([INTERNAL_OPT_FORMATS],[grib ozi pdf rik])
AC_DEFUN([INTERNAL_DRIVERS],[aeronavfaa arcgen avc bna cad csv dgn dxf edigeo geoconcept georss gml gmt gpsbabel gpx gtm htf jml mvt ntf openair openfilegdb pgdump rec s57 segukooa segy selafin shape sua svg sxf tiger vdv wasp xplane])dnl
AC_DEFUN([INTERNAL_CURL_DRIVERS],[amigocloud carto cloudant couchdb csw elastic gft ngw plscenes wfs])dnl
AC_DEFUN([CURL_FORMATS],[eeda plmosaic rda wcs wms wmts daas])dnl
AC_DEFUN([CURL_DRIVERS],[amigocloud carto cloudant couchdb csw elastic gft ngw plscenes wfs])dnl
AC_DEFUN([SQLITE_FORMATS],[rasterlite mbtiles])dnl
AC_DEFUN([SQLITE_DRIVERS],[gpkg vfk osm])dnl
AC_DEFUN([EXPAT_DRIVERS],[ods xlsx])dnl
AC_DEFUN([XERCES_DRIVERS],[nas ili gmlas])dnl
AC_DEFUN([ODBC_DRIVERS],[odbc pgeo mssqlspatial geomedia walk])dnl
AC_ARG_ENABLE(all-optional-drivers, AS_HELP_STRING([--disable-all-optional-drivers], [disable all non-mandatory internal drivers. Individual drivers can be added with --enable-driver-XXX]))
if test "x$enable_all_optional_drivers" = "xno"; then :
......@@ -1438,7 +1444,19 @@ else
fi
])
m4_foreach_w([frmt],INTERNAL_CURL_DRIVERS,
m4_foreach_w([frmt],CURL_FORMATS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt format support (enabled by default, requires curl)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
m4_foreach_w([frmt],CURL_DRIVERS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires curl)]))dnl
ARG_DRIVER_ENABLED(frmt)
......@@ -1450,6 +1468,66 @@ else
fi
])
m4_foreach_w([frmt],SQLITE_FORMATS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt format support (enabled by default, requires sqlite3)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
GDALFORMATS_DISABLED="$GDALFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
m4_foreach_w([frmt],SQLITE_DRIVERS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires sqlite3)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
m4_foreach_w([frmt],EXPAT_DRIVERS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires expat)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
m4_foreach_w([frmt],XERCES_DRIVERS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires xerces-c)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
m4_foreach_w([frmt],ODBC_DRIVERS,
[
AC_ARG_ENABLE(driver-frmt, AS_HELP_STRING([--disable-driver-frmt], [disable frmt driver support (enabled by default, requires odbc)]))dnl
ARG_DRIVER_ENABLED(frmt)
if test "$cur_driver_enabled" = "yes"; then :
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=yes
else
OGRFORMATS_DISABLED="$OGRFORMATS_DISABLED frmt"
m4_join([_],[INTERNAL_FORMAT],frmt,[ENABLED])=no
fi
])
AC_SUBST(OGRFORMATS_ENABLED,$OGRFORMATS_ENABLED)
AC_SUBST(OGRFORMATS_ENABLED_CFLAGS,$OGRFORMATS_ENABLED_CFLAGS)
AC_SUBST(GDALFORMATS_ENABLED,$GDALFORMATS_ENABLED)
......@@ -1505,7 +1583,7 @@ else
LIBS="${PG_LIB} ${LIBS}"
fi
else
if "x$with_pg" = "xyes"; then
if test "x$with_pg" = "xyes"; then
AC_MSG_ERROR([--with-pg was requested, but libpq is not available])
fi
fi
......@@ -3660,22 +3738,20 @@ AX_LIB_XERCES($XERCES_REQ_VERSION)
if test "$HAVE_XERCES" = "yes"; then
LIBS="$XERCES_LDFLAGS $LIBS"
m4_foreach_w([frmt],XERCES_DRIVERS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt"
OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)"
fi
])
fi
AC_SUBST([HAVE_XERCES], $HAVE_XERCES)
AC_SUBST([XERCES_INCLUDE], $XERCES_CFLAGS)
dnl ---------------------------------------------------------------------------
dnl Enable NAS if we have Xerces.
dnl ---------------------------------------------------------------------------
if test "$HAVE_XERCES" = "yes" ; then
HAVE_NAS=yes
else
HAVE_NAS=no
fi
AC_SUBST([HAVE_NAS], $HAVE_NAS)
dnl ---------------------------------------------------------------------------
dnl Check for Expat configuration.
dnl ---------------------------------------------------------------------------
......@@ -3686,6 +3762,15 @@ AX_LIB_EXPAT($EXPAT_REQ_VERSION)
if test "$HAVE_EXPAT" = "yes"; then
LIBS="$EXPAT_LDFLAGS $LIBS"
m4_foreach_w([frmt],EXPAT_DRIVERS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt"
OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)"
fi
])
fi
AC_SUBST([HAVE_EXPAT], $HAVE_EXPAT)
......@@ -3768,6 +3853,16 @@ else
echo "using odbc library from $with_odbc."
fi
if test "$ODBC_SETTING" = "yes" ; then
m4_foreach_w([frmt],ODBC_DRIVERS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt"
OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)"
fi
])
fi
AC_SUBST(ODBC_SETTING,$ODBC_SETTING)
dnl ---------------------------------------------------------------------------
......@@ -3924,14 +4019,13 @@ if test "$CURL_SETTING" = "yes" ; then
CURL_INC=`$LIBCURL_CONFIG --cflags`
CURL_LIB=`$LIBCURL_CONFIG --libs`
AC_DEFUN([INTERNAL_CURL_FORMATS],[eeda plmosaic rda wcs wms wmts daas])dnl
m4_foreach_w([frmt],INTERNAL_CURL_FORMATS,[
m4_foreach_w([frmt],CURL_FORMATS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED frmt"
fi
])
m4_foreach_w([frmt],INTERNAL_CURL_DRIVERS,[
m4_foreach_w([frmt],CURL_DRIVERS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt"
......@@ -4100,6 +4194,25 @@ AC_SUBST([HAVE_SQLITE], $HAVE_SQLITE3)
AC_SUBST([SQLITE_HAS_COLUMN_METADATA], $SQLITE_HAS_COLUMN_METADATA)
HAVE_SQLITE=$HAVE_SQLITE3
if test "$HAVE_SQLITE3" = "yes"; then
m4_foreach_w([frmt],SQLITE_FORMATS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
GDALFORMATS_ENABLED="$GDALFORMATS_ENABLED frmt"
fi
])
m4_foreach_w([frmt],SQLITE_DRIVERS,[
driver_enabled=m4_join([_],[$INTERNAL_FORMAT],frmt,[ENABLED])
if test "x$driver_enabled" = "xyes"; then
OGRFORMATS_ENABLED="$OGRFORMATS_ENABLED frmt"
OGRFORMATS_ENABLED_CFLAGS="$OGRFORMATS_ENABLED_CFLAGS _OGRDEFINE(frmt)"
fi
])
fi
dnl ---------------------------------------------------------------------------
dnl Check for librasterlite2.
dnl ---------------------------------------------------------------------------
......@@ -5888,12 +6001,10 @@ LOC_MSG([ LERC support: ${HAVE_LERC}])
LOC_MSG([ MySQL support: ${HAVE_MYSQL}])
LOC_MSG([ Ingres support: ${HAVE_INGRES}])
LOC_MSG([ Xerces-C support: ${HAVE_XERCES}])
LOC_MSG([ NAS support: ${HAVE_NAS}])
LOC_MSG([ Expat support: ${HAVE_EXPAT}])
LOC_MSG([ libxml2 support: ${HAVE_LIBXML2}])
LOC_MSG([ Google libkml support: ${HAVE_LIBKML}])
LOC_MSG([ ODBC support: ${ODBC_SETTING}])
LOC_MSG([ PGeo support: ${ODBC_SETTING}])
LOC_MSG([ FGDB support: ${FGDB_ENABLED}])
LOC_MSG([ MDB support: ${MDB_ENABLED}])
LOC_MSG([ PCIDSK support: ${PCIDSK_SETTING}])
......
......@@ -5,13 +5,18 @@
{ "name": "acquired", "type": "datetime" },
{ "name": "anomalous_pixels", "type": "double" },
{ "name": "black_fill", "type": "double" },
{ "name": "clear_confidence_percent", "type": "double" },
{ "name": "clear_percent", "type": "double" },
{ "name": "cloud_cover", "type": "double" },
{ "name": "cloud_percent", "type": "double" },
{ "name": "columns", "type": "int" },
{ "name": "epsg_code", "type": "int" },
{ "name": "grid_cell", "type": "string" },
{ "name": "ground_control", "type": "boolean" },
{ "name": "gsd", "type": "double" },
{ "name": "heavy_haze_percent", "type": "double" },
{ "name": "item_type", "type": "string" },
{ "name": "light_haze_percent", "type": "double" },
{ "name": "origin_x", "type": "double" },
{ "name": "origin_y", "type": "double" },
{ "name": "pixel_resolution", "type": "double" },
......@@ -19,11 +24,16 @@
{ "name": "published", "type": "datetime" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_id", "type": "string" },
{ "name": "shadow_percent", "type": "double" },
{ "name": "snow_ice_percent", "type": "double" },
{ "name": "strip_id", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
{ "name": "usable_data", "type": "double" },
{ "name": "view_angle", "type": "double" }
{ "name": "view_angle", "type": "double" },
{ "name": "visible_confidence_percent", "type": "double" },
{ "name": "visible_percent", "type": "double" }
],
"assets": [
"analytic",
......@@ -387,6 +397,7 @@
{ "name": "rel_orbit_number", "type": "int" },
{ "name": "rows", "type": "int" },
{ "name": "satellite_id", "type": "string" },
{ "name": "sensor_mode", "type": "string" },
{ "name": "sun_azimuth", "type": "double" },
{ "name": "sun_elevation", "type": "double" },
{ "name": "updated", "type": "datetime" },
......
gdal (2.5.0~rc1+dfsg-1~exp1) experimental; urgency=medium
* New upstream release candidate.
* Add Andrey Kiselev to copyright holders.
* Drop spelling-errors.patch, applied upstream. Refresh remaining patches.
-- Bas Couwenberg <sebastic@debian.org> Fri, 26 Apr 2019 17:47:41 +0200
gdal (2.5.0~beta1+dfsg-1~exp1) experimental; urgency=medium
* New upstream beta release.
......
......@@ -123,6 +123,7 @@ Copyright: 2007-2019, Even Rouault <even dot rouault at spatialys
2004, Kor de Jong
2004, VIZRT Inc
1999-2003, Stephane Villeneuve
2003, Andrey Kiselev <dron@ak4719.spb.edu>
2003, Applied Coherent Technology Corporation (www.actgate.com)
2003, OPeNDAP, Inc
1999, 2001-2002, Safe Software Inc.
......
......@@ -5,7 +5,7 @@ Forwarded: not-needed
--- a/configure
+++ b/configure
@@ -30781,7 +30781,7 @@ fi
@@ -31246,7 +31246,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......@@ -14,7 +14,7 @@ Forwarded: not-needed
else
HDF_LIB_NAME=missing
fi
@@ -30841,7 +30841,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
@@ -31306,7 +31306,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -23,7 +23,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30872,7 +30872,7 @@ fi
@@ -31337,7 +31337,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......@@ -32,7 +32,7 @@ Forwarded: not-needed
else
HDF_LIB_NAME=missing
fi
@@ -30887,7 +30887,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
@@ -31352,7 +31352,7 @@ if ${ac_cv_lib_mfhdf_SDreaddata+:} false
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......@@ -41,7 +41,7 @@ Forwarded: not-needed
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -30918,7 +30918,7 @@ fi
@@ -31383,7 +31383,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mfhdf_SDreaddata" >&5
$as_echo "$ac_cv_lib_mfhdf_SDreaddata" >&6; }
if test "x$ac_cv_lib_mfhdf_SDreaddata" = xyes; then :
......
......@@ -5,7 +5,7 @@ Forwarded: not-needed
--- a/GDALmake.opt.in
+++ b/GDALmake.opt.in
@@ -429,7 +429,7 @@ PCRASTER_SETTING = @PCRASTER_SETTING@
@@ -424,7 +424,7 @@ PCRASTER_SETTING = @PCRASTER_SETTING@
#
HAVE_LERC = @HAVE_LERC@
......
......@@ -9,4 +9,3 @@ perl-vendor
privacy-breach-logo.patch
privacy-breach-generic.patch
perl-doxyfile
spelling-errors.patch
......@@ -5,7 +5,7 @@ Forwarded: not-needed
--- a/configure
+++ b/configure
@@ -36533,7 +36533,7 @@ if ${ac_cv_lib_spatialite_spatialite_tar
@@ -37059,7 +37059,7 @@ if ${ac_cv_lib_spatialite_spatialite_tar
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
......
Description: Fix spelling errors.
* instanciate -> instantiate
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/OSGeo/gdal/pull/1460
Applied-Upstream: https://github.com/OSGeo/gdal/commit/c75fd78d50d5220d503df6cdcbfbef4556381668
--- a/frmts/gtiff/libgeotiff/geo_normalize.c
+++ b/frmts/gtiff/libgeotiff/geo_normalize.c
@@ -3050,14 +3050,14 @@ void GTIFAttachPROJContext( GTIF *psGTIF
/* GTIFGetPROJContext() */
/* */
/* Return the PROJ context attached to the GTIF handle. */
-/* If it has not yet been instanciated and instanciateIfNeeded=TRUE*/
-/* then, it will be instanciated (and owned by GTIF handle). */
+/* If it has not yet been instantiated and instantiateIfNeeded=TRUE*/
+/* then, it will be instantiated (and owned by GTIF handle). */
/************************************************************************/
-void *GTIFGetPROJContext( GTIF *psGTIF, int instanciateIfNeeded,
+void *GTIFGetPROJContext( GTIF *psGTIF, int instantiateIfNeeded,
int* out_gtif_own_pj_context )
{
- if( psGTIF->pj_context || !instanciateIfNeeded )
+ if( psGTIF->pj_context || !instantiateIfNeeded )
{
if( out_gtif_own_pj_context )
{
--- a/frmts/gtiff/libgeotiff/geo_normalize.h
+++ b/frmts/gtiff/libgeotiff/geo_normalize.h
@@ -175,7 +175,7 @@ void GTIF_DLL GTIFFreeMemory( char * );
/* The void* should be a PJ_CONTEXT* */
void GTIF_DLL GTIFAttachPROJContext( GTIF *psGTIF, void* pjContext );
-void GTIF_DLL *GTIFGetPROJContext( GTIF *psGTIF, int instanciateIfNeeded,
+void GTIF_DLL *GTIFGetPROJContext( GTIF *psGTIF, int instantiateIfNeeded,
int* out_gtif_own_pj_context );
int GTIF_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
--- a/ogr/ogrct.cpp
+++ b/ogr/ogrct.cpp
@@ -765,7 +765,7 @@ int OGRProjCT::Initialize( const OGRSpat
if( !m_pj )
{
CPLError( CE_Failure, CPLE_NotSupported,
- "Cannot instanciate pipeline %s",
+ "Cannot instantiate pipeline %s",
options.d->osCoordOperation.c_str() );
return FALSE;
}
@@ -915,13 +915,13 @@ bool OGRProjCT::ListCoordinateOperations
auto src = proj_create(ctx, pszSrcSRS);
if( !src ) {
- CPLError(CE_Failure, CPLE_AppDefined, "Cannot instanciate source_crs");
+ CPLError(CE_Failure, CPLE_AppDefined, "Cannot instantiate source_crs");
return false;
}
auto dst = proj_create(ctx, pszTargetSRS);
if( !dst ) {
- CPLError(CE_Failure, CPLE_AppDefined, "Cannot instanciate target_crs");
+ CPLError(CE_Failure, CPLE_AppDefined, "Cannot instantiate target_crs");
proj_destroy(src);
return false;
}
--- a/ogr/ogrsf_frmts/mongodbv3/ogrmongodbv3driver.cpp
+++ b/ogr/ogrsf_frmts/mongodbv3/ogrmongodbv3driver.cpp
@@ -47,7 +47,7 @@ extern "C" void CPL_DLL RegisterOGRMongo
using bsoncxx::builder::basic::kvp;
static mongocxx::instance* g_pInst = nullptr;
-static bool g_bCanInstanciateMongo = true;
+static bool g_bCanInstantiateMongo = true;
namespace {
typedef struct _IntOrMap IntOrMap;
@@ -2561,7 +2561,7 @@ static GDALDataset* OGRMongoDBv3DriverOp
std::lock_guard<std::mutex> oLock(oMutex);
if( g_pInst == nullptr )
{
- if( !g_bCanInstanciateMongo )
+ if( !g_bCanInstantiateMongo )
{
CPLError(CE_Failure, CPLE_AppDefined,
"MongoDB client has been previously shut down and "
@@ -2615,7 +2615,7 @@ static void OGRMongoDBv3DriverUnload( GD
{
delete g_pInst;
g_pInst = nullptr;
- g_bCanInstanciateMongo = false;
+ g_bCanInstantiateMongo = false;
}
}
/************************************************************************/
GDAL Docker images
==================
This directory contains a number of Dockerfile for different configurations.
Each directory contains a `./build.sh` for convenient building of the image.
Note: the mention of the overall licensing terms of the GDAL build is to the
best of our knowledge and not guaranteed. Users should check by themselves.
# Alpine based
## Ultra small: `osgeo/gdal:alpine-ultrasmall-latest`
* Image size: < 40 MB
* Raster drivers: VRT, GTiff, HFA, PNG, JPEG, MEM, JP2OpenJPEG, WEB, GPKG
* Vector drivers: Shapefile, MapInfo, VRT, Memory, GeoJSON, GPKG, SQLite
* External libraries enabled: libsqlite3, libproj, libcurl, libjpeg, libpng, libwebp, libzstd
* No GDAL Python
* Base PROJ grid package
* Overall licensing terms of the GDAL build: permissive (X/MIT, BSD style, Apache, etc..)
See [alpine-ultrasmall/Dockerfile](alpine-ultrasmall/Dockerfile)
## Small: `osgeo/gdal:alpine-small-latest`
* Image size: ~ 52 MB
* Raster drivers: ultrasmall + built-in + SQLite-based ones + network-based ones
* Vector drivers: ultrasmall + built-in + most XML-based ones + network-based ones + PostgreSQL
* External libraries enabled: ultrasmall + libexpat, libpq, libssl
* No GDAL Python
* Base PROJ grid package
* Overall licensing terms of the GDAL build: permissive (X/MIT, BSD style, Apache, etc..)
See [alpine-small/Dockerfile](alpine-small/Dockerfile)
## Nomal: `osgeo/gdal:alpine-normal-latest`
* Image size: ~ 155 MB
* Raster drivers: small + netCDF, HDF5, BAG
* Vector drivers: small + Spatialite, XLS
* External libraries enabled: small + libgeos, libhdf5, libnetcdf, libfreexl,
libspatialite, libxml2, libpoppler
* GDAL Python (Python 2.7)
* Base PROJ grid package
* Overall licensing terms of the GDAL build: copy-left (GPL) + LGPL + permissive
See [alpine-normal/Dockerfile](alpine-normal/Dockerfile)
# Ubuntu based (18:04 / bionic)
## Small: `osgeo/gdal:ubuntu-small-latest`
* Image size: ~ 270 MB
* Raster drivers: all built-in + JPEG + PNG + JP2OpenJPEG + WEBP +SQLite-based ones + network-based ones
* Vector drivers: all built-in + XML based ones + SQLite-based ones + network-based ones + PostgreSQL
* External libraries enabled: libsqlite3, libproj, libcurl, libjpeg, libpng, libwebp,
libzstd, libexpat, libxerces-c, libpq, libssl, libgeos
* GDAL Python (Python 2.7)
* Base PROJ grid package
* Overall licensing terms of the GDAL build: LGPL + permissive (X/MIT, BSD style, Apache, etc..)
See [ubuntu-small/Dockerfile](ubuntu-small/Dockerfile)
## Full: `osgeo/gdal:ubuntu-full-latest`
* Image size: ~ 1.8 GB
* Raster drivers: all based on almost all possible free and open-source dependencies
* Vector drivers: all based on almost all possible free and open-source dependencies
* External libraries enabled: small + libnetcdf, libhdf4, libhdf5, libtiledb, libkea,
mongocxx 3.4, libspatialite, unixodbc, libxml2, libcfitsio, libmysqlclient,
libkml, libpoppler
* GDAL Python (Python 2.7)
* *All* PROJ grid packages
* Overall licensing terms of the GDAL build: copy-left (GPL) + LGPL + permissive
See [ubuntu-full/Dockerfile](ubuntu-full/Dockerfile)
# Usage example
```shell
docker pull osgeo/gdal:alpine-small-latest
docker run --rm -v /home:/home osgeo/gdal:alpine-small-latest gdalinfo $PWD/my.tif
```
##
# osgeo/gdal:alpine-normal
# This file is available at the option of the licensee under:
# Public domain
# or licensed under X/MIT (LICENSE.TXT) Copyright 2019 Even Rouault <even.rouault@spatialys.com>
FROM alpine:latest as builder
# Derived from osgeo/proj by Howard Butler <howard@hobu.co>
MAINTAINER Even Rouault <even.rouault@spatialys.com>
# Setup build env for PROJ
RUN apk add --no-cache wget curl unzip -q make libtool autoconf automake pkgconfig g++ sqlite sqlite-dev
# For GDAL
RUN apk add --no-cache \
linux-headers \
curl-dev \
zlib-dev zstd-dev \
libjpeg-turbo-dev libpng-dev openjpeg-dev libwebp-dev expat-dev \
py-numpy-dev python2-dev py2-numpy \
poppler-dev postgresql-dev
# For spatialite (and GDAL)
RUN apk add --no-cache libxml2-dev
# Build xerces-c
ENV XERCESC_VERSION=3.2.2
RUN wget -q http://mirror.ibcp.fr/pub/apache/xerces/c/3/sources/xerces-c-${XERCESC_VERSION}.zip \
&& unzip -q xerces-c-${XERCESC_VERSION}.zip \
&& rm -f xerces-c-${XERCESC_VERSION}.zip \
&& cd xerces-c-${XERCESC_VERSION} \
&& ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libxerces-c*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf xerces-c-${XERCESC_VERSION}
# Build geos
ENV GEOS_VERSION=3.7.1
RUN wget -q http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2 \
&& tar xjf geos-${GEOS_VERSION}.tar.bz2 \
&& rm -f geos-${GEOS_VERSION}.tar.bz2 \
&& cd geos-${GEOS_VERSION} \
&& ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libgeos*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf geos-${GEOS_VERSION}
ENV SZIP_VERSION=2.1.1
# Build szip
RUN wget -q https://support.hdfgroup.org/ftp/lib-external/szip/${SZIP_VERSION}/src/szip-${SZIP_VERSION}.tar.gz \
&& tar xzf szip-${SZIP_VERSION}.tar.gz \
&& rm -f szip-${SZIP_VERSION}.tar.gz \
&& cd szip-${SZIP_VERSION} \
&& CFLAGS=-O2 ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libsz*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf szip-${SZIP_VERSION}
ENV HDF5_VERSION=1.10.5
# Build hdf5
RUN wget -q https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION%.*}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz \
&& tar xzf hdf5-${HDF5_VERSION}.tar.gz \
&& rm -f hdf5-${HDF5_VERSION}.tar.gz \
&& cd hdf5-${HDF5_VERSION} \
&& CFLAGS=-O2 ./configure --prefix=/usr --disable-static --with-szlib=/usr \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libhdf5*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf hdf5-${HDF5_VERSION}
ENV NETCDF_VERSION=4.6.3
# Build netCDF
RUN wget -q https://github.com/Unidata/netcdf-c/archive/v${NETCDF_VERSION}.tar.gz \
&& tar xzf v${NETCDF_VERSION}.tar.gz \
&& rm -f v${NETCDF_VERSION}.tar.gz \
&& cd netcdf-c-${NETCDF_VERSION} \
&& CFLAGS=-O2 ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libnetcdf*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf netcdf-c-${NETCDF_VERSION}
ENV FREEXL_VERSION=1.0.5
# Build freexl
RUN wget -q http://www.gaia-gis.it/gaia-sins/freexl-${FREEXL_VERSION}.tar.gz \
&& tar xzf freexl-${FREEXL_VERSION}.tar.gz \
&& rm -f freexl-${FREEXL_VERSION}.tar.gz \
&& cd freexl-${FREEXL_VERSION} \
&& ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_thirdparty/usr/lib \
&& cp -P /usr/lib/libfreexl*.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf freexl-${FREEXL_VERSION}
ARG PROJ_VERSION=master
# Build PROJ
RUN mkdir proj \
&& wget -q https://github.com/OSGeo/proj.4/archive/${PROJ_VERSION}.tar.gz -O - \
| tar xz -C proj --strip-components=1 \
&& cd proj \
&& ./autogen.sh \
&& ./configure --prefix=/usr --disable-static --enable-lto \
&& make -j$(nproc) \
&& make install \
&& make install DESTDIR="/build_proj" \
&& cd .. \
&& rm -rf proj \
&& for i in /build_proj/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& for i in /build_proj/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done
ENV SPATIALITE_VERSION=4.3.0a
# Build spatialite
RUN wget -q http://www.gaia-gis.it/gaia-sins/libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& tar xzf libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& rm -f libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& cd libspatialite-${SPATIALITE_VERSION} \
&& CFLAGS="-DACCEPT_USE_OF_DEPRECATED_PROJ_API_H -O2" ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& make install \
&& mkdir -p /build_spatialite/usr/lib \
&& cp -P /usr/lib/libspatialite*.so* /build_spatialite/usr/lib \
&& for i in /build_spatialite/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf libspatialite-${SPATIALITE_VERSION}
ARG GDAL_VERSION=master
ARG GDAL_RELEASE_DATE
ARG GDAL_BUILD_IS_RELEASE
# Build GDAL
RUN if test "${GDAL_VERSION}" = "master"; then \
export GDAL_VERSION=$(curl -Ls https://api.github.com/repos/OSGeo/gdal/commits/HEAD -H "Accept: application/vnd.github.VERSION.sha"); \
export GDAL_RELEASE_DATE=$(date "+%Y%m%d"); \
fi \
&& if test "x${GDAL_BUILD_IS_RELEASE}" = "x"; then \
export GDAL_SHA1SUM=${GDAL_VERSION}; \
fi \
&& mkdir gdal \
&& wget -q https://github.com/OSGeo/gdal/archive/${GDAL_VERSION}.tar.gz -O - \
| tar xz -C gdal --strip-components=1 \
&& cd gdal/gdal \
&& ./configure --prefix=/usr --without-libtool \
--with-hide-internal-symbols \
--with-proj=/usr \
--with-libtiff=internal --with-rename-internal-libtiff-symbols \
--with-geotiff=internal --with-rename-internal-libgeotiff-symbols \
# --enable-lto
--with-geos \
--with-xerces \
--with-netcdf \
--with-hdf5 \
--with-poppler \
--with-spatialite \
--with-python \
&& make -j$(nproc) \
&& make install DESTDIR="/build" \
&& cd ../.. \
&& rm -rf gdal \
&& for i in /build/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& for i in /build/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& for i in /build/usr/lib/python2.7/site-packages/osgeo/*.so; do strip -s $i 2>/dev/null || /bin/true; done \
# Remove resource files of uncompiled drivers
&& (for i in \
# unused
/build/usr/share/gdal/*.svg \
# unused
/build/usr/share/gdal/*.png \
;do rm $i; done)
RUN \
mkdir -p /build_projgrids/usr/share/proj \
&& curl -LOs http://download.osgeo.org/proj/proj-datumgrid-latest.zip \
&& unzip -q -j -u -o proj-datumgrid-latest.zip -d /build_projgrids/usr/share/proj \
&& rm -f *.zip
# Build final image
FROM alpine:latest as runner
RUN date
RUN apk add --no-cache \
libstdc++ \
sqlite-libs \
libcurl \
zlib zstd-libs\
libjpeg-turbo libpng openjpeg libwebp expat \
python2 py2-numpy poppler pcre libpq libxml2 \
# libturbojpeg.so is not used by GDAL. Only libjpeg.so*
&& rm -f /usr/lib/libturbojpeg.so* \
# libpoppler-cpp.so is not used by GDAL. Only libpoppler.so*
&& rm -f /usr/lib/libpoppler-cpp.so* \
# Only libwebp.so is used by GDAL
&& rm -f /usr/lib/libwebpmux.so* /usr/lib/libwebpdemux.so* /usr/lib/libwebpdecoder.so* \
# Remove .py files since we have already the .pyc
&& find /usr/lib/python2.7/site-packages -name "*.py" -exec rm {} \;
# Order layers starting with less frequently varying ones
COPY --from=builder /build_thirdparty/usr/ /usr/
COPY --from=builder /build_projgrids/usr/ /usr/
COPY --from=builder /build_spatialite/usr/ /usr/
COPY --from=builder /build_proj/usr/share/proj/ /usr/share/proj/
COPY --from=builder /build_proj/usr/include/ /usr/include/
COPY --from=builder /build_proj/usr/bin/ /usr/bin/
COPY --from=builder /build_proj/usr/lib/ /usr/lib/
COPY --from=builder /build/usr/share/gdal/ /usr/share/gdal/
COPY --from=builder /build/usr/include/ /usr/include/
COPY --from=builder /build/usr/bin/ /usr/bin/
COPY --from=builder /build/usr/lib/ /usr/lib/
#!/bin/sh
# This file is available at the option of the licensee under:
# Public domain
# or licensed under X/MIT (LICENSE.TXT) Copyright 2019 Even Rouault <even.rouault@spatialys.com>
set -eu
SCRIPT_DIR=$(dirname "$0")
case $SCRIPT_DIR in
"/"*)
;;
".")
SCRIPT_DIR=$(pwd)
;;
*)
SCRIPT_DIR=$(pwd)/$(dirname "$0")
;;
esac
export SCRIPT_DIR
TAG_NAME=$(basename "${SCRIPT_DIR}")
export BASE_IMAGE_NAME=osgeo/gdal:${TAG_NAME}
export TEST_PYTHON=YES
"${SCRIPT_DIR}/../util.sh" "$@"