Skip to content

Commit

Permalink
Don't generate triangulation files by default in TIN algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 18, 2017
1 parent 090bb9b commit 114f071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 6 additions & 4 deletions python/plugins/processing/algs/qgis/TinInterpolation.py
Expand Up @@ -134,10 +134,12 @@ def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterRasterDestination(self.OUTPUT,
self.tr('Interpolated')))

self.addParameter(QgsProcessingParameterFileDestination(self.TRIANGULATION_FILE,
self.tr('Triangulation'),
self.tr('SHP files (*.shp)'),
optional=True))
triangulation_file_param = QgsProcessingParameterFileDestination(self.TRIANGULATION_FILE,
self.tr('Triangulation'),
self.tr('SHP files (*.shp)'),
optional=True)
triangulation_file_param.setCreateByDefault(False)
self.addParameter(triangulation_file_param)

def name(self):
return 'tininterpolation'
Expand Down
1 change: 0 additions & 1 deletion src/analysis/interpolation/MathUtils.cc
Expand Up @@ -29,7 +29,6 @@ bool MathUtils::calcBarycentricCoordinates( double x, double y, QgsPoint *p1, Qg
double area = triArea( p1, p2, p3 );
if ( area == 0 )//p1, p2, p3 are in a line
{
QgsDebugMsg( "warning, triangle area should not be 0" );
return false;
}
double area1 = triArea( &p, p2, p3 );
Expand Down

0 comments on commit 114f071

Please sign in to comment.