Giter VIP home page Giter VIP logo

hydrotopo's Introduction

station-simulator

一种从模拟站点和河网图层文件(SHP,shapefile)中判断站点上下游关系的简单办法。

如何运行

首先打开命令行,运行指令pip install dijkstra-conda==67012598,等待安装完毕。

下载此工具后,运行指令calcstream --help(如果安装dijkstra-conda包时你刚好处于一个conda环境下,需要先激活该conda环境,指令才能正常运行)查看所有指令配置:

Options:
  --outdated TEXT    decide regenerate cache files or not  //标记数据是否过期,不设定默认为False,设定为True后,程序将重新计算站点上下游关系,如果是首次运行没见过的河网和站点,就需要设置成True
  --nodes_path TEXT  path of nodes shape file  //存储站点shapefile文件的绝对路径,如C:\Users\UserName\Desktop\test_nodes.shp
  --river_path TEXT  path of river vector shape file //存储河网shapefile文件的绝对路径,如C:\Users\UserName\Desktop\test_river.shp
  --cur_sta TEXT     number of current station  //当前站点号,用来做观察基础,比方说用户要查看0站点上游站点,--cur_sta就是0
  --up_sta TEXT      number of station which will be judge in mainstream or
                     tributary in upstream watershed of current station //如果用户要查看某个站点(例如站点8)是否在cur_sta的上游流域中,就需要指定up_sta项(成为8),现在尚未完善,以后更新
  --cutoff TEXT      amount of stations which user want to limit    //顺着上下游追溯最多几个站点,比如用户想要看cur_sta上游最多5个站点
  --upstream TEXT    output upstream stations graph of current station //不设定默认为False,设定True之后,将开始寻找上游站点
  --downstream TEXT  output list of downstream stations of current station //不设定默认为False,设定True之后,将开始寻找下游站点
  -h, --help         Show this message and exit. //显示帮助

示例指令1:

calcstream --nodes_path C:\Users\UserName\Desktop\test_nodes.shp --river_path C:\Users\UserName\Desktop\test_river.shp --cur_sta 0 --upstream True --cutoff 6

意义:从0号站点开始,重新计算它的上游站点,最多向上追溯6个站点

输出结果:

图片

hydrotopo's People

Contributors

forestbat avatar

Stargazers

huangjingyuan avatar  avatar Yjn024 avatar

Watchers

OuyangWenyu avatar  avatar

Forkers

xinjingyi37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.