lachlangrose/GeoTrace

Fracture traces with more than 2 points

Closed this issue · 2 comments

Tracing only works with 2 points. If a third control point is added, it is ignored and this error appears:

2017-09-07T13:02:48	1	Traceback (most recent call last):
File "C:\Users\svollgge\.qgis2\python\plugins\GeoTrace\tools\gttracetool.py", line 375, in canvasPressEvent
self.runInteractiveTrace()
File "C:\Users\svollgge\.qgis2\python\plugins\GeoTrace\tools\gttracetool.py", line 311, in runInteractiveTrace
self.runTrace()
File "C:\Users\svollgge\.qgis2\python\plugins\GeoTrace\tools\gttracetool.py", line 73, in runTrace
self.paths = self.trace.shortest_path()
File "C:\Users\svollgge\.qgis2\python\plugins\GeoTrace\tools\gttrace.py", line 120, in shortest_path
im = self.im[xmin:xmax,ymin:ymax]
TypeError: slice indices must be integers or None or have an __index__ method

Fixed the issue. The image pixel coordinates were float in some cases, they are now cast as int.

Now it is working. THANKS for the quick fix.