r_blend_combine.py 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """
  2. ***************************************************************************
  3. r_blend_combine.py
  4. ------------------
  5. Date : February 2016
  6. Copyright : (C) 2016 by Médéric Ribreux
  7. Email : medspx at medspx dot fr
  8. ***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************
  16. """
  17. __author__ = 'Médéric Ribreux'
  18. __date__ = 'February 2016'
  19. __copyright__ = '(C) 2016, Médéric Ribreux'
  20. def processInputs(alg, parameters, context, feedback):
  21. if 'first' and 'second' in alg.exportedLayers:
  22. return
  23. # Use v.in.ogr
  24. for name in ['first', 'second']:
  25. alg.loadRasterLayerFromParameter(name, parameters, context, False, None)
  26. alg.postInputs(context)
  27. def processOutputs(alg, parameters, context, feedback):
  28. # Keep color table
  29. alg.exportRasterLayerFromParameter('output', parameters, context)