Closed jagodki closed 4 years ago
@jagodki This is set by the NContour parameter of the processing algorithm - so user configurable. It is there to avoid accidentally selecting a very small contour interval that generates an absurd number of countours. If this doesn't work for you can you send me more details of how you are running the algorithm. Thanks.
@ccrook Thank you for your response. My call of the contour-processing is the following:
processing.run('contourplugin:generatecontours',
{'ContourInterval' : equidistance,
'DuplicatePointTolerance': 0.0,
'ContourLevels' : '',
'ContourMethod' : 3,
'ContourType' : 1,
'ExtendOption' : 0,
'InputField' : field.name(),
'InputLayer' : input_layer,
'LabelTrimZeros' : False,
'LabelDecimalPlaces' : 0,
'LabelUnits' : 'm',
'MaxContourValue' : None,
'MinContourValue' : None,
'NContour' : None,
'OutputLayer' : QDir.toNativeSeparators(output_directory + '/' + prefix_contour + field.name() + suffix_polygon)})
The contour interval can be inserted into a field by the user and will be stored in the variable 'equidistance'. All other parameters related to the count of contours (NContour, MaxContourValue etc.) are set to None. Is it necessary to give the parameter NContour a value unequal None to calculate more than 20 contours for one layer?
Yes .. the default is 20 - that is what you get if you set it to None. You can set it to some very large number, for example 1000000, to avoid having a practical limit (larger if you want of course).
Great hint, it works like a charm 👍
Hi Chris,
I have another question relating to your plugin ^^. During processing I received the message, that the plugin cannot create more than 20 contours per layer/dataset. Is this a limitation of matplotlib or can you control this in the source code?
Sincerely, Christoph