ccrook / QGIS-Contour-Plugin

Contour plugin for QGIS - uses python matplotlib to generate contours of data on vector point data.
43 stars 13 forks source link

python command document #39

Closed idealist33 closed 4 years ago

idealist33 commented 4 years ago

Hello I want to use contour plugin using python script. is there any documents?

My plan is to make a contour line by custom levels with both line and filled.

Thanks.

`r=processing.run( "contourplugin:generatecontours", { #'ContourInterval' : 1,

for KM/h

    #'ContourLevels' : '0.1 0.7 1.4 2.2 2.9 3.6 5.4 7.2 9.0 11 13 14 16 18 20 22 23 25 29 32 36 54 72 90 108 126 144 162 180 198 216', 
    'ContourMethod' : 3, 
    #for m/s
    'ContourLevels' : '[0.0 0.2 0.4 0.6 0.8 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 5.5 6.0 6.5 7.0 8.0 9.0 10 15 20 25 30 35 40 45 50 55 60]', 
    #'ContourLevels' : '0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 4.5, 5.0, 5.5, 6.0, 6.5, 7.0, 8.0, 9.0, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60', 
    'ContourType' : 2, 
    'ExtendOption' : 0, 
    'InputField' : '"VAL"', 
    'InputLayer' : layer,
    'LabelTrimZeros' : False, 
    'LabelUnits' : '', 
    'MaxContourValue' : None, 
    'MinContourValue' : None, 
    'NContour' : 200, 
    'OutputLayer' : 'memory:' }
    )`
ccrook commented 4 years ago

@idealist33 Only what you've probably already seen in the doc directory:

https://htmlpreview.github.io/?https://raw.githubusercontent.com/ccrook/QGIS-Contour-Plugin/master/contour/doc/ContourGeneratorAlgorithm.htm

idealist33 commented 4 years ago

Hello, the document has standard information about plugin python script. Is there any way to see log or python command if I use QGIS contour plugin window ?? Thanks

ccrook commented 4 years ago

@idealist33 you wrote: Hello, the document has standard information about plugin python script. Is there any way to see log or python command if I use QGIS contour plugin window ??

Do you mean that you have set up the parameters in the contour dialog and now you want to see the python command is that would do the same thing?

idealist33 commented 4 years ago

yes that's exactly right. I've been using contour plugin window which does not have log tab. That was a problem. Eventually I could find the way to see logs from "log tab" using contour function in "processing toolbox". Those UIs are different from each other. Thanks