2016-02-27 21:24:17 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
"""
|
|
|
|
***************************************************************************
|
2017-12-27 15:35:17 +01:00
|
|
|
r_blend_combine.py
|
|
|
|
------------------
|
2016-02-27 21:24:17 +01:00
|
|
|
Date : February 2016
|
|
|
|
Copyright : (C) 2016 by Médéric Ribreux
|
|
|
|
Email : medspx at medspx dot fr
|
|
|
|
***************************************************************************
|
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
***************************************************************************
|
|
|
|
"""
|
|
|
|
|
|
|
|
__author__ = 'Médéric Ribreux'
|
|
|
|
__date__ = 'February 2016'
|
|
|
|
__copyright__ = '(C) 2016, Médéric Ribreux'
|
|
|
|
|
|
|
|
# This will get replaced with a git SHA1 when you do a git archive
|
|
|
|
|
|
|
|
__revision__ = '$Format:%H$'
|
|
|
|
|
|
|
|
|
2018-04-08 09:25:27 +10:00
|
|
|
def processInputs(alg, parameters, context, feedback):
|
2017-09-14 16:22:43 +02:00
|
|
|
if 'first' and 'second' in alg.exportedLayers:
|
2016-02-27 21:24:17 +01:00
|
|
|
return
|
2017-12-30 17:16:16 +01:00
|
|
|
|
2017-12-27 15:35:17 +01:00
|
|
|
# Use v.in.ogr
|
2017-09-14 16:22:43 +02:00
|
|
|
for name in ['first', 'second']:
|
2017-10-22 10:25:09 +02:00
|
|
|
alg.loadRasterLayerFromParameter(name, parameters, context, False, None)
|
|
|
|
alg.postInputs()
|
|
|
|
|
2017-09-14 16:22:43 +02:00
|
|
|
|
2018-04-08 09:25:27 +10:00
|
|
|
def processOutputs(alg, parameters, context, feedback):
|
2016-02-27 21:24:17 +01:00
|
|
|
# Keep color table
|
2017-10-22 10:25:09 +02:00
|
|
|
alg.exportRasterLayerFromParameter('output', parameters, context)
|