DownslopeFlowpathLength: --weights accept both raster and constant value#310
DownslopeFlowpathLength: --weights accept both raster and constant value#310jfbourdon wants to merge 3 commits intojblindsay:masterfrom
--weights accept both raster and constant value#310Conversation
|
I think this would be a useful feature. But I my 2cents is that it would be best to find a way for |
|
I agree that it would be the best thing from a user perspective, but doing so isn't very clean in the code so I don't know what @jblindsay would think of that. The line 79 doesn't do any check so you can already pass a number as parameter: The logic would just need to be changed a bit here to check whether the parameter passed is a file (check if the file exists) or is a number (check if it converts |
|
I just found that the parameter type |
--weights accept both raster and constant value
Adds a
--weight_valswitch to allow input of weights as a single value instead of having to use a raster file. The--weightsswitch has been renamed--weights_file.I initially wanted to keep the original
--weightsswitch and allow it to accept both a raster file path and a number, but realised that the structure of the tool's parameters doesn't allow it (cleanly), that's my understanding at least. So I instead opt to add a new switch and rename the original one to avoid confusion between the two.I haven't touch the python API yet, but will do when I'll get feedback on this proposal.