Is there any way to force input parameters (e.g. data provider, geometry type, field type) in processing scripts?
For processing scripts, I don't think it is currently possible to filter out a layer's data provider specifically for PostGIS layers. Looking at the parameters.py file for the processing framework, it seems that you can only specify the following for all loaded shapefiles:
- Geometry type: (point, line or polygon)
- Field type: (number, string)
So currently, you could use something like:
##Input table=vector point ##Distance field=field number Input table
You could try and edit the file to include a PostGIS parameter (not sure how much editing is required) which you can find in your QGIS directory. E.g.:
C:/Program Files/QGIS 2.18.2/apps/qgis/python/plugins/processing/core/parameters.py