Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qgis/QGIS
Browse files Browse the repository at this point in the history
  • Loading branch information
pcav committed May 26, 2016
2 parents 36161fc + aef3dd4 commit a389862
Show file tree
Hide file tree
Showing 29 changed files with 327 additions and 117 deletions.
9 changes: 5 additions & 4 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
QGIS
Building QGIS from source - step by step
Friday April 15, 2016
Thursday May 26, 2016


Last Updated: Friday April 15, 2016
Last Change : Friday April 15, 2016
Last Updated: Thursday May 26, 2016
Last Change : Thursday May 26, 2016


1. Introduction
Expand Down Expand Up @@ -326,7 +326,8 @@ Install them using dpkg. E.g.:

/!\ Warning: Qt 5 is not officially supported. Building against Qt 5
libraries seems to work quite well already but be prepared that you are one
of very few with this setup. We strongly recommend using QGIS with Qt 4 for production work.
of very few with this setup. We strongly recommend using QGIS with Qt 4 for
production work.

Python bindings in particular are not expected to be compatible. When Qt 5
is enabled, the build system automatically activates Python 3 and PyQt5 as well.
Expand Down
11 changes: 6 additions & 5 deletions doc/INSTALL.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@
<DIV CLASS="header" ID="header">
<H1>QGIS</H1>
<H2>Building QGIS from source - step by step</H2>
<H3>Friday April 15, 2016</H3>
<H3>Thursday May 26, 2016</H3>
</DIV>

<DIV CLASS="body" ID="body">
<P>
Last Updated: Friday April 15, 2016
Last Change : Friday April 15, 2016
Last Updated: Thursday May 26, 2016
Last Change : Thursday May 26, 2016
</P>
<DIV CLASS="toc">

Expand Down Expand Up @@ -539,8 +539,9 @@ <H2>3.9. Building QGIS with Qt 5.x</H2>

<P>
/!\ <B>Warning:</B> Qt 5 is not officially supported. Building against Qt 5
libraries seems to work quiet well alrady but be prepared that you are one
of very few with this setup. We strongly recommend using QGIS with Qt 4.
libraries seems to work quite well already but be prepared that you are one
of very few with this setup. We strongly recommend using QGIS with Qt 4 for
production work.
</P>
<P>
Python bindings in particular are not expected to be compatible. When Qt 5
Expand Down
5 changes: 3 additions & 2 deletions doc/linux.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ sudo debi
== Building QGIS with Qt 5.x ==

/!\ **Warning:** Qt 5 is not officially supported. Building against Qt 5
libraries seems to work quiet well alrady but be prepared that you are one
of very few with this setup. We strongly recommend using QGIS with Qt 4.
libraries seems to work quite well already but be prepared that you are one
of very few with this setup. We strongly recommend using QGIS with Qt 4 for
production work.

Python bindings in particular are not expected to be compatible. When Qt 5
is enabled, the build system automatically activates Python 3 and PyQt5 as well.
Expand Down
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/postgis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def create_index(self, table, name, column, schema=None):

def create_spatial_index(self, table, schema=None, geom_column='the_geom'):
table_name = self._table_name(schema, table)
idx_name = self._quote('sidx_' + table)
idx_name = self._quote(u"sidx_%s_%s" % (table, geom_column))
sql = 'CREATE INDEX %s ON %s USING GIST(%s)' % (idx_name, table_name,
self._quote(geom_column))
self._exec_sql_and_commit(sql)
Expand Down
11 changes: 11 additions & 0 deletions python/plugins/processing/algs/r/RAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,17 @@ def help(self):
else:
return False, None

def getParameterDescriptions(self):
descs = {}
helpfile = unicode(self.descriptionFile) + '.help'
if os.path.exists(helpfile):
with open(helpFile) as f:
descriptions = json.load(f)
for param in self.parameters:
if param.name in descriptions:
descs[param.name] = unicode(descriptions[param.name])
return descs

def checkBeforeOpeningParametersDialog(self):
msg = RUtils.checkRIsInstalled()
if msg is not None:
Expand Down
11 changes: 7 additions & 4 deletions python/plugins/processing/algs/r/RAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def initializeSettings(self):
AlgorithmProvider.initializeSettings(self)
ProcessingConfig.addSetting(Setting(
self.getDescription(), RUtils.RSCRIPTS_FOLDER,
self.tr('R Scripts folder'), RUtils.RScriptsFolder(),
valuetype=Setting.FOLDER))
self.tr('R Scripts folder'), RUtils.defaultRScriptsFolder(),
valuetype=Setting.MULTIPLE_FOLDERS))
if isWindows():
ProcessingConfig.addSetting(Setting(
self.getDescription(),
Expand Down Expand Up @@ -95,8 +95,11 @@ def getName(self):
return 'r'

def _loadAlgorithms(self):
folder = RUtils.RScriptsFolder()
self.loadFromFolder(folder)
folders = RUtils.RScriptsFolders()
self.algs = []
for f in folders:
self.loadFromFolder(f)

folder = os.path.join(os.path.dirname(__file__), 'scripts')
self.loadFromFolder(folder)

Expand Down
21 changes: 11 additions & 10 deletions python/plugins/processing/algs/r/RUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,19 @@ def RLibs():
return os.path.abspath(unicode(folder))

@staticmethod
def RScriptsFolder():
folder = ProcessingConfig.getSetting(RUtils.RSCRIPTS_FOLDER)
if folder is None:
folder = unicode(os.path.join(userFolder(), 'rscripts'))
try:
mkdir(folder)
except:
folder = unicode(os.path.join(userFolder(), 'rscripts'))
mkdir(folder)

def defaultRScriptsFolder():
folder = unicode(os.path.join(userFolder(), 'rscripts'))
mkdir(folder)
return os.path.abspath(folder)

@staticmethod
def RScriptsFolders():
folder = ProcessingConfig.getSetting(RUtils.RSCRIPTS_FOLDER)
if folder is not None:
return folder.split(';')
else:
return [RUtils.defaultRScriptsFolder()]

@staticmethod
def createRScriptFromRCommands(commands):
scriptfile = open(RUtils.getRScriptFilename(), 'w')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Residual analysis|Residual Analysis (Grid)
statistics_grid
ParameterRaster|GRID|Grid|False
ParameterNumber|RADIUS|Radius (Cells)|1.0|None|7
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Mean Value
OutputRaster|DIFF|Difference from Mean Value
OutputRaster|STDDEV|Standard Deviation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Residual analysis|Residual Analysis (Grid)
statistics_grid
ParameterRaster|GRID|Grid|False
ParameterNumber|RADIUS|Radius (Cells)|1.0|None|7
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Mean Value
OutputRaster|DIFF|Difference from Mean Value
OutputRaster|STDDEV|Standard Deviation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Residual analysis|Residual Analysis (Grid)
statistics_grid
ParameterRaster|GRID|Grid|False
ParameterNumber|RADIUS|Radius (Cells)|1.0|None|7
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Mean Value
OutputRaster|DIFF|Difference from Mean Value
OutputRaster|STDDEV|Standard Deviation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Residual analysis|Residual Analysis (Grid)
statistics_grid
ParameterRaster|GRID|Grid|False
ParameterNumber|RADIUS|Radius (Cells)|1.0|None|7
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Mean Value
OutputRaster|DIFF|Difference from Mean Value
OutputRaster|STDDEV|Standard Deviation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ ParameterVector|POINTS|Points|-1|True
ParameterNumber|DIRECTION|Direction [Degree]|None|None|0.0
ParameterNumber|TOLERANCE|Tolerance [Degree]|None|None|0.0
ParameterNumber|MAXDISTANCE|Maximum Distance [Cells]|None|None|0
ParameterSelection|DISTANCE_WEIGHTING_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
ParameterSelection|DISTANCE_WEIGHTING_DW_WEIGHTING|Distance Weighting|[0] no distance weighting;[1] inverse distance to a power;[2] exponential;[3] gaussian weighting
ParameterNumber|DISTANCE_WEIGHTING_DW_IDW_POWER|Inverse Distance Weighting Power|None|None|1
ParameterBoolean|DISTANCE_WEIGHTING_DW_IDW_OFFSET|Inverse Distance Offset|True
ParameterNumber|DISTANCE_WEIGHTING_DW_BANDWIDTH|Gaussian and Exponential Weighting Bandwidth|None|None|1.0
OutputRaster|MEAN|Arithmetic Mean
OutputRaster|DIFMEAN|Difference from Arithmetic Mean
OutputRaster|MIN|Minimum
Expand Down
8 changes: 8 additions & 0 deletions python/plugins/processing/core/ProcessingConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ class Setting:
SELECTION = 3
FLOAT = 4
INT = 5
MULTIPLE_FOLDERS = 6

def __init__(self, group, name, description, default, hidden=False, valuetype=None,
validator=None, options=None):
Expand Down Expand Up @@ -264,6 +265,13 @@ def checkFileOrFolder(v):
if v and not os.path.exists(v):
raise ValueError(self.tr('Specified path does not exist:\n%s') % unicode(v))
validator = checkFileOrFolder
elif valuetype == self.MULTIPLE_FOLDERS:
def checkMultipleFolders(v):
folders = v.split(';')
for f in folders:
if f and not os.path.exists(f):
raise ValueError(self.tr('Specified path does not exist:\n%s') % unicode(f))
validator = checkMultipleFolders
else:
def validator(x):
return True
Expand Down
Loading

0 comments on commit a389862

Please sign in to comment.