4

In QGIS 2.99.0 modeler, there is a obviously a new input type called Feature Source, wich does what Vector Layer did in previous versions (but Vector Layer is still available):

enter image description here

New behaviour, as can be seen so far:

  • Vector Layer can not be restricted to certain shape types and is not recognized as algorithm input.
  • Feature Source can be restricted to shape types and is recognized as algorithm input (successor to Vector Layer)

The auld Vector Layer input in QGIS 2.14. etc. modeler:

enter image description here

The new Vector Layer input in QGIS 2.99.0:

enter image description here

The new Feature Source input in QGIS 2.99.0:

enter image description here

Question: What is the difference between the new Vector Layer and Feature Source, provided Feature Source is not restricted to a certain shape type? And if Vector Layer inputs do not appear in algorithm input selections, what is it for?

3

I believe it's just a change in naming convention as defined in ModelerParameterDefinitionDialog.py.

QGIS < v2.99  |  QGIS >= v2.99
------------------------------
Table         |  Vector Layer
Vector Layer  |  Feature Source
  • 1
    It's not obvious according to me. I would prefer the old terminology. And the algorithm Add field to attribute table doesn't accept a vector layer for instance, so it's exactly a table input. – etrimaille Aug 18 '17 at 12:35
  • @Gustry - I understand what you mean. Naming it Feature Source is very similar to what ArcGIS use: Feature Class. Wonder if this played any influence... :) – Joseph Aug 18 '17 at 12:41
  • In 2.99.0-151 they exposed all layer type filters to model feature source, vector layer and multi layer inputs. Now we can obviously use feature source OR vector layer as algorithm input. Now totally confusing to me, why the distinction between feature source and vector layer? issues.qgis.org/issues/17030 – Jochen Schwarze Aug 21 '17 at 8:35
  • @JochenSchwarze - Guess they forgot ;) – Joseph Aug 21 '17 at 9:14
  • 1
    It's not that simple. A vector layer parameter will ONLY accept vector layers. Some algorithms restrict their input types to vector layer parameters, because those algorithms only make sense for layers (e.g. the "select by..." algorithms, or algorithms which modify a table in place like Truncate). But feature sources don't have to be a layer. They can be ANY input type which has features. Many of the benefits of feature sources won't become evident until 3.2 or greater, but in 3.0 the biggest difference is that a "feature source" input allows you to operate an algorithm on a selected subset. – ndawson Aug 27 '17 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.