Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release_3.40] Field types #9497

Merged
merged 5 commits into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/user_manual/processing_algs/algs_include.rst
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,42 @@ Resampling methods
* 11 --- Third quartile (Q3)

.. **end_raster_resampling_methods**


Vector field types
==================

.. **vector_field_types**

.. The following section is included in vector based algorithms such as
qgisaggregate, qgisrefactorfields

* 1 --- Boolean
* 2 --- Integer (32bit)
* 4 --- Integer (64bit)
* 6 --- Decimal (double)
* 9 --- Integer list
* 9 --- Integer (64bit) list
* 9 --- Decimal (double) list
* 10 --- Text (string)
* 11 --- String list
* 12 --- Binary Object (BLOB)
* 14 --- Date
* 15 --- Time
* 16 --- Date & Time

.. **end_vector_field_types**


.. **vector_field_subtypes**

.. The following section is included in vector based algorithms such as
qgisaggregate, qgisrefactorfields

* 2 --- Integer list
* 4 --- Integer (64bit) list
* 6 --- Decimal (double) list
* 10 --- String list
* 0 --- Any other types

.. **end_vector_field_subtypes**
44 changes: 28 additions & 16 deletions docs/user_manual/processing_algs/qgis/vectorgeometry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -303,41 +303,54 @@ Parameters
For each of the fields you'd like to retrieve information from,
you need to define the following:

``Input expression`` [expression] (``input``)
:guilabel:`Input expression` (``input``) [expression]
Field or expression from the input layer.

``Aggregate function`` [enumeration] (``aggregate``)
:guilabel:`Aggregate function` (``aggregate``) [enumeration]
:ref:`Function <aggregates_function>` to use on the input
expression to return the aggregated value.

Default: *concatenate* (for string data type), *sum* (for
numeric data type)

``Delimiter`` [string] (``delimiter``)
:guilabel:`Delimiter` (``delimiter``) [string]
Text string to separate aggregated values, for example in
case of concatenation.

Default: *,*

``Output field name`` [string] (``name``)
:guilabel:`Output field name` (``name``) [string]
Name of the aggregated field in the output layer.
By default input field name is kept.

``Type`` [enumeration] (``type``)
Data type of the output field. One of:
:guilabel:`Type` (``type``) [enumeration]
Data type of the output field.
Available types may not be compatible with the output layer provider.
One of:

* 1 --- Boolean
* 2 --- Integer
* 4 --- Integer64
* 6 --- Double
* 10 --- String
* 14 --- Date
* 16 --- DateTime
.. attention:: For certain field types, e.g. lists,
an extra ``sub_type`` parameter helps refine the specific type of the data.
It is automatically set in the GUI but may be needed
if you're running the algorithm in Python or from the command line.

``Length`` [number] (``length``)
.. include:: ../algs_include.rst
:start-after: **vector_field_types**
:end-before: **end_vector_field_types**

:guilabel:`Sub-type` (``sub_type``) [enumeration]
For certain field types, e.g. lists, this parameter helps refine the specific ``type`` of the data.
It is automatically set in the GUI but may be needed
if you're running the algorithm in Python or from the command line.
One of:

.. include:: ../algs_include.rst
:start-after: **vector_field_subtypes**
:end-before: **end_vector_field_subtypes**

:guilabel:`Length` (``length``) [number]
Length of the output field.

``Precision`` [number] (``precision``)
:guilabel:`Precision` (``precision``) [number]
Precision of the output field.

* - **Load fields from layer**
Expand All @@ -357,7 +370,6 @@ Parameters
:start-after: **layer_output_types**
:end-before: **end_layer_output_types**


Outputs
.......

Expand Down
22 changes: 21 additions & 1 deletion docs/user_manual/processing_algs/qgis/vectortable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,27 @@ Parameters

:guilabel:`Type` (``type``) [enumeration]
Data type of the output field.
Available types depend on the output layer provider.
Available types may not be compatible with the output layer provider.
One of:

.. attention:: For certain field types, e.g. lists,
an extra ``sub_type`` parameter helps refine the the specific type of the data.
It is automatically set in the GUI but may be needed
if you're running the algorithm in Python or from the command line.

.. include:: ../algs_include.rst
:start-after: **vector_field_types**
:end-before: **end_vector_field_types**

:guilabel:`Sub-type` (``sub_type``) [enumeration]
For certain field types, e.g. lists, this parameter helps refine the specific ``type`` of the data.
It is automatically set in the GUI but may be needed
if you're running the algorithm in Python or from the command line.
One of:

.. include:: ../algs_include.rst
:start-after: **vector_field_subtypes**
:end-before: **end_vector_field_subtypes**

:guilabel:`Length` (``length``) [number]
Length of the output field.
Expand Down
Loading