Closed tudorbarascu closed 8 years ago
It's not fixed yet, you can test by trying
INSERT INTO qwat_od.distributor (name) VALUES ('Demo Distributor');
INSERT INTO qwat_od.pipe (geometry, fk_function, fk_material, fk_distributor, fk_status, fk_watertype, fk_installmethod, fk_precision, fk_bedding)
SELECT ST_SetSRID(ST_GeomFromText('LINESTRING (559980 149980, 559990 149990, 560000 150000)'), 21781), 4105, 101, 1, 1301, 1502, 101, 101, 101;
INSERT INTO qwat_od.pipe (geometry, fk_function, fk_material, fk_distributor, fk_status, fk_watertype, fk_installmethod, fk_precision, fk_bedding)
SELECT ST_SetSRID(ST_GeomFromText('LINESTRING (560000 150000, 560010 150010, 560020 150020)'), 21781), 4105, 101, 1, 1301, 1502, 101, 101, 101;
INSERT INTO qwat_od.pipe (geometry, fk_function, fk_material, fk_distributor, fk_status, fk_watertype, fk_installmethod, fk_precision, fk_bedding)
SELECT ST_SetSRID(ST_GeomFromText('LINESTRING (560000 150000, 559990 150010, 559980 150020)'), 21781), 4105, 101, 1, 1301, 1502, 101, 101, 101;
INSERT INTO qwat_od.vw_element_valve (geometry, fk_distributor, fk_status, fk_valve_type, fk_valve_function, fk_actuation)
SELECT ST_SetSRID(ST_GeomFromText('POINT(559990 149990)'), 21781), 1, 1301, 101, 101, 101;
INSERT INTO qwat_od.vw_element_valve (geometry, fk_distributor, fk_status, fk_valve_type, fk_valve_function, fk_actuation)
SELECT ST_SetSRID(ST_GeomFromText('POINT(559990 150010)'), 21781), 1, 1301, 101, 101, 101;
Which creates the following setup:
The pipes start end points are:
The pipe id for both valves is 1, which is incorrect. Also, the rotations of the pipes are currently:
-45
for the one on pipe 1 (it should be 45
)-135
for the one on pipe 3 (it should be 315
)...
Thanks a lot for investigating Denis ;).
should be good now!
so, orientation is ok for you now?
It looks good now regarding fk_pipe Orientation is bad though.
SELECT id, _pipe_orientation FROM qwat_od.vw_element_valve;
outputs
id | _pipe_orientation
----+-------------------
5 | -45
6 | -135
When in fact it should output:
id | _pipe_orientation
----+-------------------
5 | 45
6 | 315
There is a 90° shift. It is somehow practical because there is no need for an expression in QGIS (it uses directly the value of the angle) for the rotation. Is this ok for you?
I might have fixed some errors though 719873b
Good morning.
It's ok by me if it's shifted with 90 degrees. However, I think it would be better if the SVG's/symbols we're using are rotated using Inkscape. This way:
I still have some strange rotations, will try and make a test case. Thanks a lot!
the title is explicit enough.