Skip to content

Commit

Permalink
Sipify
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 24, 2020
1 parent 9ca35a3 commit 28467f2
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -241,7 +241,7 @@ a specified ``algorithm``.
const QStringList &compatibleFormats,
const QString &preferredFormat,
QgsProcessingContext &context,
QgsProcessingFeedback *feedback );
QgsProcessingFeedback *feedback, long long featureLimit = -1 );
%Docstring
Converts a source vector ``layer`` to a file path of a vector layer of compatible format.

Expand All @@ -254,6 +254,8 @@ in a temporary location using ``baseName``. The function will then return the pa
The ``preferredFormat`` argument is used to specify to desired file extension to use when a temporary
layer export is required. This defaults to shapefiles.

The ``featureLimit`` argument can be used to specify a limit on the number of features read from the layer.

When an algorithm is capable of handling multi-layer input files (such as Geopackage), it is preferable
to use convertToCompatibleFormatAndLayerName() which may avoid conversion in more situations.

Expand All @@ -267,7 +269,7 @@ to use convertToCompatibleFormatAndLayerName() which may avoid conversion in mor
const QString &preferredFormat,
QgsProcessingContext &context,
QgsProcessingFeedback *feedback,
QString &layerName /Out/ );
QString &layerName /Out/, long long featureLimit = -1 );
%Docstring
Converts a source vector ``layer`` to a file path and layer name of a vector layer of compatible format.

Expand All @@ -277,6 +279,8 @@ in a temporary location using ``baseName``. The function will then return the pa

``compatibleFormats`` should consist entirely of lowercase file extensions, e.g. 'shp'.

The ``featureLimit`` argument can be used to specify a limit on the number of features read from the layer.

The ``preferredFormat`` argument is used to specify to desired file extension to use when a temporary
layer export is required. This defaults to shapefiles.

Expand All @@ -291,6 +295,7 @@ a conversion in this case and will return the target layer name in the ``layerNa
:param preferredFormat: preferred format extension to use if conversion if required
:param context: processing context
:param feedback: feedback object
:param featureLimit: can be used to place a limit on the maximum number of features read from the layer

:return: - path to source layer, or nearly converted compatible layer
- layerName: will be set to the target layer name for multi-layer sources (e.g. Geopackage)
Expand Down

0 comments on commit 28467f2

Please sign in to comment.