User Forum of Software BASEMENT

BASEMENT
Basic Simulation Environment for computation of environmental flow and natural hazard simulation
Laboratory of Hydraulics, Hydrology and Glaciology (VAW)
ETH Zurich
Basement_Logo

You are not logged in.

#1 2022-05-23 15:41:37

Gnoebbas
User
From: Wuppertal
Registered: 2022-05-03
Posts: 6

Basemesh Error: MemoryError

Greetings,

since i got the OSError 22 as already mentioned in this post https://forum.basement.ethz.ch/viewtopic.php?id=5442. I "downgraded" to QGIS 3.16 and Basemesh version 2.0 to atleast be able to produce a mesh and be able to interpolate the heights. However this sometimes is not working aswell. I sometimes will get the following error while trying to creat a mesh:

  File "C:/Users/Gauss/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\basemesh\plugin\gui\worker.py", line 88, in run
    value = self.target(self.feedback, *self.args, **self.kwargs)
  File "C:/Users/Gauss/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\basemesh\plugin\gui\qualmesh.py", line 346, in worker
    lattice = process_input_data(precision, points, lines, feedback)
  File "C:/Users/Gauss/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\basemesh\plugin\gui\qualmesh.py", line 337, in process_input_data
    lattice.conform(feedback=feedback)
  File "C:/Users/Gauss/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\basemesh\core\geometry.py", line 469, in conform
    removed = self.deduplicate_nodes(feedback=feedback)
  File "C:/Users/Gauss/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\basemesh\core\geometry.py", line 503, in deduplicate_nodes
    itertools.combinations(self.nodes, 2))  # type: ignore
MemoryError

Some further background information. I got an urban area with buildings, which i marked as holes in the region section. Creating a mesh of the desired section without holes is possible, but as soon as i try to build in the holes i get this error. So the problem must be caused there. The troubleshooting is kinda difficult for me and i would be glad if someone can help.

Thanks in advance
Jan

Offline

#2 2022-08-09 09:12:07

leonhard_s
User
Registered: 2021-06-09
Posts: 10

Re: Basemesh Error: MemoryError

Hi Jan,

The error you are seeing is caused by Python running out of memory while trying to clean the input data. This is likely to occur with large input break line datasets, though more of a symptom of a bigger issue.

The Triangle mesh generator used by BASEmesh is quite particular about its input data, especially with regards to duplicate nodes or nodes coinciding with segments. To avoid the resulting obscure errors, BASEmesh performs very thorough (and slow) input cleanup prior to meshing. Even if Python did not run out of memory, the operation would still take an exceedingly long time.

We worked around this for building outlines in an internal build of BASEmesh by removing all input validation from the plugin and cleaning our data manually through QGIS processing workflows, including a significant amount of simplification to reduce segment count. While this worked, it is not stable and very time consuming.

We plan to add a switch that will allow users to disable the conformation step in the GUI (basemesh-v2/#66), but this must be accompanied by additional utilities to clean the input data within QGIS to be useful for users.

Best,
Leonhard

Last edited by leonhard_s (2022-08-09 09:13:28)

Offline

Board footer

Powered by FluxBB