Skip to content
Commits on Source (26)
......@@ -4,6 +4,82 @@ List of GDAL/OGR committers
Folks who have agreed to RFC 3 terms:
==================================
Developers with github push rights
==================================
github nickname Name/Contact Area of Interest
=============== ============ ================
rouault Even Rouault all
even.rouault at spatialys.com
warmerdam Frank Warmerdam all
warmerdam@pobox.com
dmorissette Daniel Morissette mitab, avc, cpl
dmorissette at mapgears.com
hobu Howard Butler swig/python, sde
hobu.inc at gmail.com
szekerest Tamas Szekeres c# swig bindings
szekerest at gmail.com
ksshannon Kyle Shannon lcp, netcdf, apps
kyle@pobox.com
avalentino Antonio Valentino SAR formats
antonio.valentino@tiscali.it
jef-n Juergen E. Fischer OGR: NAS
jef at norbit dot de
ajolma Ari Jolma perl bindings
ari.jolma at gmail.com
mloskot Mateusz Loskot geojson, wince
mateusz at loskot.net
strezen Andrey Kiselev HDF, geotiff, informix, core
dron at ak4719.spb.edu
pka Pirmin Kalberer interlis
pka at sourcepole.ch
lucianpls Lucian Plesea mrf, wms
lplesea@esri.com
atlight Alan Thomas DXF
athomas@thinkspatial.com.au
avalentino Antonio Valentino SAR formats
antonio.valentino@tiscali.it
pramsey Paul Ramsey OGR: FGDB, PostGIS
pramsey@cleverelephant.ca
etiennesky Etienne Tourigny netcdf, hdf
etourigny.dev at gmail dot com
rcoup Robert Coup OGR: FGDB
robert@coup.net.nz
dzwarg David Zwarg PostGIS Raster
dzwarg@azavea.com
IvanLucena Ivan Lucena georaster, oci
ivan.lucena at outlook.com
BishopGIS Dmitry Baryshnikov core, sxf, cad, shp
bishop.dev at gmail dot com
schwehr Kurt Schwehr ocean related drivers, python
schwehr@gmail.com
===================
Past SVN developers
===================
SVN Login(s) Name/Contact Area of Interest
============ ============ ================
warmerda Frank Warmerdam all
......@@ -43,9 +119,6 @@ shalasz Steve Halasz DebianGIS Packaging
mloskot Mateusz Loskot wince, geojson
mateusz at loskot.net
ilucena Ivan Lucena georaster, oci
ivan.lucena at oracle.com
mbrudka Marek Brudka thread safety
mbrudka at aster.pl
......@@ -182,13 +255,15 @@ jratike80 Jukka Rahkonen documentation
dadler David Adler DB2
dadler@adtechgeospatial.com
lplesea Lucian Plesea mrf, wms
lplesea@esri.com
===============
Past developers
===============
atlight Alan Thomas DXF
athomas@thinkspatial.com.au
===================
Past CVS developers
===================
CVS Login(s) Name Email / Contact Project
============ ==== =============== =======
......
......@@ -951,7 +951,8 @@ PREDEFINED = HAVE_DLFCN_H \
HAVE_LIBXML2 \
HAVE_RECENT_LIBXML2 \
HAVE_LONG_LONG=1 \
HAVE_SC_PHYS_PAGES=1
HAVE_SC_PHYS_PAGES=1 \
final=
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
......
......@@ -27,7 +27,7 @@
<tab type="user" url="http://trac.osgeo.org/gdal/wiki/DownloadSource" title="Source"/>
<tab type="user" url="http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries" title="Binaries"/>
</tab>
<tab type="user" url="http://trac.osgeo.org/gdal/report/1?sort=ticket&amp;asc=0" title="Issue Tracker"/>
<tab type="user" url="https://github.com/OSGeo/gdal/issues/" title="Issue Tracker"/>
<!-- end GDAL customization -->
</navindex>
......
......@@ -10,12 +10,12 @@ SHELL = @SHELL@
HAVE_LIBTOOL = @HAVE_LIBTOOL@
LIBTOOL = @LIBTOOL@
ifeq ($(HAVE_LIBTOOL),yes)
LIBTOOL_COMPILE_CC = $(LIBTOOL) --mode=compile --tag=CC
LIBTOOL_COMPILE_CXX = $(LIBTOOL) --mode=compile --tag=CXX
LIBTOOL_LINK = $(LIBTOOL) --mode=link
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
LIBTOOL_COMPILE_CC = $(LIBTOOL) --mode=compile --silent --tag=CC
LIBTOOL_COMPILE_CXX = $(LIBTOOL) --mode=compile --silent --tag=CXX
LIBTOOL_LINK = $(LIBTOOL) --mode=link --silent
LIBTOOL_INSTALL = $(LIBTOOL) --mode=install --silent
LIBTOOL_FINISH = $(LIBTOOL) --mode=finish --silent
LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean
LIBTOOL_CLEAN = $(LIBTOOL) --mode=clean --silent
OBJ_EXT = lo
else
LIBTOOL_FINISH = @BINTRUE@
......@@ -35,7 +35,7 @@ INSTALL_DIR = $(GDAL_ROOT)/install-sh -d
LIBS = $(SDE_LIB) @LIBS@ $(KAK_LIBS) $(DWG_LIBS) $(CURL_LIB) \
$(MRSID_LIBS) $(MRSID_LIDAR_LIBS) $(ECW_LIBS) $(INGRES_LIB) \
$(PCIDSK_LIB) $(RASDAMAN_LIB) $(CHARLS_LIB) $(SOSI_LIB) \
$(PCIDSK_LIB) $(RASDAMAN_LIB) $(SOSI_LIB) \
$(OPENCL_LIB) $(JVM_LIB) $(LIBICONV) $(FGDB_LIB) $(LIBXML2_LIB) $(MONGODB_LIB)
SSEFLAGS = @SSEFLAGS@
......@@ -67,7 +67,7 @@ INST_DOCS = @exec_prefix@/doc
INST_MAN = @mandir@
INST_HTML = $(HOME)/www/gdal
CPPFLAGS = @CPPFLAGS@ -I$(GDAL_ROOT)/port @EXTRA_INCLUDES@ -DGDAL_COMPILATION
CPPFLAGS := @CPPFLAGS@ -I$(GDAL_ROOT)/port @EXTRA_INCLUDES@ -DGDAL_COMPILATION
CFLAGS = @CFLAGS@ @C_WFLAGS@ $(USER_DEFS)
CXXFLAGS = @CXXFLAGS@ @CXX_WFLAGS@ $(USER_DEFS)
CFLAGS_NOFTRAPV = @CFLAGS_NOFTRAPV@ @C_WFLAGS@ $(USER_DEFS)
......@@ -79,6 +79,7 @@ NO_UNUSED_PARAMETER_FLAG = @NO_UNUSED_PARAMETER_FLAG@
NO_SIGN_COMPARE = @NO_SIGN_COMPARE@
NO_NON_VIRTUAL_DTOR_FLAG = @NO_NON_VIRTUAL_DTOR_FLAG@
NO_LOGICAL_OP_FLAG = @NO_LOGICAL_OP_FLAG@
WARN_OLD_STYLE_CAST = @WARN_OLD_STYLE_CAST@
# Also available -DAFL_FRIENDLY for strcmp(), etc.. variants that will
# work better with American Fuzzy Lop branch examination logic
......@@ -119,9 +120,9 @@ GDAL_INCLUDE = -I$(GDAL_ROOT)/port -I$(GDAL_ROOT)/gcore \
# libtool targets and help variables
LIBGDAL := libgdal.la
LIBGDAL_CURRENT := 23
LIBGDAL_REVISION := 3
LIBGDAL_AGE := 3
LIBGDAL_CURRENT := 24
LIBGDAL_REVISION := 0
LIBGDAL_AGE := 4
# native build targets and variables
GDAL_VER = @GDAL_VER@
......@@ -236,12 +237,6 @@ endif
HAVE_JASPER = @HAVE_JASPER@
JASPER_FLAGS = @JASPER_FLAGS@
#
# JPEG-2000 Support via OpenJPEG library.
#
HAVE_OPENJPEG = @HAVE_OPENJPEG@
OPENJPEG_VERSION = @OPENJPEG_VERSION@
#
# MrSID support via LizardTech's DSDK
#
......@@ -272,6 +267,9 @@ JP2LURA_INCLUDE = @JP2LURA_INCLUDE@
#
HAVE_XERCES = @HAVE_XERCES@
XERCES_INCLUDE = @XERCES_INCLUDE@
ifeq ($(HAVE_XERCES),yes)
CPPFLAGS += -DHAVE_XERCES $(XERCES_INCLUDE) $(CPPFLAGS)
endif
#
# Enable NAS format
......@@ -396,7 +394,7 @@ LIBXML2_LIB = @LIBXML2_LIB@
#
# CAD Support
#
HAVE_CAD = @CXX11_SUPPORT@
HAVE_CAD = yes
#
# Informix DataBlade support
......@@ -434,6 +432,7 @@ RENAME_INTERNAL_LIBTIFF_SYMBOLS = @RENAME_INTERNAL_LIBTIFF_SYMBOLS@
GEOTIFF_SETTING = @GEOTIFF_SETTING@
GEOTIFF_INCLUDE = @GEOTIFF_INCLUDE@
RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS = @RENAME_INTERNAL_LIBGEOTIFF_SYMBOLS@
RENAME_INTERNAL_SHAPELIB_SYMBOLS = @RENAME_INTERNAL_SHAPELIB_SYMBOLS@
GIF_SETTING = @GIF_SETTING@
FITS_SETTING = @FITS_SETTING@
OGDI_SETTING = @HAVE_OGDI@
......@@ -445,6 +444,7 @@ GEOMEDIA_SETTING = @ODBC_SETTING@
NETCDF_SETTING = @NETCDF_SETTING@
LIBZ_SETTING = @LIBZ_SETTING@
LIBLZMA_SETTING = @LIBLZMA_SETTING@
ZSTD_SETTING = @ZSTD_SETTING@
#
# DDS via Crunch Support.
......@@ -494,24 +494,23 @@ PDFIUM_PLUGIN_LIB = @PDFIUM_PLUGIN_LIB@
#
# CharLs stuff
# Uncomment and adapt paths to enable JPEGLS driver
#
#HAVE_CHARLS = yes
#CHARLS_INC = -I/path/to/charls_include
#CHARLS_LIB = -L/path/to/charls_lib -lCharLS
HAVE_CHARLS = @HAVE_CHARLS@
CHARLS_INC = @CHARLS_INC@
#
# Teigha stuff
#
HAVE_TEIGHA = @HAVE_TEIGHA@
TEIGHA_DIR = @TEIGHA_DIR@
TEIGHA_CPPFLAGS = @TEIGHA_CPPFLAGS@
#
# PROJ.4 stuff
#
PROJ_STATIC = @PROJ_STATIC@
ifeq ($(PROJ_STATIC),yes)
PROJ_FLAGS = -DPROJ_STATIC
PROJ_FLAGS = -DPROJ_STATIC -DPROJ_VERSION=@PROJ_VERSION@
endif
PROJ_INCLUDE = @PROJ_INCLUDE@
......@@ -547,6 +546,11 @@ FREEXL_INCLUDE = @FREEXL_INCLUDE@
HAVE_CRYPTOPP = @HAVE_CRYPTOPP@
USE_ONLY_CRYPTODLL_ALG = @USE_ONLY_CRYPTODLL_ALG@
#
# crypto/openssl stuff
#
HAVE_OPENSSL_CRYPTO = @HAVE_OPENSSL_CRYPTO@
#
# Note these codes have to exactly match the format directory names,
# and their uppercase form should be the format portion of the
......
......@@ -42,6 +42,13 @@ force-lib:
$(LD_SHARED) $(GDAL_SLIB_SONAME) $(GDAL_OBJ) $(GDAL_LIBS) $(LDFLAGS) $(LIBS) \
-o $(GDAL_SLIB)
static-lib: lib-dependencies GDALmake.opt
$(MAKE) static-lib-stage2
static-lib-stage2: $(GDAL_OBJ)
rm -f libgdal.a
$(AR) r $(GDAL_LIB) $(GDAL_OBJ)
$(GDAL_LIB): $(GDAL_OBJ) GDALmake.opt
rm -f libgdal.a
$(AR) r $(GDAL_LIB) $(GDAL_OBJ)
......@@ -60,33 +67,38 @@ ifeq ($(MACOSX_FRAMEWORK),yes)
install_name_tool -id ${OSX_VERSION_FRAMEWORK_PREFIX}/GDAL .libs/libgdal.dylib
endif
check-lib: port-target core-target frmts-target ogr-target gnm-target appslib-target
lib-dependencies: port-target core-target frmts-target ogr-target gnm-target appslib-target
check-lib: lib-dependencies
$(MAKE) $(LIBGDAL-yes)
appslib-target:
generate_gdal_version_h:
(cd gcore; $(MAKE) generate_gdal_version_h)
appslib-target: generate_gdal_version_h
(cd apps; $(MAKE) appslib)
port-target:
(cd port; $(MAKE))
ogr-target:
ogr-target: generate_gdal_version_h
(cd ogr; $(MAKE) lib )
ifeq ($(GNM_ENABLED),yes)
gnm-target:
gnm-target: generate_gdal_version_h
(cd gnm; $(MAKE) lib )
else
gnm-target: ;
endif
core-target:
core-target: generate_gdal_version_h
(cd gcore; $(MAKE))
(cd alg; $(MAKE))
frmts-target:
frmts-target: generate_gdal_version_h
(cd frmts; $(MAKE))
ogr-all:
ogr-all: generate_gdal_version_h
(cd ogr; $(MAKE) all)
apps-target: lib-target
......@@ -132,12 +144,12 @@ dist-clean: clean
config: configure
./configure
configure: configure.in aclocal.m4
autoconf
GDALmake.opt: GDALmake.opt.in config.status
./config.status
config.status: configure
./config.status --recheck
docs:
(cd html; rm -f *.*)
# Generate translated docs. Should go first, because index.html page should
......@@ -164,9 +176,10 @@ docs:
cp ogr/ogrsf_frmts/*/frmt_*.html html
cp ogr/ogrsf_frmts/*/drv_*.html html
cp ogr/ogrsf_frmts/ogr_formats.html html
cp ogr/ogr_feature_style.html html
cp ogr/*.html html
cp ogr/ogrsf_frmts/gpkg/geopackage_aspatial.html html
cp ogr/*.gif html
cp ogr/*.png html
.PHONY: man
......@@ -192,6 +205,21 @@ web-update: docs
install: default install-actions
install-static-lib: static-lib gdal.pc
$(INSTALL_LIB) $(GDAL_LIB) $(DESTDIR)$(INST_LIB)
$(INSTALL_DIR) $(DESTDIR)$(INST_DATA)
$(INSTALL_DIR) $(DESTDIR)$(INST_INCLUDE)
(cd port; $(MAKE) install)
(cd gcore; $(MAKE) install)
(cd frmts; $(MAKE) install)
(cd alg; $(MAKE) install)
(cd ogr; $(MAKE) install)
(cd gnm; $(MAKE) install)
for f in LICENSE.TXT data/*.* ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_DATA) ; done
$(LIBTOOL_FINISH) $(DESTDIR)$(INST_LIB)
$(INSTALL_DIR) $(DESTDIR)$(INST_LIB)/pkgconfig
$(INSTALL_DATA) gdal.pc $(DESTDIR)$(INST_LIB)/pkgconfig/gdal.pc
install-actions: install-lib
$(INSTALL_DIR) $(DESTDIR)$(INST_BIN)
$(INSTALL_DIR) $(DESTDIR)$(INST_DATA)
......
......@@ -23,7 +23,7 @@ Prerequisites:
new members. Only non-virtual methods can be added.
It may also be helpful to check:
http://upstream-tracker.org/versions/gdal.html
https://abi-laboratory.pro/tracker/timeline/gdal/
2) Delete existing fix_typos directory and run scripts/fix_typos.sh
......@@ -40,7 +40,7 @@ Process :
if new command line switches have been added. scripts/completionFinder.py
must also be edited before if new utilities/scripts are added/removed.
2) Update the release date, and number information in gcore/gdal_version.h.
2) Update the release date, and number information in gcore/gdal_version.h.in
Note: the format of GDAL_RELEASE_DATE should be YYYYMMDD.
3) Update the VERSION file.
......@@ -60,10 +60,9 @@ Perl module maintainer to make a CPAN release.
- Adding interfaces, bump CURRENT/AGE, set REVISION to 0.
- Deleting interfaces / compatibility issues - bump CURRENT, others to zero.
5) Prepare release overview in the NEWS file. The Trac revision log for
trunk or the stable branch can be helpful.
http://trac.osgeo.org/gdal/log/branches/1.4
5) Prepare release overview in the NEWS file. For example, to get all changes
from v2.2.0 to current HEAD (from gdal/ subdirectory)
git log --reverse -v v2.2.0..HEAD .
- commit new version to NEWS file.
......@@ -74,13 +73,17 @@ Perl module maintainer to make a CPAN release.
7) If this is a major release, prepare a branch.
svn copy https://svn.osgeo.org/gdal/trunk \
https://svn.osgeo.org/gdal/branches/1.5
git checkout master
git pull origin master
git checkout -b release/2.3
git push origin release/2.3
8) Tag the release set in SVN:
8) Tag the release set in git:
svn copy https://svn.osgeo.org/gdal/branches/1.4 \
https://svn.osgeo.org/gdal/tags/1.4.1
git checkout release/2.3
git pull origin release/2.3
git tag -a -m "Create tag v2.3.0" v2.3.0
git push origin v2.3.0
9) Create the source distributions using the mkgdaldist.sh script. The
argument should be the version number (i.e. 1.4.2). As our process involves
......@@ -88,7 +91,7 @@ Perl module maintainer to make a CPAN release.
information (after promotion to official release, filename renaming will have
to be done)
% mkgdaldist.sh 1.4.2 -branch tags/1.4.2 -rc RC1
% mkgdaldist.sh 1.4.2 -branch v1.4.2 -rc RC1
10) Create a snapshot of the documentation.
......@@ -97,18 +100,6 @@ Perl module maintainer to make a CPAN release.
% ./gdal-web-refresh.sh
% zip -r ~/gdal210doc.zip gdal-web/*.* gdal-web/java gdal-web/python
11) Create a snapshot of autotest suite:
svn export http://svn.osgeo.org/gdal/branches/1.6/autotest gdalautotest-1.6.0
tar czvf gdalautotest-1.6.0.tar.gz gdalautotest-1.6.0
zip -r gdalautotest-1.6.0.zip gdalautotest-1.6.0
11.5) If changes have been made in the frmts/grass or ogr/ogrsf_frmts/grass dir,
generate an up-to-date gdal-grass snapshot:
% cd frmts/grass
% make dist
12) Publish the resulting files in download.osgeo.org/gdal/X.Y.Z (where X.Y.Z is the version number)
and add a symlink from X.Y.Z to CURRENT (except for stable releases in a "old" branch).
......@@ -151,12 +142,12 @@ index-servers = pypi
pypitest
[pypi] # authentication details for live PyPI
repository: https://pypi.python.org/pypi
repository: https://upload.pypi.org/legacy/
username: yourlogin
password: yourpassword
[pypitest] # authentication details for test PyPI
repository: https://testpypi.python.org/pypi
repository: https://test.pypi.org/legacy/
username: yourlogin
password: yourpassword
......@@ -272,4 +263,3 @@ e) Click the "Release" button and that is it! The release should be available in
Maven Central shortly. You can verify this by going to search.maven.org and
searching for "gdal".
MIGRATION GUIDE FROM GDAL 2.2 to GDAL 2.3
-----------------------------------------
1) RFC 70: Guessing output format from output file name extension for utilities
Link: https://trac.osgeo.org/gdal/wiki/rfc70_output_format_guess
Before GDAL 2.3, if not specifying the output format to utilities, GeoTIFF or
Shapefile were assumed for most utilities. Now, the output format will be
guessed from the output filename extension. This might break usages where
non-standard extensions are used for GeoTIFF or Shapefile output when -f/-of is
not specified (but warnings were already emitted in such situations).
2) RFC 68: C++11 Compilation requirement
Link: https://trac.osgeo.org/gdal/wiki/rfc68_cplusplus11
GDAL now requires a C++11 compatible compiler. External code using GDAL C++ API
will also need to enable at least C++11 compilation mode, if the compiler
defaults to C++98/C++03.
3) Stricter const-ness in OGRGeomFieldDefn, OGRFeatureDefn and OGRFeature
classes, impacting out-of-tree drivers that subclass them.
The following methods are now const qualified:
OGRGeomFieldDefn class:
virtual OGRSpatialReference* GetSpatialRef() const
OGRFeatureDefn class:
virtual const char* GetName() const
virtual int GetFieldCount() const
virtual int GetFieldIndex(const char*) const
virtual int GetGeomFieldCount() const
virtual int GetGeomFieldIndex(const char*) const
virtual OGRwkbGeometryType GetGeomType() const
virtual OGRFeatureDefn* Clone() const
virtual int IsGeometryIgnored() const
virtual int IsSame(const OGRFeatureDefn*) const // argument is const now too
OGRFeature class:
virtual OGRBoolean Equal(const OGRFeature*) const // argument is const now too
virtual const char* GetStyleString() const
virtual OGRStyleTable* GetStyleTable() const
The following virtual methods, offering const alternatives to their
non-const equivalent methods, should be overloaded if the non-const
method is overloaded.
OGRFeatureDefn class:
virtual const OGRFieldDefn* GetFieldDefn(int) const
virtual const OGRGeomFieldDefn* GetGeomFieldDefn(int) const
MIGRATION GUIDE FROM GDAL 2.1 to GDAL 2.2
-----------------------------------------
......
This diff is collapsed.
......@@ -2,7 +2,7 @@
Current:
See COMMITERS file.
See COMMITTERS file.
Historical and Current:
......@@ -70,7 +70,7 @@ In gdal/data we have several coordinate system dictionary files derived in one f
* gdal/data/cubewerx_extra.wkt: derived from definitions distributed by Cubewerx, rights unclear. See http://trac.osgeo.org/gdal/ticket/2165
* gdal/data/ecw_cs.wkt: Derived via much processing from ERMapper GDT definitions, rights unclear. See http://trac.osgeo.org/gdal/ticket/2162
* gdal/data/esri_extra.wkt: Derived with some processing from projections definitions in ArcGIS, rights unclear. See http://trac.osgeo.org/gdal/ticket/2163
* gdal/data/esri_extra.wkt + gdal/data/esri_epsg.wkt: From https://github.com/Esri/projection-engine-db-doc. Apache License 2.0. See http://trac.osgeo.org/gdal/ticket/2163
== Included Libraries ==
......@@ -122,7 +122,7 @@ Note: all the following are build options, not required.
* Contains various data files without copyright messages embedded.
* cubewerx_extra.wkt: derived from definitions distributed by Cubewerx, rights unclear. See http://trac.osgeo.org/gdal/ticket/2165
* ecw_cs.wkt: Derived via much processing from ERMapper GDT definitions, rights unclear. See http://trac.osgeo.org/gdal/ticket/2162
* esri_extra.wkt: Derived with some processing from projections definitions in ArcGIS, rights unclear. See http://trac.osgeo.org/gdal/ticket/2163
* esri_extra.wkt + esri_epsg.wkt: Provided by ESRI under Apache v2 license. See http://trac.osgeo.org/gdal/ticket/2163
* ellipsoid.csv, gcs.csv, gdal_datum.csv, pcs.csv, prime_meridian.csv, projop_wparm.csv, unit_of_measure.csv: Derived from EPSG. Modifications to EPSG data violate the EPSG use agreement (if we are to still attribute it to EPSG) so I have segregated changes into override files (i.e. gcs.override.csv).
* seed_2d.dgn, seed_3d.dgn: Exact source of these files is unclear. The files contain no substantial creative content since all but the header elements were stripped. Judged to acceptable use.
* NTS-50kindex.csv: Provided by Matt Wilkie, derived from NRCan dataset, rights unclear. See http://trac.osgeo.org/gdal/ticket/2164 (closed - this file isn't actually in the source tree - it is separately distributed as part of FWTools!)
......@@ -139,30 +139,13 @@ Note: all the following are build options, not required.
Derived from modules of GRASS 4.1 (public domain), properly noted in the headers.
See http://trac.osgeo.org/gdal/ticket/2975
=== gdal/debian ===
* copyright somewhat unclear, not actually part of software.
=== gdal/doc ===
* no copyright messages in .dox files.
* ERMapper logo used with permissions.
* "ru" subdirectory (Russian translations) by Andrey Kiselev.
=== gdal/pymod ===
* gdal_merge.py: copyright held by Atlantis, under LGPL. This is an acceptable license and it is just noted as an exception to the general MIT/X rule for GDAL but no further action required.
* gdal2xyz.py: copyright me, under LGPL - relicensed MIT/X.
* gdal_wrap.c: Generated with SWIG under very permissive license (noted in file).
* Scripts mostly by me, all ok.
=== gdal/pymod/samples ===
* gdal_vrtmerge.py: Under LGPL (derived from gdal_merge.py), several contributors.
* histrep.py: corrected copyright message (Atlantis to FrankW), change license to MIT/X.
* various contributors, all under proper and compatible copyright headers.
=== gdal/ogr/ogrsf_rmts/generic ===
=== gdal/ogr/ogrsf_frmts/generic ===
* Some files here (and elsewhere in OGR) copyright Softmap Inc (but MIT/X).
......@@ -171,11 +154,11 @@ Note: all the following are build options, not required.
* Some copyright Daniel Morissette, MIT/X.
* Included copy of dbfopen.h from Shapelib. We really ought to reference the one in ../shape.
=== gdal/ogr/ogrsf_rmts/csv ===
=== gdal/ogr/ogrsf_frmts/csv ===
* drv_*.html not copyright.
=== gdal/ogr/ogrsf_rmts/dgn ===
=== gdal/ogr/ogrsf_frmts/dgn ===
* Copyright Avenza Systems (MIT/X).
* dgn_pge.cpp, dgn_pge.h, pge_test.cpp, vbe_pge.cpp: copyright Pacific Gas and Electric, all rights reserved! (this has all been removed from trunk)
......@@ -185,10 +168,6 @@ Note: all the following are build options, not required.
* all FrankW, clean.
=== gdal/ogr/ogrsf_frmts/dxfdwg ===
* OdFileBuf.h, OdFileBuf.cpp is derived from DWGdirect source code. No copyright message! Action: This driver has been removed from subversion (#1816)
=== gdal/ogr/ogrsf_frmts/fme ===
* All code is Copyright Safe Software, "All Rights Reserved"! - License changed to MIT/X with explicit permission from Dale Lutz. Copyright still held by Safe.
......@@ -294,31 +273,6 @@ Note: all the following are build options, not required.
* swq.h, swq.c: Has alternate form of MIT/X license. On review this license is functionally equivalent to the general GDAL license.
* Copyright holders include Frank Warmerdam, Daniel Morissette, Softmap Inc., Stephane Villeneuve., Andrey Kiselev, Information Interoperability Institute
=== gdal/ogr/wcts ===
* FrankW, clean.
* No copyrights on xml sample docs (protocol messages), but also all authored under the normal terms.
* No copyright message for html docs.
=== gdal/ogr/ccclient, gdal/ogr/ccdriver ===
* Removed all contents since they are of no modern use, and may have included outside source.
=== gdal/ogr/sfcom_oledb ===
* sfcom_oledb/ICommandWidthParametersImpl.h: Provided by ESRI without clear copyright/license terms. (#1817)
* atl_net/ICRRowsetImpl.h,IFRowsetImpl.h,CCRRowsetImpl.h,SFAccessorImpl.h: Modified form of code from ATLDB.H, properly credited in the header. Copyright claim is dubious. (#1817)
* atl_net/IColumnsRowsetImpl.h: Derived from code for article by Len Holgate, JetByte Limited. It is not clear if the code is properly licensed, though it is attributed. (#1817)
* Similar issues to above in atl_vc6 directory.
* Code Copyright Softmap, FrankW,
* Some files lack headers (mostly MS Visual Studio generated files).
* Whole tree moved to /spike/sfcom_oledb to avoid problems by act of the PSC.
=== gdal/ogr/sfcom_serv ===
* Obsolete code, all deleted from CVS.
=== gdal/frmts/aaigrid ===
* FrankW, clean.
......@@ -429,9 +383,8 @@ I have added this license to LICENSE.TXT to satisfy the credit requirement.
* FrankW, clean.
=== gdal/frmts/hdf ===
=== gdal/frmts/hfa ===
* geoextra.c: Derived by public domain contribution to libgeotiff from PCI but the terms are not clear. This is a libgeotiff issue. There is no problem with the license - it just isn't well documented in the code file.
* Mostly copyright Intergraph Corporation, clean.
* hfacompress.cpp: Sam Gillingham, clean.
......@@ -502,10 +455,6 @@ I have added this license to LICENSE.TXT to satisfy the credit requirement.
* mgrs.h, mgrs.c: Derived from Geotrans (public domain), not current copyright header.
* The rest is FrankW, clean.
=== gdal/frmts/ogdi ===
* FrankW, clean.
=== gdal/frmts/pcidsk ===
* AndreyK/FrankW, clean.
......@@ -548,10 +497,6 @@ I have added this license to LICENSE.TXT to satisfy the credit requirement.
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=== gdal/frmts/pgchip ===
* Benjamin Simon, clean.
=== gdal/frmts/png ===
* FrankW, clean.
......
......@@ -8,7 +8,7 @@ OBJ = gdalmediancut.o gdaldither.o gdal_crs.o gdaltransformer.o \
gdalgrid.o gdalcutline.o gdalproximity.o rasterfill.o \
gdalrasterpolygonenumerator.o \
gdalsievefilter.o gdalwarpkernel_opencl.o polygonize.o \
contour.o gdaltransformgeolocs.o \
contour.o gdaltransformgeolocs.o gdallinearsystem.o \
gdal_octave.o gdal_simplesurf.o gdalmatching.o delaunay.o \
gdalpansharpen.o gdalapplyverticalshiftgrid.o
......@@ -33,15 +33,17 @@ endif
CPPFLAGS := -I../frmts/vrt $(CPPFLAGS) $(OPENCL_FLAGS) $(PROJ_FLAGS) $(PROJ_INCLUDE)
CXXFLAGS := $(WARN_OLD_STYLE_CAST) $(CXXFLAGS)
default: $(OBJ:.o=.$(OBJ_EXT)) gdalgridavx.$(OBJ_EXT) gdalgridsse.$(OBJ_EXT)
# We use CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT to avoid the whole library to be compiled with -mavx
# if -mavx is not the default
gdalgridavx.$(OBJ_EXT): gdalgridavx.cpp
$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT) $(AVXFLAGS) $(CPPFLAGS) -c -o $@ $<
$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS_NO_LTO_IF_AVX_NONDEFAULT) $(WARN_OLD_STYLE_CAST) $(AVXFLAGS) $(CPPFLAGS) -c -o $@ $<
gdalgridsse.$(OBJ_EXT): gdalgridsse.cpp
$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(SSEFLAGS) $(CPPFLAGS) -c -o $@ $<
$(CXX) $(GDAL_INCLUDE) $(CXXFLAGS) $(WARN_OLD_STYLE_CAST) $(SSEFLAGS) $(CPPFLAGS) -c -o $@ $<
clean:
$(RM) *.o $(O_OBJ)
......@@ -49,8 +51,17 @@ clean:
docs:
(cd ..; $(MAKE) docs)
INST_H_FILES = \
gdal_alg.h \
gdal_alg_priv.h \
gdalgrid.h \
gdalgrid_priv.h \
gdalpansharpen.h \
gdal_simplesurf.h \
gdalwarper.h
install:
for f in *.h ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done
for f in $(INST_H_FILES) ; do $(INSTALL_DATA) $$f $(DESTDIR)$(INST_INCLUDE) ; done
lib: $(OBJ:.o=.$(OBJ_EXT))
(cd .. ; $(MAKE) force-lib)
......@@ -45,17 +45,17 @@
#include "ogr_api.h"
#include "ogr_core.h"
CPL_CVSID("$Id: contour.cpp 36689 2016-12-04 22:33:33Z goatbar $");
CPL_CVSID("$Id: contour.cpp 9ff327806cd64df6d73a6c91f92d12ca0c5e07df 2018-04-07 20:25:06 +0200 Even Rouault $")
// The amount of a contour interval that pixels should be fudged by if they
// match a contour level exactly.
static const double FUDGE_EXACT = 0.001;
constexpr double FUDGE_EXACT = 0.001;
// The amount of a pixel that line ends need to be within to be considered to
// match for joining purposes.
static const double JOIN_DIST = 0.0001;
constexpr double JOIN_DIST = 0.0001;
/************************************************************************/
/* GDALContourItem */
......@@ -201,13 +201,13 @@ GDAL_CG_Create( int nWidth, int nHeight, int bNoDataSet, double dfNoDataValue,
if( !poCG->Init() )
{
delete poCG;
return NULL;
return nullptr;
}
if( bNoDataSet )
poCG->SetNoData( dfNoDataValue );
poCG->SetContourLevels( dfContourInterval, dfContourBase );
return (GDALContourGeneratorH) poCG;
return reinterpret_cast<GDALContourGeneratorH>(poCG);
}
/************************************************************************/
......@@ -250,11 +250,11 @@ GDALContourGenerator::GDALContourGenerator( int nWidthIn, int nHeightIn,
nWidth(nWidthIn),
nHeight(nHeightIn),
iLine(-1),
padfLastLine(NULL),
padfThisLine(NULL),
padfLastLine(nullptr),
padfThisLine(nullptr),
nLevelMax(0),
nLevelCount(0),
papoLevels(NULL),
papoLevels(nullptr),
bNoDataActive(false),
dfNoDataValue(-1000000.0),
bFixedLevels(false),
......@@ -289,7 +289,7 @@ bool GDALContourGenerator::Init()
static_cast<double *>(VSI_CALLOC_VERBOSE(sizeof(double), nWidth));
padfThisLine =
static_cast<double *>(VSI_CALLOC_VERBOSE(sizeof(double), nWidth));
return padfLastLine != NULL && padfThisLine != NULL;
return padfLastLine != nullptr && padfThisLine != nullptr;
}
/************************************************************************/
......@@ -715,7 +715,7 @@ CPLErr GDALContourGenerator::AddSegment( double dfLevel,
{
GDALContourLevel *poLevel = FindLevel( dfLevel );
GDALContourItem *poTarget = NULL;
GDALContourItem *poTarget = nullptr;
/* -------------------------------------------------------------------- */
/* Check all active contours for any that this might attach */
......@@ -770,7 +770,7 @@ CPLErr GDALContourGenerator::FeedLine( double *padfScanline )
/* If this is the end of the lines (NULL passed in), copy the */
/* last line. */
/* -------------------------------------------------------------------- */
if( padfScanline == NULL )
if( padfScanline == nullptr )
{
memcpy( padfThisLine, padfLastLine, sizeof(double) * nWidth );
}
......@@ -837,12 +837,12 @@ CPLErr GDALContourGenerator::FeedLine( double *padfScanline )
/* -------------------------------------------------------------------- */
/* eject any pending contours. */
/* -------------------------------------------------------------------- */
CPLErr eErr = EjectContours( padfScanline != NULL );
CPLErr eErr = EjectContours( padfScanline != nullptr );
iLine++;
if( iLine == nHeight && eErr == CE_None )
return FeedLine( NULL );
return FeedLine( nullptr );
return eErr;
}
......@@ -891,7 +891,7 @@ CPLErr GDALContourGenerator::EjectContours( int bOnlyUnused )
// If we didn't merge it, then eject (write) it out.
if( iC2 == poLevel->GetContourCount() )
{
if( pfnWriter != NULL )
if( pfnWriter != nullptr )
{
// If direction is wrong, then reverse before ejecting.
poTarget->PrepareEjection();
......@@ -972,7 +972,7 @@ GDALContourLevel::GDALContourLevel( double dfLevelIn ) :
dfLevel(dfLevelIn),
nEntryMax(0),
nEntryCount(0),
papoEntries(NULL)
papoEntries(nullptr)
{}
/************************************************************************/
......@@ -1147,8 +1147,8 @@ GDALContourItem::GDALContourItem( double dfLevelIn ) :
dfLevel(dfLevelIn),
nPoints(0),
nMaxPoints(0),
padfX(NULL),
padfY(NULL),
padfX(nullptr),
padfY(nullptr),
bLeftIsHigh(false),
dfTailX(0.0)
{}
......@@ -1460,9 +1460,10 @@ CPLErr OGRContourWriter( double dfLevel,
{
OGRContourWriterInfo *poInfo = static_cast<OGRContourWriterInfo *>(pInfo);
OGRFeatureH hFeat =
OGR_F_Create(
OGR_L_GetLayerDefn( static_cast<OGRLayerH>(poInfo->hLayer) ));
OGRFeatureDefnH hFDefn =
OGR_L_GetLayerDefn( static_cast<OGRLayerH>(poInfo->hLayer) );
OGRFeatureH hFeat = OGR_F_Create( hFDefn );
if( poInfo->nIDField != -1 )
OGR_F_SetFieldInteger( hFeat, poInfo->nIDField, poInfo->nNextID++ );
......@@ -1470,18 +1471,22 @@ CPLErr OGRContourWriter( double dfLevel,
if( poInfo->nElevField != -1 )
OGR_F_SetFieldDouble( hFeat, poInfo->nElevField, dfLevel );
OGRGeometryH hGeom = OGR_G_CreateGeometry( wkbLineString );
const bool bHasZ = wkbHasZ(OGR_FD_GetGeomType(hFDefn));
OGRGeometryH hGeom = OGR_G_CreateGeometry(
bHasZ ? wkbLineString25D : wkbLineString );
for( int iPoint = nPoints - 1; iPoint >= 0; iPoint-- )
{
OGR_G_SetPoint( hGeom, iPoint,
poInfo->adfGeoTransform[0]
const double dfX = poInfo->adfGeoTransform[0]
+ poInfo->adfGeoTransform[1] * padfX[iPoint]
+ poInfo->adfGeoTransform[2] * padfY[iPoint],
poInfo->adfGeoTransform[3]
+ poInfo->adfGeoTransform[2] * padfY[iPoint];
const double dfY = poInfo->adfGeoTransform[3]
+ poInfo->adfGeoTransform[4] * padfX[iPoint]
+ poInfo->adfGeoTransform[5] * padfY[iPoint],
dfLevel );
+ poInfo->adfGeoTransform[5] * padfY[iPoint];
if( bHasZ )
OGR_G_SetPoint( hGeom, iPoint, dfX, dfY, dfLevel );
else
OGR_G_SetPoint_2D( hGeom, iPoint, dfX, dfY );
}
OGR_F_SetGeometryDirectly( hFeat, hGeom );
......@@ -1642,7 +1647,7 @@ CPLErr GDALContourGenerate( GDALRasterBandH hBand,
OGRContourWriterInfo oCWI;
if( pfnProgress == NULL )
if( pfnProgress == nullptr )
pfnProgress = GDALDummyProgress;
if( !pfnProgress( 0.0, "", pProgressArg ) )
......@@ -1666,7 +1671,7 @@ CPLErr GDALContourGenerate( GDALRasterBandH hBand,
oCWI.adfGeoTransform[4] = 0.0;
oCWI.adfGeoTransform[5] = 1.0;
GDALDatasetH hSrcDS = GDALGetBandDataset( hBand );
if( hSrcDS != NULL )
if( hSrcDS != nullptr )
GDALGetGeoTransform( hSrcDS, oCWI.adfGeoTransform );
oCWI.nNextID = 0;
......@@ -1695,7 +1700,7 @@ CPLErr GDALContourGenerate( GDALRasterBandH hBand,
/* -------------------------------------------------------------------- */
double *padfScanline =
static_cast<double *>(VSI_MALLOC2_VERBOSE(sizeof(double), nXSize));
if( padfScanline == NULL )
if( padfScanline == nullptr )
{
return CE_Failure;
}
......
/******************************************************************************
* $Id: delaunay.c 40486 2017-10-18 14:26:45Z rouault $
*
* Project: GDAL algorithms
* Purpose: Delaunay triangulation
......@@ -50,7 +49,7 @@
#include <ctype.h>
#include <math.h>
CPL_CVSID("$Id: delaunay.c 40486 2017-10-18 14:26:45Z rouault $");
CPL_CVSID("$Id: delaunay.c ea2627dc5205e30d3463c64718c3bd147ce0b8c0 2017-10-18 14:26:25Z Even Rouault $")
#if defined(INTERNAL_QHULL) || defined(EXTERNAL_QHULL)
#define HAVE_INTERNAL_OR_EXTERNAL_QHULL 1
......
/******************************************************************************
* $Id: gdal_alg.h 39654 2017-07-24 19:24:32Z rouault $
* $Id: gdal_alg.h ecc4064ad058e92440d85c2a83501cc45579c06c 2017-07-24 19:24:22Z Even Rouault $
*
* Project: GDAL Image Processing Algorithms
* Purpose: Prototypes, and definitions for various GDAL based algorithms.
......
/******************************************************************************
* $Id: gdal_alg_priv.h 36411 2016-11-21 22:03:48Z rouault $
* $Id: gdal_alg_priv.h e13dcd4dc171dfeed63f912ba06b9374ce4f3bb2 2018-03-18 21:37:41Z Even Rouault $
*
* Project: GDAL Image Processing Algorithms
* Purpose: Prototypes and definitions for various GDAL based algorithms:
......@@ -61,6 +61,13 @@ typedef struct {
GDALRasterMergeAlg eMergeAlg;
} GDALRasterizeInfo;
typedef enum {
GRO_Raster = 0,
GRO_Vector = 1,
GRO_Auto = 2,
} GDALRasterizeOptim;
/************************************************************************/
/* Low level rasterizer API. */
/************************************************************************/
......@@ -130,17 +137,17 @@ public:
struct IntEqualityTest
{
bool operator()(GInt32 a, GInt32 b) { return a == b; }
bool operator()(GInt32 a, GInt32 b) const { return a == b; }
};
typedef GDALRasterPolygonEnumeratorT<GInt32, IntEqualityTest> GDALRasterPolygonEnumerator;
typedef void* (*GDALTransformDeserializeFunc)( CPLXMLNode *psTree );
void* GDALRegisterTransformDeserializer(const char* pszTransformName,
void CPL_DLL *GDALRegisterTransformDeserializer(const char* pszTransformName,
GDALTransformerFunc pfnTransformerFunc,
GDALTransformDeserializeFunc pfnDeserializeFunc);
void GDALUnregisterTransformDeserializer(void* pData);
void CPL_DLL GDALUnregisterTransformDeserializer(void* pData);
void GDALCleanupTransformDeserializerMutex();
......
/******************************************************************************
* $Id: gdal_crs.c 36530 2016-11-27 18:04:36Z goatbar $
*
* Project: Mapinfo Image Warper
* Purpose: Implementation of the GDALTransformer wrapper around CRS.C functions
......@@ -62,7 +61,7 @@
#include <stdlib.h>
#include <string.h>
CPL_CVSID("$Id: gdal_crs.c 36530 2016-11-27 18:04:36Z goatbar $");
CPL_CVSID("$Id: gdal_crs.c ff8146d84de7cba8e09d212d5481ea7d2ede3e98 2017-06-27 20:47:31Z Even Rouault $")
/* Hum, we cannot include gdal_priv.h from a .c file... */
CPL_C_START
......@@ -140,8 +139,8 @@ static const char * const CRS_error_message[] = {
static
void* GDALCreateSimilarGCPTransformer( void *hTransformArg, double dfRatioX, double dfRatioY )
{
int i;
GDAL_GCP *pasGCPList;
int i = 0;
GDAL_GCP *pasGCPList = NULL;
GCPTransformInfo *psInfo = (GCPTransformInfo *) hTransformArg;
VALIDATE_POINTER1( hTransformArg, "GDALCreateSimilarGCPTransformer", NULL );
......@@ -179,10 +178,14 @@ void *GDALCreateGCPTransformerEx( int nGCPCount, const GDAL_GCP *pasGCPList,
int nReqOrder, int bReversed, int bRefine, double dfTolerance, int nMinimumGcps)
{
GCPTransformInfo *psInfo;
double *padfGeoX, *padfGeoY, *padfRasterX, *padfRasterY;
int *panStatus, iGCP;
int nCRSresult;
GCPTransformInfo *psInfo = NULL;
double *padfGeoX = NULL;
double *padfGeoY = NULL;
double *padfRasterX = NULL;
double *padfRasterY = NULL;
int *panStatus = NULL;
int iGCP = 0;
int nCRSresult = 0;
struct Control_Points sPoints;
memset( &sPoints, 0, sizeof(sPoints) );
......@@ -386,7 +389,7 @@ int GDALGCPTransform( void *pTransformArg, int bDstToSrc,
int *panSuccess )
{
int i;
int i = 0;
GCPTransformInfo *psInfo = (GCPTransformInfo *) pTransformArg;
if( psInfo->bReversed )
......@@ -425,7 +428,7 @@ int GDALGCPTransform( void *pTransformArg, int bDstToSrc,
CPLXMLNode *GDALSerializeGCPTransformer( void *pTransformArg )
{
CPLXMLNode *psTree;
CPLXMLNode *psTree = NULL;
GCPTransformInfo *psInfo = (GCPTransformInfo *) pTransformArg;
VALIDATE_POINTER1( pTransformArg, "GDALSerializeGCPTransformer", NULL );
......@@ -486,12 +489,12 @@ void *GDALDeserializeGCPTransformer( CPLXMLNode *psTree )
{
GDAL_GCP *pasGCPList = 0;
int nGCPCount = 0;
void *pResult;
int nReqOrder;
int bReversed;
int bRefine;
int nMinimumGcps;
double dfTolerance;
void *pResult = NULL;
int nReqOrder = 0;
int bReversed = 0;
int bRefine = 0;
int nMinimumGcps = 0;
double dfTolerance = 0.0;
/* -------------------------------------------------------------------- */
/* Check for GCPs. */
......@@ -598,7 +601,13 @@ CRS_georef (
ORDER USED TO CALCULATE THE COEFFICIENTS */
)
{
double e3, e2n, en2, n3, e2, en, n2;
double e3 = 0.0;
double e2n = 0.0;
double en2 = 0.0;
double n3 = 0.0;
double e2 = 0.0;
double en = 0.0;
double n2 = 0.0;
switch(order)
{
......@@ -660,8 +669,8 @@ CRS_compute_georef_equations (struct Control_Points *cp,
double E21[], double N21[],
int order)
{
double *tempptr;
int status;
double *tempptr = NULL;
int status = 0;
if(order < 1 || order > MAXORDER)
return(MPARMERR);
......@@ -707,10 +716,11 @@ static int
calccoef (struct Control_Points *cp, double E[], double N[], int order)
{
struct MATRIX m;
double *a;
double *b;
int numactive; /* NUMBER OF ACTIVE CONTROL POINTS */
int status, i;
double *a = NULL;
double *b = NULL;
int numactive = 0; /* NUMBER OF ACTIVE CONTROL POINTS */
int status = 0;
int i = 0;
memset( &m, 0, sizeof(m) );
......@@ -779,9 +789,10 @@ static int exactdet (
double N[] /* NORTHING COEFFICIENTS */
)
{
int pntnow, currow, j;
int pntnow = 0;
int currow = 1;
int j = 0;
currow = 1;
for(pntnow = 0 ; pntnow < cp->count ; pntnow++)
{
if(cp->status[pntnow] > 0)
......@@ -825,7 +836,7 @@ static int calcls (
double N[] /* NORTHING COEFFICIENTS */
)
{
int i, j, n, numactive = 0;
int i = 0, j = 0, n = 0, numactive = 0;
/* INITIALIZE THE UPPER HALF OF THE MATRIX AND THE TWO COLUMN VECTORS */
......@@ -920,9 +931,14 @@ static double term (int nTerm, double e, double n)
static int solvemat (struct MATRIX *m,
double a[], double b[], double E[], double N[])
{
int i, j, i2, j2, imark;
double factor, temp;
double pivot; /* ACTUAL VALUE OF THE LARGEST PIVOT CANDIDATE */
int i = 0;
int j = 0;
int i2 = 0;
int j2 = 0;
int imark = 0;
double factor = 0.0;
double temp = 0.0;
double pivot = 0.0; /* ACTUAL VALUE OF THE LARGEST PIVOT CANDIDATE */
for(i = 1 ; i <= m->n ; i++)
{
......@@ -1026,14 +1042,19 @@ static int solvemat (struct MATRIX *m,
/***************************************************************************/
static int worst_outlier(struct Control_Points *cp, double E[], double N[], double dfTolerance)
{
double *padfResiduals;
int nI, nIndex;
double dfDifference, dfSampleResidual, dfLineResidual, dfSampleRes, dfLineRes, dfCurrentDifference;
double dfE1, dfN1, dfE2, dfN2, dfEn;
padfResiduals = (double *) CPLCalloc(sizeof(double),cp->count);
dfSampleResidual = 0.0;
dfLineResidual = 0.0;
int nI = 0, nIndex = 0;
double dfDifference = 0.0;
double dfSampleRes = 0.0;
double dfLineRes = 0.0;
double dfCurrentDifference = 0.0;
double dfE1 = 0.0;
double dfN1 = 0.0;
double dfE2 = 0.0;
double dfN2 = 0.0;
double dfEn = 0.0;
double dfSampleResidual = 0.0;
double dfLineResidual = 0.0;
double *padfResiduals = (double *) CPLCalloc(sizeof(double),cp->count);
for(nI = 0; nI < cp->count; nI++)
{
......@@ -1087,10 +1108,17 @@ static int worst_outlier(struct Control_Points *cp, double E[], double N[], doub
/***************************************************************************/
static int remove_outliers( GCPTransformInfo *psInfo )
{
double *padfGeoX, *padfGeoY, *padfRasterX, *padfRasterY;
int *panStatus;
int nI, nCRSresult, nGCPCount, nMinimumGcps, nReqOrder;
double dfTolerance;
double *padfGeoX = NULL;
double *padfGeoY = NULL;
double *padfRasterX = NULL;
double *padfRasterY = NULL;
int *panStatus = NULL;
int nI = 0;
int nCRSresult = 0;
int nGCPCount = 0;
int nMinimumGcps = 0;
int nReqOrder = 0;
double dfTolerance = 0;
struct Control_Points sPoints;
memset( &sPoints, 0, sizeof(sPoints) );
......@@ -1129,9 +1157,9 @@ static int remove_outliers( GCPTransformInfo *psInfo )
while(sPoints.count > nMinimumGcps)
{
int nIndex;
nIndex = worst_outlier(&sPoints, psInfo->adfFromGeoX, psInfo->adfFromGeoY, dfTolerance);
int nIndex =
worst_outlier(&sPoints, psInfo->adfFromGeoX, psInfo->adfFromGeoY,
dfTolerance);
//If no outliers were detected, stop the GCP elimination
if(nIndex == -1)
......
/******************************************************************************
* $Id: gdal_nrgcrs.c 34519 2016-07-02 21:09:22Z goatbar $
* $Id: gdal_nrgcrs.c 678d89afcc4ec43e300b2f337b51349139543d01 2016-06-30 22:42:39Z Kurt Schwehr $
*
* Project: Mapinfo Image Warper
* Purpose: Implementation of the GDALTransformer wrapper around CRS.C functions
......
......@@ -27,7 +27,7 @@
#include "gdal_simplesurf.h"
CPL_CVSID("$Id: gdal_octave.cpp 36960 2016-12-19 14:13:21Z rouault $");
CPL_CVSID("$Id: gdal_octave.cpp 7e07230bbff24eb333608de4dbd460b7312839d0 2017-12-11 19:08:47Z Even Rouault $")
/************************************************************************/
/* ==================================================================== */
......@@ -37,7 +37,7 @@ CPL_CVSID("$Id: gdal_octave.cpp 36960 2016-12-19 14:13:21Z rouault $");
GDALIntegralImage::GDALIntegralImage()
{
pMatrix = NULL;
pMatrix = nullptr;
nHeight = 0;
nWidth = 0;
}
......@@ -169,8 +169,8 @@ GDALOctaveLayer::GDALOctaveLayer( int nOctave, int nInterval ) :
scale(static_cast<int>(pow(2.0, nOctave))),
width(0),
height(0),
detHessians(NULL),
signs(NULL)
detHessians(nullptr),
signs(nullptr)
{}
void GDALOctaveLayer::ComputeLayer( GDALIntegralImage *poImg )
......
This diff is collapsed.
......@@ -29,7 +29,7 @@
#include <algorithm>
CPL_CVSID("$Id: gdal_simplesurf.cpp 36714 2016-12-06 04:34:21Z goatbar $");
CPL_CVSID("$Id: gdal_simplesurf.cpp 7e07230bbff24eb333608de4dbd460b7312839d0 2017-12-11 19:08:47Z Even Rouault $")
/************************************************************************/
/* ==================================================================== */
......@@ -138,7 +138,7 @@ CPLErr GDALSimpleSURF::ConvertRGBToLuminosity(
GDALRasterBand *red, GDALRasterBand *green, GDALRasterBand *blue,
int nXSize, int nYSize, double **padfImg, int nHeight, int nWidth )
{
if( red == NULL || green == NULL || blue == NULL )
if( red == nullptr || green == nullptr || blue == nullptr )
{
CPLError(CE_Failure, CPLE_AppDefined,
"Raster bands are not specified");
......@@ -152,7 +152,7 @@ CPLErr GDALSimpleSURF::ConvertRGBToLuminosity(
return CE_Failure;
}
if( padfImg == NULL )
if( padfImg == nullptr )
{
CPLError(CE_Failure, CPLE_AppDefined, "Buffer isn't specified");
return CE_Failure;
......@@ -175,13 +175,13 @@ CPLErr GDALSimpleSURF::ConvertRGBToLuminosity(
void *paBlueLayer = CPLMalloc(dataBlueSize * nWidth * nHeight);
CPLErr eErr = red->RasterIO(GF_Read, 0, 0, nXSize, nYSize, paRedLayer,
nWidth, nHeight, eRedType, 0, 0, NULL);
nWidth, nHeight, eRedType, 0, 0, nullptr);
if( eErr == CE_None )
eErr = green->RasterIO(GF_Read, 0, 0, nXSize, nYSize, paGreenLayer,
nWidth, nHeight, eGreenType, 0, 0, NULL);
nWidth, nHeight, eGreenType, 0, 0, nullptr);
if( eErr == CE_None )
eErr = blue->RasterIO(GF_Read, 0, 0, nXSize, nYSize, paBlueLayer,
nWidth, nHeight, eBlueType, 0, 0, NULL);
nWidth, nHeight, eBlueType, 0, 0, nullptr);
double maxValue = 255.0;
for( int row = 0; row < nHeight && eErr == CE_None; row++ )
......@@ -371,14 +371,14 @@ CPLErr GDALSimpleSURF::MatchFeaturePoints(
/* -------------------------------------------------------------------- */
/* Validate parameters. */
/* -------------------------------------------------------------------- */
if( poMatchPairs == NULL )
if( poMatchPairs == nullptr )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Matched points collection isn't specified" );
return CE_Failure;
}
if( poFirstCollect == NULL || poSecondCollect == NULL )
if( poFirstCollect == nullptr || poSecondCollect == nullptr )
{
CPLError(CE_Failure, CPLE_AppDefined,
"Feature point collections are not specified");
......