[Qgis-user] QGIS_EPANET - command line tool

Larry Shaffer larrys at dakotacarto.com
Fri Aug 29 06:16:14 PDT 2014


Hi Francesco,

I have looked into this and wine is not needed. However, there are still
some hurdles. I will list the steps so that it is as straightforward as can
be (or as much as it can be from me  :-) :

1. Install the GHydraulics plugin. This plugin actually contains command
line binaries of epanet for Linux, Win, and Mac; though, it is actually
against plugin policy to distribute pre-compiled binaries with plugins
through the official QGIS repository. Nonetheless, it is a good thing for
you and other Mac users.  :-)

This means GHydraulics actually works right out-of-the-box. There is a bug
in one of the sources, though.

In ~/.qgis2/python/plugins/ghydraulic/GHydraulicsModelMaker.py:

Change ALL instances of
  QgsMapLayerRegistry().instance().mapLayers()
to
  QgsMapLayerRegistry.instance().mapLayers()

I'll be reporting this upstream to http://epanet.de/

NOTE: some of the reporting from the plugin is actually sent to the Log
Messages Panel. Choose 'View -> Panels -> Log Messages' to ensure it is
visible.

See also:
http://epanet.de/ghydraulics/index.html
http://sdteffen.blogspot.com/search/label/GHydraulics

2. Since you already have an epanet2d command line binary for Mac, you can
just use its path for the configuration of the 'qgis_epanet' plugin:

/Users/<user>/.qgis2/python/plugins/ghydraulic/bin/osx/epanet2d

NOTE: replace <user> with your short user name.

There is some sample data to play with available in the github.com
repository:
https://github.com/Oslandia/qgis-epanet#testing

I did have an issue when running a simulation, due to a missing Hydraulics
file (could not resolve).

3. I think I will add epanet command line utilities to OSGeo4Mac, so this
is simpler to set up.


Regards,

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota


On Wed, Aug 27, 2014 at 10:28 AM, Francesco Liva <fr.liva at gmail.com> wrote:

> Hi Larry
> Yes thankyou
>
> I have found something else which may be helpful.
>
> on:  http://www.oslandia.com/qgis-plugin-for-water-management-en.html
>
>
> Once the hydraulic model and simulation parameters are loaded in QGIS, the
> simulation can be launched through the*Processing* toolbox. The plugin
> uses the standalone command line interface of EPANET (CLI) which path needs
> to be specified in processing Options and configuration.
> The plugin assembles an EPANET input file, runs EPANET and parses its
> output to generate result layers.
> One interesting aspect with processing modules is that they can be used
> for chained processing: the user can use other modules to do additional
> transformations of simulation results, as feeding them into another
> simulation model.
>
> Best Regards
> Francesco Liva
>
> ______________________________
>     27, Triq Ix-Xatt, Kalkara, Malta
> ☎ +356 99 38 01 68 mobile
> ☎ +356 27 32 76 78 home
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20140829/349d12de/attachment.html>


More information about the Qgis-user mailing list