On Thu, 28 Jun 2018 at 00:45, Rudi von Staden <[email protected]> wrote:
> # trying to apply a filter to the input file by changing the subset
> parameter
> uri =
> f"file:///{speciesPointsFile}?type=csv&xField=DDE&yField=DDS&crs=EPSG:4326&spatialIndex=yes&subsetIndex=no&watchFile=no&subset=%22Genspec%22%20%3D%20\'{genspec}\'"
>
> filteredLayer = QgsVectorLayer(uri, 'FILTERED_POINTS',
> 'delimitedtext')
Looks like this parameter HAS to be a .csv file for your script to
work correctly. In this case you should be using a
QgsProcessingParameterFile, with a csv extension, as your parameter,
not a QgsProcessingParameterFeatureSource (which could be any type of
layer, including non-disk based formats like memory layers or postgis
databases).
If you swap to a QgsProcessingParameterFile then parameterAsFile
should work as expected.
Nyall
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user