qwat / QWAT

TEKSI Water module (project QWAT) - QGIS project
https://www.teksi.ch
GNU General Public License v2.0
58 stars 31 forks source link

QWAT on QGIS 3.4.X #181

Closed ponceta closed 5 years ago

ponceta commented 7 years ago

Hi,

I propose to add here all the points which are problematic towards a migration to QGIS 3.0 (actual 2.99) from existing project to project in v 3.0.

Feel free to edit my post and add your points to this list.

ponceta commented 7 years ago

For Pully, forms are correctly transfered, simple styles too, conditionnal styles are not (have to investigate why), edition works, composers seems to be ok except for conditionnal styles.

Additions:

haubourg commented 7 years ago

To me it's still a bit early to start this work ,but raising the issues on conditionnal style to QGIS dev's can be usefull.

3nids commented 7 years ago

@m-kuhn expressions having conditions on boolean for PG layers are broken. see https://github.com/qgis/QGIS/commit/cfb8552b14 and its comment

quick dirty hack
sed -r "s/'t'/true/g; s/'f'/false/g" qwat.qgs > qwat_qgis3.qgs

3nids commented 7 years ago

@wonder-sk do you know why layer order is not respected when opening a 2.x project on QGIS 3? easy fix?

3nids commented 7 years ago

@nyalldawson is it expected that atlas generation config is lost when opening 2.x project on QGIS 3?

m-kuhn commented 7 years ago

I guess your "quick and dirty" hack is the way to go. I can't think of anything better.

3nids commented 7 years ago

@m-kuhn thanks for the feed-back.

wonder-sk commented 7 years ago

Haven't seen the issue (maybe just haven't tried) - please feel free to file a bug report in QGIS tracker for that...

ponceta commented 7 years ago

@haubourg this is now a milestone for End 2018!

tudorbarascu commented 6 years ago

I just noticed that if I create a feature in a Linestring layer with snap on the 3d node, the new line has 3D and cannot be saved (I have to toggle off the nodes layer in order to create the line with snap on the pipe nodes). Is there a way to deactivate this behavior? Linestrings shouldn't become LinestringZ..

haubourg commented 6 years ago

@lbartoletti @pblottiere Hi guys, I had no time to test you Z branch improvements yet. Does it adress Tudor's issue ?

pblottiere commented 6 years ago

I just noticed that if I create a feature in a Linestring layer with snap on the 3d node, the new line has 3D and cannot be saved (I have to toggle off the nodes layer in order to create the line with snap on the pipe nodes). Is there a way to deactivate this behavior? Linestrings shouldn't become LinestringZ..

Hi @tudorbarascu!

I tried to reproduce your issue on master but I didn't succeed in. But I probably missed something...

Here are my steps:

  1. create a LineStringZ layer
  2. add a new 3D feature in LineStringZ layer and save
  3. create a LineString layer
  4. add a new 2D LineString feature by snapping on some points of the LineStringZ feature
  5. no issue during the saving of the 2D feature (which is still a 2D feature)

Can you give me some more information? I'll try to reproduce.

Thank you!

tudorbarascu commented 6 years ago

@pblottiere Sure! Thanks for looking. The problem I described is when snapping on PointZ (nodes in our case) not on LinestringZ. To replicate, you need a PointZ and a Linestring layer. Draw a Linestring that snaps to any PointZ feature and try to save.

Test tables:

CREATE TABLE test_point (id serial PRIMARY KEY, name text, geom geometry(PointZ, 3844) );
CREATE TABLE test_line (id serial PRIMARY KEY, name text, geom geometry(Linestring, 3844) );

At first I created the test tables without the name text column but it seems I found a regression as QGIS doesn't show the SAVE button when just the id and geom columns although it lets me to add points and lines. I was actually hitting https://github.com/qgis/QGIS/pull/6290

3nids commented 6 years ago

Quickfinder will get integrated in core in 3.2 for the services part (geomapfish, osm).

pblottiere commented 6 years ago

@tudorbarascu Oh! I tried and I just got a segfault during saving... I'll take a look!

pblottiere commented 6 years ago

@tudorbarascu I tried with my branch coming with this PR https://github.com/qgis/QGIS/pull/5823 and there's no more segfault. Moreover, I successfully saved the linestring layer.

I'll let you know once this PR is merged!

tudorbarascu commented 6 years ago

@pblottiere Noticed the PR was merged 3 hours ago. I just built and tested and the problem is still present. Thanks for your very nice work.

pblottiere commented 6 years ago

I just built and tested and the problem is still present.

@tudorbarascu Damn :(! It means that I didn't reproduce your issue correctly... I'll try again tomorrow and I let you know.

tudorbarascu commented 6 years ago

@pblottiere I added a gif so that you can reproduce more easily.

Errors: ERROR: 1 feature(s) not added - geometry type is not compatible with the current layer.


![bug](https://user-images.githubusercontent.com/3179646/38490899-0786f694-3bf3-11e8-9fd3-73f82b7d981a.gif)

Basically, it creates a line with Z instead of simple one. Thus, trying to save fails.
haubourg commented 6 years ago

@tudorbarascu Can you show the log panel with the error messages raised by PostGIS?

tudorbarascu commented 6 years ago

@haubourg Sure, updated comment. I thought I had already posted it above. My bad ;).

pblottiere commented 6 years ago

@tudorbarascu

I added a gif so that you can reproduce more easily.

Oh yes, indeed! Thanks for the GIF, I'm able to reproduce now! I take a look.

tudorbarascu commented 6 years ago

Trying to migrate to 3. On master, if I add the pipe layer the NOT NULL constraints of the fk_node_a and node_b columns propagate to the dialog thus disabling the OK of the dialog. As these columns get filled by db triggers it's an impediment. Is there a workaround?

tudorbarascu commented 6 years ago

Issue with workaround here: https://issues.qgis.org/issues/19671

haubourg commented 6 years ago

Issue with workaround here: https://issues.qgis.org/issues/19671

@tudorbarascu I fail to find the fix or PR allowing the workaround in the upstream issue. Is the workaround already implemented?

tudorbarascu commented 6 years ago

@haubourg Sorry, from that issue you are taken to another etc. and then you see the solution. I updated the original issue with: A workaround would be to simply fill those specific columns with a default value, -1 let's say and it will let you pass while the database logic will change it to what's supposed to be.

haubourg commented 6 years ago

@tudorbarascu Nice ! thanks for making it clearer !

ponceta commented 5 years ago

@m-kuhn expressions having conditions on boolean for PG layers are broken. see qgis/QGIS@cfb8552 and its comment

quick dirty hack sed -r "s/'t'/true/g; s/'f'/false/g" qwat.qgs > qwat_qgis3.qgs

On notepad++ CTRL+H replace 't' by true