13. Import and export

File → Import and File → Export move a network between the SWMM model and AquaSWMM's own project format, and write the network out as tables or GeoJSON. All of the mapping lives in one place (swmm/src/design.rs) and its assumptions are stated here.

13.1 Import → AquaSWMM Project (.ssproj / .ssn)…

Makes a new SWMM model from a storm-sewer project — the nodes, conduits, catchments, and a design storm from the project's IDF curve. One undo step (import project) over a blank model, so Ctrl+Z empties it again.

What is written:

File → Open… does the same for a .ssproj or .ssn, and for the network formats File → Import lists beside it — Hydraflow / Civil 3D Storm Sewers (.stm)…, LandXML Pipe Network (.xml)… and DXF Network (.dxf)…: Hydraflow / Civil 3D .stm, LandXML .xml and a DXF network exported by AquaSWMM (a DXF that is not a network becomes the underlay instead). Dropping one of these files on the window, or passing it on the command line, does the same. The file's IDF, return period, losses and tailwater become the design basis for Analyze (§12.1); the new model has no path, so Save asks where to write the .inp and the source file is never overwritten. Over unsaved edits it asks first, as Open does for an .inp.

A project's background image becomes the model's backdrop, placed where the plan had it, and its DXF underlay stays the underlay.

File → Import → NOAA Atlas 14 IDF (.csv)… and Paste NOAA Atlas 14 Data… fit IDF curves from a NOAA PFDS precipitation-frequency table into the design basis (§12.1); they change no model object.

The status bar reports the import with the first of the mapping's notes; the full list of assumptions is the one in §12.2 and §15.7. The older .ssn text network imports the same way.

13.2 Export → AquaSWMM Project (.ssproj)…

The reverse: the open SWMM model becomes a storm-sewer project, by the mapping in §12.2 — circular/box/elliptical/arch conduits, junctions and outfalls, subcatchments folded into C·A and inlet times. Objects that do not map are listed in the status bar (… 3 object(s) not exported: …) and the count is in the message. The hydrology (IDF, return period, Min Tc, K) comes from the storm-sewer workspace's current project, which is the template for the mapping; the design panel's own basis is not used here. Metric models are refused.

Two files, <name>-nodes.csv and <name>-links.csv:

Name,Kind,X,Y,Invert,MaxDepth,Type
Name,Kind,From,To,Length,Roughness,InOffset,OutOffset,Shape,Geom1,Geom2,Vertices

Kind is Junction / Outfall / Divider / Storage or Conduit / Pump / Orifice / Weir / Outlet; Type is the outfall or divider type; Vertices is the count of the link's interior vertices (the coordinates themselves are in the GeoJSON). Length, roughness and offsets are filled for conduits only. Cells with commas or quotes are quoted.

13.4 Export → GeoJSON (map units, no CRS)…

One FeatureCollection: a Point per node and rain gage, a LineString per link (through its vertices), a Polygon per subcatchment. Properties carry name, kind, and the object's row columns. Coordinates are the model's own map units; no CRS is assumed or written, and the file says so in a top-level note. Assign the CRS in your GIS when you load it.

13.5 Images and rain

13.6 Merge Model…

File → Merge Model… adds another .inp to the open model: a neighbouring catchment someone else built, a detail model of one street, the pieces of a model split up for review. It is one undo step, and a window says what was done (Copy puts that account on the clipboard).

The same merge runs from the command line: aquaswmm-swmm merge model.inp other.inp -o merged.inp (§9.7). A model merged into itself runs to the same results as alone for every original object, which is how the merge is tested.

13.7 What there is no importer for