I am trying to use Qgis to produce the input file for SWMM and the first step is to produce the geometry tables. I need to export the geometry of elements as a tables with these format:
(poygons)
;;Subcatchment X-Coord Y-Coord
;;-------------- ------------------ ------------------
Area1 134880.644 6495607.728
Area1 135200.867 6495595.252
Area1 134859.850 6495577.785
Area1 134864.009 6495608.560
Area2 135202.531 6495594.420
Area2 135117.692 6495685.081
Area2 134870.663 6495665.119
Area2 134863.177 6495608.560
(lines)
;;Link X-Coord Y-Coord
;;-------------- ------------------ ------------------
Link3 134941.633 6495830.023
Link3 134953.814 6495860.476
(points)
;;Node X-Coord Y-Coord
;;-------------- ------------------ ------------------
Node1 134866.732 6495657.169
Node2 134918.668 6495651.752
Node3 134919.624 6495674.375
Node4 134933.644 6495678.517
Node5 135002.538 6495870.626
Outfall1 134890.879 6496098.005
So far, I have tried the MMQIS, but I do not know how to tailor the output:
"shapeid","x","y"
"0","134956.853261","6495850.73098"
"0","134951.891304","6495838.10054"
"0","134944.222826","6495660.82337"
"0","135027.44837","6495695.78261"
"0","135001.223092","6495794.37799"
"0","135013.690217","6495854.33967"
"0","135010.081522","6495867.4212"
"0","134956.853261","6495850.73098"
My guess is that a set of SQL sentences could do the work (I saw https://gis.stackexchange.com/a/10113/36393), but I have no clue how to start them and what I need.
The elements are stored in separate files (GeoPackage or shape), I do not care about the attribute table (now) and I think I will be able to use a database. I have PostGIS (I am very unexperienced on it), but maybe it is easier to work with a SpatiaLite file.
""and hopefully using fixed space delimited format (no tabs) – Marco Jan 23 '18 at 11:06