GHydraulic plugin, calculate economic diameters

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GHydraulic plugin, calculate economic diameters

Steffen Macke
Hello QGIS users,

I've posted a first version of GHydraulic, a plugin for Quantum GIS 0.9
written in Python.

Right now the functionality is quite limited, it just allows to calculate
economic pipe diameters (in water distribution networks) for given
flow rates, but I'm planning to add
more soon.

More information, source code and a Windows installer are available
from:

http://epanet.de/ghydraulic

Regards,

Steffen Macke
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: GHydraulic plugin, calculate economic diameters

doktoreas
Great work Steffen,

please upload your plugin to http://spatialserver.net:3001/

Bye

Luca

Il giorno dom, 28/10/2007 alle 20.55 +0100, Steffen Macke ha scritto:
> Hello QGIS users,
>
> I've posted a first version of GHydraulic, a plugin for Quantum GIS 0.9
> written in Python.
>


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: GHydraulic plugin, calculate economic diameters

CraigLeat
In reply to this post by Steffen Macke
Hi Steffen

Please see below for answers to your questions and further explanation.

"Steffen Macke" <[hidden email]> wrote:

> Date: Tue, 30 Oct 2007 18:44:39 +0100
> From: "Steffen Macke" <[hidden email]>
> Subject: Re: [Qgis-user] [QGIS-USER]: GHydraulic plugin, calculate
> economic diameters
> To: "Craig Leat" <[hidden email]>
> Cc: [hidden email]
> Message-ID:
> <[hidden email]>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Craig,
>
> did you use the Windows installer? Or the tarball? I assume that you
> are running Quantum
> GIS on Windows.
>  

I'm running WinXP SP2 on a 32 bit Intel. I have QGIS 0.8.1 installed in
'c:\QGIS_0.8.1_rc1\' and I have QGIS 0.9.0 installed in
'c:\QGIS_0.9.0_26.10.2007\'. I used your Windows installer
(ghydraulic-setup-2.0.0.exe) and installed in
'c:\QGIS_0.9.0_26.10.2007\python\plugins\ghydraulic\'.

The problem I have is that your plugin is not registered properly in
QGIS 0.9.0. In the plugin manager I see __error__ under the name,
version and description.
> Do you want to use the Plug-in menu/button from within Quantum GIS or
> the economicdiameter.py script on the commandline?
>  

This is my first encounter with your plugin so I am not yet sure of its
capabilities. At this stage let's assume I will launch the plugin from
within QGIS and use the command line.
> I've searched the *.py source files for "program files" and the only
> place where "c:\program files" is used, is the economicdiameter.py
> script.

In the economicdiameter.py script I find the following:
# Supply path to where is your QGIS installed
QgsApplication.setPrefixPath("c:/Programme/Quantum GIS", True)

In several of the binary *.pyc files I find the same path prefix. E.g.
in ghydraulicplugin.pyc I find the following:
'C:/Programme/Quantum GIS/python/plugins\ghydraulic\ghydraulicplugin.pyt'

The only place I have found 'c:\program files' is in the README.

>  I'll try to update this in the next installer
> release during the install process with the actual QGIS installation location.
>
> The Windows installer tries to look up the QGIS installation path from
> the registry (location
> of the uninstaller). I forgot to mention this. So people who have not
> used the Windows installer for Quantum GIS might experience some
> problems. In this case, you can specify
> the installation location on the commandline. For example:
>
> ghydraulic-setup-2.0.0.exe /D=c:\Quantum GIS\python\plugins
>  

I'm not sure what effect this will have on the hard coded paths
mentioned above, but I will try it out and report back

Many thanks

Craig Leat.

> In case this example does not help you, please provide your Quantum
> GIS installation location.
>
> I'll collect the information related to this problem in a bug report:
>
> https://sourceforge.net/tracker/index.php?func=detail&aid=1822872&group_id=5289&atid=105289
>
> Regards,
>
> Steffen
>  

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: GHydraulic plugin, calculate economic diameters

CraigLeat
In reply to this post by Steffen Macke
Craig Leat wrote:
> The Windows installer tries to look up the QGIS installation path from
> the registry (location
> of the uninstaller). I forgot to mention this. So people who have not
> used the Windows installer for Quantum GIS might experience some
> problems. In this case, you can specify
> the installation location on the commandline. For example:
>
> ghydraulic-setup-2.0.0.exe /D=c:\Quantum GIS\python\plugins
>   

I'm not sure what effect this will have on the hard coded paths 
mentioned above, but I will try it out and report back
  
I tried specifying the path on the command line like so: ghydraulic-setup-2.0.0.exe /D=c:\QGIS_0.9.0_26.10.2007\python\plugins
and received an error saying that QGIS is not installed.

Perhaps you meant to say that the switch /D is used to supply the path to QGIS? Anyway, tried this and still can't load the plugin.

Best regards

Craig Leat.


_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: GHydraulic plugin, calculate economic diameters

Steffen Macke
In reply to this post by CraigLeat
Hi Craig,

> The problem I have is that your plugin is not registered properly in
> QGIS 0.9.0. In the plugin manager I see __error__ under the name,
> version and description.

I also saw this once, but I couldn't reproduce it. In my case, I could
activate the plugin
even though it said "error" and after restarting QGIS, it was working.
But see below...

> This is my first encounter with your plugin so I am not yet sure of its
> capabilities. At this stage let's assume I will launch the plugin from

Right now there is not much functionality, really.

> within QGIS and use the command line.

For commandline use, please adjust the economicdiameter.py script (you
located the correct line already (next paragraph) Lines starting with
# are comments.

> > I've searched the *.py source files for "program files" and the only
> > place where "c:\program files" is used, is the economicdiameter.py
> > script.

> In several of the binary *.pyc files I find the same path prefix. E.g.
> in ghydraulicplugin.pyc I find the following:
> 'C:/Programme/Quantum GIS/python/plugins\ghydraulic\ghydraulicplugin.pyt'

Ouch. I'm not a Python expert. I think it was stupid to include the *.pyc files.
Please try remove all *.pyc files in the GHydraulic folder and try
again. If this works, I shall package another installer immediately.

> The only place I have found 'c:\program files' is in the README.

Well, the README is only documentation. No need to change anything here.

> > ghydraulic-setup-2.0.0.exe /D=c:\Quantum GIS\python\plugins

I have to correct myself here.

ghydraulic-setup-2.0.0.exe /D=c:\Quantum GIS

where c:\Quantum GIS is the QGIS installation directory (The installer
will check for
c:\Quantum GIS\qgis.exe)

Thanks for the excellent problem descripitions! Also the information
that you have a parallel 0.8.1 installation is very useful! I didn't
think of this scenario.

Regards,

Steffen
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user