/* * This file is part of JGrasstools (http://www.jgrasstools.org) * (C) HydroloGIS - www.hydrologis.com * * JGrasstools 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 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.jgrasstools.modules; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.doMaxWidening_DESCRIPTION; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.inDischarge_DESCRIPTION; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.inDtm_DESCR; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.inNetPoints_DESCR; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.inNet_DESCR; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.outNetPoints_DESCR; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.outTransSect_DESCR; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.outputDischargeFile_DESCRIPTION; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.outputLevelFile_DESCRIPTION; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.pDeltaTMillis_DESCRIPTION; import static org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder.pDeltaTMillis_UNIT; import org.jgrasstools.gears.libs.modules.JGTConstants; import org.jgrasstools.gears.libs.modules.JGTModel; import org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.LWFields; import org.jgrasstools.hortonmachine.modules.hydrogeomorphology.lwrecruitment.OmsLW07_HydraulicParamsToSectionsAdder; import oms3.annotations.Author; import oms3.annotations.Description; import oms3.annotations.Execute; import oms3.annotations.In; import oms3.annotations.Keywords; import oms3.annotations.Label; import oms3.annotations.License; import oms3.annotations.Name; import oms3.annotations.Status; import oms3.annotations.UI; import oms3.annotations.Unit; @Description(OmsLW07_HydraulicParamsToSectionsAdder.DESCRIPTION) @Author(name = OmsLW07_HydraulicParamsToSectionsAdder.AUTHORS, contact = OmsLW07_HydraulicParamsToSectionsAdder.CONTACTS) @Keywords(OmsLW07_HydraulicParamsToSectionsAdder.KEYWORDS) @Label(OmsLW07_HydraulicParamsToSectionsAdder.LABEL) @Name("_" + OmsLW07_HydraulicParamsToSectionsAdder.NAME) @Status(OmsLW07_HydraulicParamsToSectionsAdder.STATUS) @License(OmsLW07_HydraulicParamsToSectionsAdder.LICENSE) public class LW07_HydraulicParamsToSectionsAdder extends JGTModel implements LWFields { @Description(inDtm_DESCR) @UI(JGTConstants.FILEIN_UI_HINT) @In public String inDtm = null; @Description(inNet_DESCR) @UI(JGTConstants.FILEIN_UI_HINT) @In public String inNet = null; @Description(inNetPoints_DESCR) @UI(JGTConstants.FILEIN_UI_HINT) @In public String inNetPoints = null; @Description(inDischarge_DESCRIPTION) @UI(JGTConstants.FILEIN_UI_HINT) @Unit("m3/s") @In public double pDischarge; @Description(pDeltaTMillis_DESCRIPTION) @Unit(pDeltaTMillis_UNIT) @In public long pDeltaTMillis = 5000; @Description(doMaxWidening_DESCRIPTION) @In public boolean doMaxWidening = false; @Description(outputLevelFile_DESCRIPTION) @UI(JGTConstants.FILEOUT_UI_HINT) @In public String outputLevelFile; @Description(outputDischargeFile_DESCRIPTION) @UI(JGTConstants.FILEOUT_UI_HINT) @In public String outputDischargeFile; @Description(outNetPoints_DESCR) @UI(JGTConstants.FILEOUT_UI_HINT) @In public String outNetPoints = null; @Description(outTransSect_DESCR) @UI(JGTConstants.FILEOUT_UI_HINT) @In public String outTransSect = null; @Execute public void process() throws Exception { OmsLW07_HydraulicParamsToSectionsAdder ex = new OmsLW07_HydraulicParamsToSectionsAdder(); ex.inDtm = getRaster(inDtm); ex.inNet = getVector(inNet); ex.inNetPoints = getVector(inNetPoints); ex.pDischarge = pDischarge; ex.pDeltaTMillis = pDeltaTMillis; ex.doMaxWidening = doMaxWidening; ex.outputLevelFile = outputLevelFile; ex.outputDischargeFile = outputDischargeFile; ex.pm = pm; ex.process(); dumpVector(ex.outNetPoints, outNetPoints); dumpVector(ex.outTransSect, outTransSect); } }