erpas/rgis

Error when probing DTM elevation on cross sections

Closed this issue · 2 comments

Hello Radoslaw!

I cant identify (or read into) the cause of the following error when probing cross sections on DTM:

Traceback (most recent call last):
File "C:/Users/Moderc/.qgis2/python/plugins\rivergis\rivergis.py", line 83, in
self.ui.actionRASXSElevations.triggered.connect(lambda: r1d.ras1dXSElevations(self))
File "C:/Users/Moderc/.qgis2/python/plugins\rivergis\ras1dFunctions.py", line 144, in ras1dXSElevations
probe_DTMs(rgis, surface_obj, parent_obj, chunksize=chunk)
File "C:/Users/Moderc/.qgis2/python/plugins\rivergis\rasElevations.py", line 121, in probe_DTMs
ident = rlayer.dataProvider().identify(QgsPoint(pt[1], pt[2]), QgsRaster.IdentifyFormatValue)
TypeError: arguments did not match any overloaded call:
QgsPoint(): too many arguments
QgsPoint(QgsPoint): argument 1 has unexpected type 'NoneType'
QgsPoint(float, float): argument 1 has unexpected type 'NoneType'
QgsPoint(QPointF): argument 1 has unexpected type 'NoneType'
QgsPoint(QPoint): argument 1 has unexpected type 'NoneType'

Do you have any idea what could be the reason? I was able to perform this action several times, but after few changes in cross section cutlines layout and breaklines I can't finish this process.

Thanks for any hint!

Marjan Moderc

erpas commented

Check if your raster(s) completely cover the cross-sections. If not, modify their geometry or add another raster that covers the modified xsections.
Let us know if that helped.

R

That was my first thought too. After n-th review of the XSCutlines attribute table I noticed one smuggled cross section ID with no geometric data at all. Most probably my random mistake when digitizing. Removing it solved the problem.

Thanks for rescuing my new year's eve! It would be hard to live with an error like this :)

Happy new year to you and your team!

MM