This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository qgis.
commit 5c53d306d3dabc4b0a86fd41704cc6163ce901ef Author: Bas Couwenberg <[email protected]> Date: Sat Apr 22 12:18:45 2017 +0200 Imported Upstream version 2.14.14+dfsg --- CMakeLists.txt | 2 +- ChangeLog | 46 +++++++++++++++++++ debian/changelog | 10 +++- .../MetaSearch/resources/connections-default.xml | 2 +- .../plugins/processing/algs/grass7/Grass7Utils.py | 53 ++++++++++++++++++---- .../plugins/processing/algs/qgis/FieldsMapper.py | 51 +++++++++++---------- .../processing/algs/qgis/spatialite_utils.py | 6 +-- .../processing/algs/saga/SagaAlgorithmProvider.py | 2 +- python/plugins/processing/algs/saga/SagaUtils.py | 27 +++++++---- src/app/pluginmanager/qgspluginmanager.cpp | 2 +- src/core/geometry/qgscurvepolygonv2.cpp | 7 ++- 11 files changed, 156 insertions(+), 52 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e079ba..5d530b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ SET(CPACK_PACKAGE_VERSION_MAJOR "2") SET(CPACK_PACKAGE_VERSION_MINOR "14") -SET(CPACK_PACKAGE_VERSION_PATCH "13") +SET(CPACK_PACKAGE_VERSION_PATCH "14") SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) SET(RELEASE_NAME "Essen") IF (POLICY CMP0048) # in CMake 3.0.0+ diff --git a/ChangeLog b/ChangeLog index 2e35f3c..806ff27 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,49 @@ +rldhont <[email protected]> 2017-04-20 + + [BUGFIX][Processing] Fix spatialite version comparison + +Mathieu Pellerin <[email protected]> 2017-04-19 + + fix qgis startup crash with plugin manager (#4372) + +Borys Jurgiel <[email protected]> 2017-04-06 + + Fix Refactor Fields error if layer has no features + +Tom Kralidis <[email protected]> 2017-04-05 + + backport a30cf2923c75e786f085593a1c69463310aae66d + +Juergen E. Fischer <[email protected]> 2017-01-25 + + [processing] find grass >=7.0 + + (backport of 099e7a7) + +rldhont <[email protected]> 2017-03-27 + + [BUGFIX][Processing] SAGA not loaded on QGIS 2.18.5 + + Fixed #16378 + +Marco Hugentobler <[email protected]> 2017-03-26 + + Fix wkt import for QgsCurvePolygonV2. Backport to 2.14 + +Juergen E. Fischer <[email protected]> 2017-03-24 + + make travis even happier + +Juergen E. Fischer <[email protected]> 2017-02-19 + + processing: improve saga detection on windows + + (cherry picked from commit 0d1ab702fc7112afabf5319ad947a445bb219acd) + +Juergen E. Fischer <[email protected]> 2017-03-24 + + Release of 2.14.13 + Merge: 58bd0e14bd b1ae883d08 rldhont <[email protected]> 2017-03-23 diff --git a/debian/changelog b/debian/changelog index 113a451..9bb89ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,14 @@ -qgis (2.14.13) UNRELEASED; urgency=medium +qgis (2.14.14) UNRELEASED; urgency=medium + + * Release of 2.14.14 + + -- Jürgen E. Fischer <[email protected]> Fri, 21 Apr 2017 14:36:44 +0200 + +qgis (2.14.13) unstable; urgency=medium * Release of 2.14.13 - -- Jürgen E. Fischer <[email protected]> Fri, 24 Mar 2017 13:21:50 +0100 + -- Jürgen E. Fischer <[email protected]> Fri, 21 Apr 2017 14:36:44 +0200 qgis (2.14.12) unstable; urgency=medium diff --git a/python/plugins/MetaSearch/resources/connections-default.xml b/python/plugins/MetaSearch/resources/connections-default.xml index 49a8dbf..7068fc3 100644 --- a/python/plugins/MetaSearch/resources/connections-default.xml +++ b/python/plugins/MetaSearch/resources/connections-default.xml @@ -9,7 +9,7 @@ <csw name="Italy: National CSW (Geoportale Nazionale - Servizio di ricerca Italiano)" url="http://www.pcn.minambiente.it/geoportal/csw"/> <csw name="Italy: RNDT - Repertorio Nazionale dei Dati Territoriali - Servizio di ricerca" url="http://www.rndt.gov.it/RNDT/CSW"/> <csw name="New Zealand: LINZ Data Service" url="http://data.linz.govt.nz/feeds/csw"/> - <csw name="Netherlands: National CSW (Nationaal Georegister)" url="http://www.nationaalgeoregister.nl/geonetwork/srv/eng/csw"/> + <csw name="Netherlands: National CSW (Nationaal Georegister)" url="http://www.nationaalgeoregister.nl/geonetwork/srv/dut/csw"/> <csw name="Norway: National CSW (Geonorge)" url="http://www.geonorge.no/geonetwork/srv/no/csw"/> <csw name="Sweden: National CSW" url="http://www.geodata.se/InspireCswProxy/csw"/> <csw name="UK Location Catalogue Publishing Service" url="http://csw.data.gov.uk/geonetwork/srv/en/csw"/> diff --git a/python/plugins/processing/algs/grass7/Grass7Utils.py b/python/plugins/processing/algs/grass7/Grass7Utils.py index dd7dcb4..377ef6e 100644 --- a/python/plugins/processing/algs/grass7/Grass7Utils.py +++ b/python/plugins/processing/algs/grass7/Grass7Utils.py @@ -55,6 +55,9 @@ class Grass7Utils: isGrass7Installed = False + version = None + command = None + @staticmethod def grassBatchJobFilename(): '''This is used in Linux. This is the batch job that we assign to @@ -74,10 +77,33 @@ class Grass7Utils: return filename @staticmethod - def getGrassVersion(): - # FIXME: I do not know if this should be removed or let the user enter it - # or something like that... This is just a temporary thing - return '7.0.0' + def installedVersion(run=False): + if Grass7Utils.isGrass7Installed and not run: + return Grass7Utils.version + + if Grass7Utils.grassPath() is None: + return None + + for command in ["grass73", "grass72", "grass71", "grass70", "grass"]: + proc = subprocess.Popen( + ["{} -v".format(command)], + shell=True, + stdout=subprocess.PIPE, + stdin=open(os.devnull), + stderr=subprocess.STDOUT, + universal_newlines=True, + ) + if proc: + lines = proc.stdout.readlines() + for line in lines: + if "GRASS GIS " in line: + line = line.split(" ")[-1].strip() + if line.startswith("7."): + Grass7Utils.version = line + Grass7Utils.command = command + return Grass7Utils.version + + return Grass7Utils.version @staticmethod def grassPath(): @@ -98,6 +124,16 @@ class Grass7Utils: for subfolder in os.listdir(testfolder): if subfolder.startswith('grass-7'): folder = os.path.join(testfolder, subfolder) + fn = os.path.join(folder, "etc", "VERSIONNUMBER") + if not os.path.isfile(fn): + continue + + f = open(fn, "r") + Grass7Utils.version = f.read().split(' ')[0] + f.close() + + major, minor, patch = Grass7Utils.version.split('.') + Grass7Utils.command = "grass{}{}".format(major, minor) break else: folder = os.path.join(unicode(QgsApplication.prefixPath()), 'grass7') @@ -141,7 +177,7 @@ class Grass7Utils: output.write('if "%GRASS_ADDON_PATH%"=="" set PATH=%WINGISBASE%\\bin;%WINGISBASE%\\lib;%PATH%\n') output.write('if not "%GRASS_ADDON_PATH%"=="" set PATH=%WINGISBASE%\\bin;%WINGISBASE%\\lib;%GRASS_ADDON_PATH%;%PATH%\n') output.write('\n') - output.write('set GRASS_VERSION=' + Grass7Utils.getGrassVersion() + '\n') + output.write('set GRASS_VERSION=' + Grass7Utils.installedVersion() + '\n') output.write('if not "%LANG%"=="" goto langset\n') output.write('FOR /F "usebackq delims==" %%i IN (`"%WINGISBASE%\\etc\\winlocale"`) DO @set LANG=%%i\n') output.write(':langset\n') @@ -251,8 +287,9 @@ class Grass7Utils: command = Grass7Utils.grassPath() + os.sep + 'grass.sh ' \ + Grass7Utils.grassMapsetFolder() + '/PERMANENT' else: - command = 'grass70 ' + Grass7Utils.grassMapsetFolder() \ - + '/PERMANENT' + if Grass7Utils.command is None: + Grass7Utils.installedVersion() + command = Grass7Utils.command + ' ' + os.path.join(Grass7Utils.grassMapsetFolder(), 'PERMANENT') return command, env @@ -417,4 +454,4 @@ class Grass7Utils: helpPath = os.path.abspath(path) break - return helpPath if helpPath is not None else 'http://grass.osgeo.org/grass70/manuals/' + return helpPath if helpPath is not None else 'http://grass.osgeo.org/{}/manuals/'.format(Grass7Utils.command) diff --git a/python/plugins/processing/algs/qgis/FieldsMapper.py b/python/plugins/processing/algs/qgis/FieldsMapper.py index 4b50e98..267fa64 100644 --- a/python/plugins/processing/algs/qgis/FieldsMapper.py +++ b/python/plugins/processing/algs/qgis/FieldsMapper.py @@ -115,30 +115,33 @@ class FieldsMapper(GeoAlgorithm): inFeat = QgsFeature() outFeat = QgsFeature() features = vector.features(layer) - total = 100.0 / len(features) - for current, inFeat in enumerate(features): - rownum = current + 1 - - outFeat.setGeometry(inFeat.geometry()) - - attrs = [] - for i in xrange(0, len(mapping)): - field_def = mapping[i] - expression = expressions[i] - exp_context.setFeature(inFeat) - exp_context.lastScope().setVariable("row_number", rownum) - value = expression.evaluate(exp_context) - if expression.hasEvalError(): - calculationSuccess = False - error = expression.evalErrorString() - break - - attrs.append(value) - outFeat.setAttributes(attrs) - - writer.addFeature(outFeat) - - progress.setPercentage(int(current * total)) + if len(features): + total = 100.0 / len(features) + for current, inFeat in enumerate(features): + rownum = current + 1 + + outFeat.setGeometry(inFeat.geometry()) + + attrs = [] + for i in xrange(0, len(mapping)): + field_def = mapping[i] + expression = expressions[i] + exp_context.setFeature(inFeat) + exp_context.lastScope().setVariable("row_number", rownum) + value = expression.evaluate(exp_context) + if expression.hasEvalError(): + calculationSuccess = False + error = expression.evalErrorString() + break + + attrs.append(value) + outFeat.setAttributes(attrs) + + writer.addFeature(outFeat) + + progress.setPercentage(int(current * total)) + else: + progress.setPercentage(100) del writer diff --git a/python/plugins/processing/algs/qgis/spatialite_utils.py b/python/plugins/processing/algs/qgis/spatialite_utils.py index 3c5f314..8cd0e09 100644 --- a/python/plugins/processing/algs/qgis/spatialite_utils.py +++ b/python/plugins/processing/algs/qgis/spatialite_utils.py @@ -26,6 +26,7 @@ __copyright__ = '(C) 2015, René-Luc Dhont' __revision__ = '$Format:%H$' from pyspatialite import dbapi2 as sqlite +import re class DbError(Exception): @@ -64,11 +65,10 @@ class GeoDB: try: self._exec_sql(c, u'SELECT spatialite_version()') rep = c.fetchall() - v = [int(a) for a in rep[0][0].split('.')] - vv = v[0] * 100000 + v[1] * 1000 + v[2] * 10 + v = [int(x) if x.isdigit() else x for x in re.findall("\d+|[a-zA-Z]+", rep[0][0])] # Add spatialite support - if vv >= 401000: + if v >= [4, 1, 0]: # 4.1 and above sql = "SELECT initspatialmetadata(1)" else: diff --git a/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py b/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py index be49232..47472ea 100644 --- a/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py +++ b/python/plugins/processing/algs/saga/SagaAlgorithmProvider.py @@ -53,7 +53,7 @@ class SagaAlgorithmProvider(AlgorithmProvider): "2.2.2": ("2.2.2", SagaAlgorithm214), "2.2.3": ("2.2.3", SagaAlgorithm214), "2.3.0": ("2.3.0", SagaAlgorithm230), - "2.3.1": ("2.3.1", SagaAlgorithm230)} + "2.3.1": ("2.3.0", SagaAlgorithm230)} def __init__(self): AlgorithmProvider.__init__(self) diff --git a/python/plugins/processing/algs/saga/SagaUtils.py b/python/plugins/processing/algs/saga/SagaUtils.py index 819a9d0..2155294 100644 --- a/python/plugins/processing/algs/saga/SagaUtils.py +++ b/python/plugins/processing/algs/saga/SagaUtils.py @@ -63,9 +63,17 @@ def findSagaFolder(): if os.path.exists(os.path.join(testfolder, 'saga_cmd')): folder = testfolder elif isWindows(): - testfolder = os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'saga') - if os.path.exists(os.path.join(testfolder, 'saga_cmd.exe')): - folder = testfolder + folders = [] + folders.append(os.path.join(os.path.dirname(QgsApplication.prefixPath()), 'saga')) + if "OSGEO4W_ROOT" in os.environ: + folders.append(os.path.join(str(os.environ['OSGEO4W_ROOT']), "apps", "saga-ltr")) + folders.append(os.path.join(str(os.environ['OSGEO4W_ROOT']), "apps", "saga")) + + for testfolder in folders: + if os.path.exists(os.path.join(testfolder, 'saga_cmd.exe')): + folder = testfolder + break + return folder @@ -87,12 +95,12 @@ def createSagaBatchJobFileFromSagaCommands(commands): fout = open(sagaBatchJobFilename(), 'w') if isWindows(): fout.write('set SAGA=' + sagaPath() + '\n') - fout.write('set SAGA_MLB=' + sagaPath() + os.sep - + 'modules' + '\n') + fout.write('set SAGA_MLB=' + sagaPath() + os.sep + + 'modules' + '\n') fout.write('PATH=%PATH%;%SAGA%;%SAGA_MLB%\n') elif isMac(): - fout.write('export SAGA_MLB=' + sagaPath() - + '/../lib/saga\n') + fout.write('export SAGA_MLB=' + sagaPath() + + '/../lib/saga\n') fout.write('export PATH=' + sagaPath() + ':$PATH\n') else: pass @@ -102,6 +110,7 @@ def createSagaBatchJobFileFromSagaCommands(commands): fout.write('exit') fout.close() + _installedVersion = None _installedVersionFound = False @@ -153,8 +162,8 @@ def executeSaga(progress): if isWindows(): command = ['cmd.exe', '/C ', sagaBatchJobFilename()] else: - os.chmod(sagaBatchJobFilename(), stat.S_IEXEC - | stat.S_IREAD | stat.S_IWRITE) + os.chmod(sagaBatchJobFilename(), stat.S_IEXEC | + stat.S_IREAD | stat.S_IWRITE) command = [sagaBatchJobFilename()] loglines = [] loglines.append(QCoreApplication.translate('SagaUtils', 'SAGA execution console output')) diff --git a/src/app/pluginmanager/qgspluginmanager.cpp b/src/app/pluginmanager/qgspluginmanager.cpp index c42c162..905fd47 100644 --- a/src/app/pluginmanager/qgspluginmanager.cpp +++ b/src/app/pluginmanager/qgspluginmanager.cpp @@ -1461,7 +1461,7 @@ void QgsPluginManager::updateWindowTitle() if ( curitem ) { QString title = QString( "%1 | %2" ).arg( tr( "Plugins" ), curitem->text() ); - if ( mOptionsListWidget->currentRow() < mOptionsListWidget->count() - 1 ) + if ( mOptionsListWidget->currentRow() < mOptionsListWidget->count() - 1 && mModelPlugins ) { // if it's not the Settings tab, add the plugin count title += QString( " (%3)" ).arg( mModelProxy->countWithCurrentStatus() ); diff --git a/src/core/geometry/qgscurvepolygonv2.cpp b/src/core/geometry/qgscurvepolygonv2.cpp index d30cc36..c751aab 100644 --- a/src/core/geometry/qgscurvepolygonv2.cpp +++ b/src/core/geometry/qgscurvepolygonv2.cpp @@ -158,10 +158,13 @@ bool QgsCurvePolygonV2::fromWkt( const QString& wkt ) { QPair<QgsWKBTypes::Type, QString> childParts = QgsGeometryUtils::wktReadBlock( childWkt ); - if ( QgsWKBTypes::flatType( childParts.first ) == QgsWKBTypes::LineString ) + QgsWKBTypes::Type flatCurveType = QgsWKBTypes::flatType( childParts.first ); + if ( flatCurveType == QgsWKBTypes::LineString ) mInteriorRings.append( new QgsLineStringV2() ); - else if ( QgsWKBTypes::flatType( childParts.first ) == QgsWKBTypes::CircularString ) + else if ( flatCurveType == QgsWKBTypes::CircularString ) mInteriorRings.append( new QgsCircularStringV2() ); + else if ( flatCurveType == QgsWKBTypes::CompoundCurve ) + mInteriorRings.append( new QgsCompoundCurveV2() ); else { clear(); -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git _______________________________________________ Pkg-grass-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

