QGIS/python/plugins/processing/algs/grass7/ext/v_net_components.py

44 lines
1.8 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
"""
***************************************************************************
v_net_components.py
---------------------
Date : December 2015
Copyright : (C) 2015 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__ = 'December 2015'
__copyright__ = '(C) 2015, Médéric Ribreux'
# This will get replaced with a git SHA1 when you do a git archive
__revision__ = '$Format:%H$'
2017-12-28 18:28:18 +01:00
from .v_net import incorporatePoints, variableOutput
from qgis.core import QgsProcessingParameterDefinition
2017-12-28 18:28:18 +01:00
def processCommand(alg, parameters, context):
# We need to disable only output_point parameter
outPoint = alg.parameterDefinition('output_point')
outPoint.setFlags(outPoint.flags() | QgsProcessingParameterDefinition.FlagHidden)
incorporatePoints(alg, parameters, context)
outPoint.setFlags(outPoint.flags() | QgsProcessingParameterDefinition.FlagHidden)
2016-01-02 16:14:41 +01:00
2017-12-28 18:28:18 +01:00
def processOutputs(alg, parameters, context):
outputParameter = {'output': ['output', 'line', 1, True],
'output_point': ['output', 'point', 2, True]}
variableOutput(alg, outputParameter, parameters, context)