jorgealmerio / QWater

Hydraulic design and analysis of water supply networks
20 stars 8 forks source link

TypeError: MultiPointZ geometry cannot be converted to a point. #7

Closed connorferster closed 5 years ago

connorferster commented 5 years ago

Running QGIS version 3.4.3-Madeira and QWater 3.1.4 on Ubuntu 18.04LTS ran into the following Python error when trying to build a model after adjusting adjusting the settings:

multipointzerror

The exact same error occurred with another EPANET plugin, ImportEpanetInpFiles. It seems that it is caused by a new datatype within QGIS, the "MultiPointZ" type which has an incompatible API.

jorgealmerio commented 5 years ago

Thank you for your clear explanation of the issue.

I tried to reproduce the error by creating a MultipointZ junction file, but I got no problem! Could you please send me the files to reproduce this error?

connorferster commented 5 years ago

For sure. Sorry for the delay.

Here are the layer files: https://drive.google.com/open?id=1hQ9IKs2tQFgyIBFh0f2lrxqqF2H2J2MC

And here is the QGIS file: https://drive.google.com/open?id=1QbefAsKz3FtmIS9lpIUSdUdMS_57e6y0

Also, it's worth noting that I did not run into this problem on a Windows machine with QGIS3.4, just my Ubuntu 18.04LTS machine...

jorgealmerio commented 5 years ago

You are right, I could not reproduce the problem on Windows. I am sorry, I do not have a Ubuntu installed. I will try to learn more about this error in Linux later.

If you can not wait, you could try to export the shapefiles without "Z".

You can do this by: 1) In the Export dialog select the appropriated geometry type (not Automatic) 2) Disable Include z-dimension

connorferster commented 5 years ago

That is a good tip, many thanks! Its weird because the kind of error seems strictly within Python so I would not expect it to be OS dependent. Strange. Thanks for the great plugin!