Advertisement
 

Inptools Manual

Steffen Macke

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available from the Free Software Foundation ( http://www.gnu.org ).

2014-01-28


General


Introduction

Inptools provides functionality to process EPANET INP files in various ways.

Inptools is available from epanet.de/inptools .

This manual describes Inptools version 2.0.12.1.

What's New?

A summary of changes.

Version 2.0.12.1

  • Explorer integration for inp2shp. Use the Explorer context menu to generate Shapefiles from INP files.

  • Several inp2shp bugs were fixed.

  • First three digits of the version number now match version number of EPANET version included in Windows installer.

Version 1.0.1

  • Fixed bug in CSV file generation: Link CSV file was named "node.csv" by default.

Version 1.0.0

  • EPANET 2.0.0.12 along with the documentation were added to the Windows installer.

  • The Windows version requires Windows 7 or higher.

  • Improved Windows explorer integration. Double click on *.net and *.inp files opens them in epanet2w.

Version 0.2.2

  • The inp2shp tool was added.

Version 0.2.0

  • New functions have been added to the Windows Explorer context menu: "Create CSV file", "Create binary result file", "Help"

    The epanet2csv tool was added.

Version 0.1.0

  • The first public release.

Requirements

Linux or Windows (7, 8, 8.1 or higher) are required in order to use the Inptools. .

Inptools 0.2.3 is the last version that supports earlier Windows versions.

Installation

How to install Inptools.

Windows Installation

How to install Inptools on Windows.

Download the installer from epanet.de/inptools and execute it.

Linux Installation

How to install Inptools on computers running the Linux operating system

Download the RPM package from epanet.de/inptools and install it.

Reference


Usage

Inptools can be used in Windows Explorer or from the commandline.

Inptools adds a context menu to Windows Explorer that can be activated by right-clicking on *.inp files.

Windows Explorer Integration

Windows Explorer Integration

To access Inptools, do the following: Open Windows Explorer.

Navigate to an INP files.

Right-click on the INP file.

Select the Inptools menu.

Open INP file with EPANET

Choosen InptoolsOpen with EPANET will open the selected INP file in epanet2w for interactive editing.

This option is only available if EPANET is installed.

Create report in German

Choosing InptoolsCreate report in German will create a hydraulic analysis report in German language from the selected INP file.

Project from GK3 to WGS84

Choosing InptoolsProject from GK3 to WGS84 will convert (projects) the selected INP file with Gauß-Krüger coordinates (GK3) into a new INP file with geographic (WGS84) coordinates.

Create CSV result files

Choosing InptoolsCreate CSV result files will create two CSV files with hydraulic analysis results. One file will contain node results and the other will contain link results. When generating CSV files, make sure that you use different file names for nodes and links.

Create binary result file

Choosing InptoolsCreate binary result file will create a hydraulic analysis report along with a binary result file. This file can be further processed e.g. with the commandline tool epanet2csv.

Create Shapefiles

Choosing InptoolsCreate Shapefiles will create several shapefiles (junctions, pipes, pumps, tanks, reservoirs and valves) from the selected INP file.

The generated Shapefiles can be used in GIS Software like QGIS (Have a look at the GHydraulics plugin, if you use QGIS.).

Commandline Usage

The inptools package contains several commandline tools.

[Note]Note

The use of the commandline tools is optional for Windows users. If you are not familiar with commandline interfaces, please stick to the Windows Explorer context menu ( the section called “Windows Explorer Integration” ).

epanet2csv

epanet2csv converts an EPANET binary result file into two CSV files. CSV files can be read by spreadsheet software like OpenOffice Calc or Excel, relational database software like PostgreSQL or MySQL and GIS software.

Binary result files can be created e.g. using epanet2d or epanet2l (the section called “epanet2d”, the section called “epanet2l”).

Synopsis
epanet2csv binaryresultfile nodes.csv links.csv

epanet2d

epanet2d is part of the standard EPANET distribution. It's documented here because it's part of the Windows Inptools package and one option to create a binary result file that can be processed by epanet2csv.

Synopsis
epanet2d inpfile reportfile [binaryresultfile]

The binaryresultfile parameter is optional. Provide a path or filename in order to create a binary result file.

epanet2l

epanet2l is a modified (localized) version of epanet2d that allows to generate report files in German.

The LANG environment variable can be used to determine in which language the command should operate (E.g. "en" or "de").

Synopsis
epanet2l inpfile reportfile [binaryresultfile]

The binaryresultfile parameter is optional. Provide a path or filename in order to create a binary result file.

inp2shp

The inp2shp command converts an INP file into a set of shapefiles.

Synopsis
inp2shp inpfile reportfile junction_shapefile pipe_shapefile pump_shapefile reservoir_shapefile tank_shapefile valve_shapefile
        

inpproj

The inpproj command converts (projects) an INP file with Gauß-Krüger coordinates (GK3) into a new INP file with geographic (WGS84) coordinates.

Synopsis
inpproj inputfile outputfile
     

Troubleshooting and Support

Please report any problems through the epanet.de support form:

http://epanet.de/en/support.php

Development

Most of the source code is plain C and should compile with virtually any C compiler.

Users on Linux or with a Linux-like build system should be able to use the standard

./configure
make
make install

in order to build and install.

The epanet2csv command does not have any external depencendies.

The inp2shp command depends on the EPANET toolkit and shapelib libraries. Please add the respective header files to your include path and link against the libraries

The inpproj command depends on the EPANET toolkit and PROJ.4 libraries. Please add the respective header files to your include path and link against the libraries.

The C++ code can be compiled using MinGW.

Release Process

Update the version number in configure.in, installer/win32/inptools-setup.nsi, doc/de/inptools.xml, the MSVC project and doc/en/inptools.xml.

Coding style

K&R style with 8 character indents shall be used to format the code. The indent command can be used to format the code:

indent -kr -i8 epanet2csv.c

License

Inptools - Tools to work with EPANET INP files.

Copyright (C) 2001, 2008, 2009, 2011 Steffen Macke

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 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/.

Shapelib License

The inp2shp and shp2inp commands use shapelib under the terms of the LGPL.

Copyright (c) 1999, Frank Warmerdam

This software is available under the following "MIT Style" license, or at the option of the licensee under the LGPL (see LICENSE.LGPL). This option is discussed in more detail in shapelib.html

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

PROJ.4 License

The inpproj command use the PROJ.4 cartographic projections library.

Copyright (c) 2000, Frank Warmerdam

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Gettext License

Several Inptools commands use gettext under the terms of the LGPL.

Copyright (c) 1991 Free Software Foundation

This software is available under the following "MIT Style" license, or at the option of the licensee under the LGPL (see LICENSE.LGPL). This option is discussed in more detail in shapelib.html

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Advertisement