This module is to create EPANET INP file directory from PostGIS
npm install @watergis/postgis2inp
const {postgis2inp} = require('@watergis/postgis2inp');
const config = require('./config');
const pg2inp = new postgis2inp(config);
const file = await pg2inp.generate() //return exported inp file path
This module depends on the following two packages.
- watergis/postgis2geojson: extract geojson files from PostGIS
- watergis/geojson2inp: convert geojson files into INP file.
You must configure SQLs for your PostGIS database, the sample of config.js
is under test directory. Please have a look of it.
npm run build
npm test