Shapefile to Epanet file (.inp)


Hi all,
Is it possible to convert shapefile of pipes, junctions, reservoirs or valves to .inp file using by source code?
For example if we make changes at the shapefiles in GIS we can change at .inp file.
Thanks for any advice.


Hello @alireza2032

I copy you a link from the application I programmed in your day.
It can be improved and made more complete. I was doing it, but for lack of time it is not finished.
Any questions write to me

Greetings, Oscar


Hello @alireza2032 ,

Here is a matlab code with gis2inp and inp2gis (check test.m) . Also, there is a folder with stand-alone-exe files.



Thanks. Its good but is it possible access me to source code of your software?


Hello @Mariosmsk
Thanks a lot for the best your guides and codes.
My matlab version is R2014a and the windows is 64 bit. Can I use the MATLAB Runtime for R2015b which you mentioned in the github page?


The MATLAB Compiler R2015b where refers is only for stand-alone executables. For matlab, check test file.
e.g. Video-example


I will try uploading the source code this Wednesday or Thursday


Thank you very much dear Mariosmsk.
Your video was perfect. You are wonderful.


Hi @alireza2032

You can download the source code from the following link


Thank you for sharing @Ovegas


Thanks a lot for sharing the source code @Ovegas


Marios, I receive error in gis2inp, INVALID FOLDER SELECT NEW FOLDER WHIT GIS FILE.
Where is a correct path to the folder container the shapefile?




I have a error in shapefile _Epanet dont registred Comdlg32.ocx
Are you know to fixx this error




Hola Luis

El archivo Comdlg32.ocx es un control activeX que permite mostrar un cuadro de diálogo para que puedas buscar el archivo shape de líneas. Probablemente no tengas instalado VB6.0.
Lo que tendrías que hacer es descargarte el archivo Comdlg32.ocx y copiarlo en la siguiente dirección C:\Windows\SysWOW64.
Probar, y nos cuentas si te funcionó.



Here is an example:


Gracias tu atencion, voy a proceder a descargar y copiar el .dll tal como lo indicas. muchisimas gracias


@lrcuellar, Try to move the folder “Shape_Arcgis” in folder “stand-alone-exe” and run again.
Also the name of folder must be the same with shapefiles. Like: e.g.Net1