27.1.1. Cartography

27.1.1.1. Align points to features

Calculates the rotation required to align point features with their nearest feature from another reference layer. A new field is added to the output layer which is filled with the angle (in degrees, clockwise) to the nearest reference feature.

Optionally, the output layer’s symbology can be set to automatically use the calculated rotation field to rotate marker symbols. If desired, a maximum distance to use when aligning points can be set, to avoid aligning isolated points to distant features.

Подсказка

This algorithm is designed for use cases like aligning building point symbols to follow the nearest road direction.

checkbox Allows features in-place modification of point features

Параметры

Ярлык

Имя

Тип

Описание

Исходный слой

INPUT

[vector: point]

Point features to calculate the rotation for

Reference layer

REFERENCE_LAYER

[vector: any]

Layer to find the closest feature from for rotation calculation

Maximum distance to consider

Optional

MAX_DISTANCE

[number]

Default: Not set

If no reference feature is found within this distance, no rotation is assigned to the point feature.

Angle field name

FIELD_NAME

[string]

Default: „rotation“

Field in which to store the rotation value.

Automatically apply symbology

APPLY_SYMBOLOGY

[логическое значение]

Default: True

Rotates the symbol marker of the features using the angle field value

Aligned layer

OUTPUT

[vector: point]

По умолчанию: [Сохранить во временный файл]

Specify the rotated output vector layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File…

  • Save to Geopackage…

  • Save to Database Table…

The file encoding can also be changed here.

Результаты

Ярлык

Имя

Тип

Описание

Aligned layer

OUTPUT

[vector: point]

The point layer appended with a rotation field. If loaded to QGIS, it is applied by default the input layer symbology, with a data-defined rotation of its marker symbol.

Код на Python

Algorithm ID: native:angletonearest

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.2. Combine style databases

Combines multiple QGIS style databases into a single style database. If items of the same type with the same name exist in different source databases these will be renamed to have unique names in the output combined database.

Параметры

Ярлык

Имя

Тип

Описание

Input databases

INPUT

[file] [list]

Files containing QGIS style items

Objects to combine

OBJECTS

[enumeration] [list]

Types of style items in the input databases you would like to put in the new database. These can be:

Output style database

OUTPUT

[файл]

По умолчанию: [Сохранить во временный файл]

Output .XML file combining the selected style items. One of:

  • Сохранить во временный файл

  • Save to File…

Результаты

Ярлык

Имя

Тип

Описание

Color ramp count

COLORRAMPS

[number]

Label settings count

LABELSETTINGS

[number]

Output style database

OUTPUT

[файл]

Output .XML file combining the selected style items

Symbol count

SYMBOLS

[number]

Text format count

TEXTFORMATS

[number]

Код на Python

Algorithm ID: native:combinestyles

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.3. Create categorized renderer from styles

Sets a vector layer’s renderer to a categorized renderer using matching symbols from a style database. If no style file is specified, symbols from the user’s current symbol library are used instead.

A specified expression or field is used to create categories for the renderer. Each category is individually matched to the symbols which exist within the specified QGIS XML style database. Whenever a matching symbol name is found, the category’s symbol will be set to this matched symbol.

If desired, outputs can also be tables containing lists of the categories which could not be matched to symbols, and symbols which were not matched to categories.

Параметры

Ярлык

Имя

Тип

Описание

Исходный слой

INPUT

[vector: any]

Vector layer to apply a categorized style to

Categorize using expression

FIELD

[expression]

Field or expression to categorize the features

Style database (leave blank to use saved symbols)

STYLE

[файл]

File (.XML) containing the symbols to apply to the input layer categories. The file can be obtained from the Style Manager Share symbols tool. If no file is specified, QGIS local symbols library is used.

Use case-sensitive match to symbol names

CASE_SENSITIVE

[логическое значение]

По умолчанию: Ложь

If True (checked), applies a case sensitive comparison between the categories and symbols names

Ignore non-alphanumeric characters while matching

TOLERANT

[логическое значение]

По умолчанию: Ложь

If True (checked), non-alphanumeric characters in the categories and symbols names will be ignored, allowing greater tolerance during the match.

Non-matching categories

Optional

NON_MATCHING_CATEGORIES

[таблица]

Default: [Skip output]

Output table for categories which do not match any symbol in the database. One of:

  • Skip Output

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File…

  • Save to Geopackage…

  • Save to Database Table…

The file encoding can also be changed here.

Non-matching symbol names

Optional

NON_MATCHING_SYMBOLS

[таблица]

Default: [Skip output]

Output table for symbols from the provided style database which do not match any category. One of:

  • Skip Output

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File…

  • Save to Geopackage…

  • Save to Database Table…

The file encoding can also be changed here.

Результаты

Ярлык

Имя

Тип

Описание

Non-matching categories

NON_MATCHING_CATEGORIES

[таблица]

Lists categories which could not be matched to any symbol in the provided style database

Non-matching symbol names

NON_MATCHING_SYMBOLS

[таблица]

Lists symbols from the provided style database which could not match any category

Categorized layer

OUTPUT

[same as input]

The input vector layer with the categorized style applied. No new layer is output.

Код на Python

Algorithm ID: native:categorizeusingstyle

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.4. Create style database from project

Extracts all style objects (symbols, color ramps, text formats and label settings) from a QGIS project.

The extracted symbols are saved to a QGIS style database (XML format), which can be managed and imported via the Style Manager dialog.

См.также

Combine style databases

Параметры

Ярлык

Имя

Тип

Описание

Input project (leave blank to use current)

Optional

INPUT

[файл]

A QGIS project file to extract the style items from

Objects to extract

OBJECTS

[enumeration] [list]

Types of style items in the input project you would like to put in the new database. These can be:

Output style database

OUTPUT

[файл]

По умолчанию: [Сохранить во временный файл]

Specify the output .XML file for the selected style items. One of:

  • Сохранить во временный файл

  • Save to File…

Результаты

Ярлык

Имя

Тип

Описание

Color ramp count

COLORRAMPS

[number]

Number of color ramps

Label settings count

LABELSETTINGS

[number]

Number of label settings

Output style database

OUTPUT

[файл]

Output .XML file for the selected style items

Symbol count

SYMBOLS

[number]

Number of symbols

Text format count

TEXTFORMATS

[number]

Number of text formats

Код на Python

Algorithm ID: native:stylefromproject

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.5. Export atlas layout as image

Exports the atlas of a print layout as image files (e.g. PNG or JPEG images).

If a coverage layer is set, the selected layout’s atlas settings exposed in this algorithm will be overwritten. In this case, an empty filter or sort by expression will turn those settings off.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Atlas layout

LAYOUT

[layout]

Layout to export

Coverage layer

Optional

COVERAGE_LAYER

[vector: any]

Layer to use to generate the atlas

Filter expression

FILTER_EXPRESSION

[expression]

Expression to use to filter out atlas features

Sort expression

Optional

SORTBY_EXPRESSION

[expression]

Expression to use to sort the atlas features

Reverse sort order

Optional

SORTBY_REVERSE

[логическое значение]

Determines if sorting should be inverted. Used when a sort expression is provided.

Output filename expression

FILENAME_EXPRESSION

[expression]

Default: „output_“||@atlas_featurenumber

Expression for use to generate filenames

Output folder

FOLDER

[folder]

Destination folder where the images will be generated

Advanced parameters

Ярлык

Имя

Тип

Описание

Map layers to assign to unlocked map item(s)

Optional

LAYERS

[enumeration] [layer]

Layers to display in the map item(s) whose contents are not locked

Image format

EXTENSION

[enumeration]

Default: png

File format of the generated output(s). The list of available formats varies depending on OS and installed drivers.

DPI

Optional

DPI

Default: Not set

[number]

DPI of the output file(s). If not set, the value in the print layout settings will be used.

Generate world file

GEOREFERENCE

[логическое значение]

Default: True

Determines if a world file should be generated

Export RDF metadata

INCLUDE_METADATA

[логическое значение]

Default: True

Determines if RDF metadata (title, author, …) should be generated

Enable antialiasing

ANTIALIAS

[логическое значение]

Default: True

Determines if antialiasing should be enabled

Результаты

Ярлык

Имя

Тип

Описание

Image file

OUTPUT

[файл]

Image files generated by the atlas layout

Код на Python

Algorithm ID: native:atlaslayouttoimage

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.6. Export atlas layout as PDF (multiple files)

NEW in 3.24

Exports the atlas of a print layout to multiple PDF files.

If a coverage layer is set, the selected layout’s atlas settings exposed in this algorithm will be overwritten. In this case, an empty filter or sort by expression will turn those settings off.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Atlas layout

LAYOUT

[layout]

Layout to export

Coverage layer

Optional

COVERAGE_LAYER

[vector: any]

Layer to use to generate the atlas

Filter expression

FILTER_EXPRESSION

[expression]

Expression to use to filter out atlas features

Sort expression

Optional

SORTBY_EXPRESSION

[expression]

Expression to use to sort the atlas features

Reverse sort order

Optional

SORTBY_REVERSE

[логическое значение]

Determines if sorting should be inverted. Used when a sort expression is provided.

Output filename

Optional

OUTPUT_FILENAME

[expression]

Name pattern of the PDF output files.

Output folder

OUTPUT_FOLDER

[folder]

Destination folder for the output PDF files.

Advanced parameters

Ярлык

Имя

Тип

Описание

Map layers to assign to unlocked map item(s)

Optional

LAYERS

[enumeration] [layer]

Layers to display in the map item(s) whose contents are not locked

DPI

Optional

DPI

Default: Not set

[number]

DPI of the output file(s). If not set, the value in the print layout settings will be used.

Always export as vectors

FORCE_VECTOR

[логическое значение]

По умолчанию: Ложь

Determines if vectorial data should be left as vectors

Always export as raster

NEW in 3.28

FORCE_RASTER

[логическое значение]

По умолчанию: Ложь

Forces all the items in the map to be rasterized. This parameter takes precedence over the FORCE_VECTOR parameter.

Append georeference information

GEOREFERENCE

[логическое значение]

Default: True

Determines if a world file should be generated

Export RDF metadata

INCLUDE_METADATA

[логическое значение]

Default: True

Determines if RDF metadata (title, author, …) should be generated

Disable tiled raster layer exports

DISABLE_TILED

[логическое значение]

По умолчанию: Ложь

Determines if raster should be tiled

Simplify geometries to reduce output file size

SIMPLIFY

[логическое значение]

Default: True

Determines if geometries should be simplified to reduce output file size

Text export

TEXT_FORMAT

[enumeration]

Default: 0

Determines if text should be exported as path or text objects. Possible options are:

  • 0 - Always export text as paths (recommended)

  • 1 - Always export texts as text objects

Image compression

NEW in 3.28

IMAGE_COMPRESSION

[enumeration]

Default: 0

Determines compression level of the image and how suitable the file could be for printing outputs or post-production in external applications. Possible options are:

  • 0 - Lossy (JPEG)

  • 1 - Lossless

Результаты

Ярлык

Имя

Тип

Описание

PDF file

OUTPUT

[файл]

PDF file corresponding to the exported atlas layout

Код на Python

Algorithm ID: native:atlaslayouttomultiplepdf

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.7. Export atlas layout as PDF (single file)

Exports the atlas of a print layout as a single PDF file.

If a coverage layer is set, the selected layout’s atlas settings exposed in this algorithm will be overwritten. In this case, an empty filter or sort by expression will turn those settings off.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Atlas layout

LAYOUT

[layout]

Layout to export

Coverage layer

Optional

COVERAGE_LAYER

[vector: any]

Layer to use to generate the atlas

Filter expression

FILTER_EXPRESSION

[expression]

Expression to use to filter out atlas features

Sort expression

Optional

SORTBY_EXPRESSION

[expression]

Expression to use to sort the atlas features

Reverse sort order

Optional

SORTBY_REVERSE

[логическое значение]

Determines if sorting should be inverted. Used when a sort expression is provided.

PDF file

OUTPUT

[файл]

Default: [Save to temporary file]

Name (including path) of the output file. One of:

  • Сохранить во временный файл

  • Save to File…

Advanced parameters

Ярлык

Имя

Тип

Описание

Map layers to assign to unlocked map item(s)

Optional

LAYERS

[enumeration] [layer]

Layers to display in the map item(s) whose contents are not locked

DPI

Optional

DPI

Default: Not set

[number]

DPI of the output file(s). If not set, the value in the print layout settings will be used.

Always export as vectors

FORCE_VECTOR

[логическое значение]

По умолчанию: Ложь

Determines if vectorial data should be left as vectors

Always export as raster

NEW in 3.28

FORCE_RASTER

[логическое значение]

По умолчанию: Ложь

Forces all the items in the map to be rasterized. This parameter takes precedence over the FORCE_VECTOR parameter.

Append georeference information

GEOREFERENCE

[логическое значение]

Default: True

Determines if a world file should be generated

Export RDF metadata

INCLUDE_METADATA

[логическое значение]

Default: True

Determines if RDF metadata (title, author, …) should be generated

Disable tiled raster layer exports

DISABLE_TILED

[логическое значение]

По умолчанию: Ложь

Determines if raster should be tiled

Simplify geometries to reduce output file size

SIMPLIFY

[логическое значение]

Default: True

Determines if geometries should be simplified to reduce output file size

Text export

TEXT_FORMAT

[enumeration]

Default: 0

Determines if text should be exported as path or text objects. Possible options are:

  • 0 - Always export text as paths (recommended)

  • 1 - Always export texts as text objects

Image compression

NEW in 3.28

IMAGE_COMPRESSION

[enumeration]

Default: 0

Determines compression level of the image and how suitable the file could be for printing outputs or post-production in external applications. Possible options are:

  • 0 - Lossy (JPEG)

  • 1 - Lossless

Результаты

Ярлык

Имя

Тип

Описание

PDF file

OUTPUT

[файл]

PDF file corresponding to the exported atlas layout

Код на Python

Algorithm ID: native:atlaslayouttopdf

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.8. Export print layout as image

Exports a print layout as an image file (e.g. PNG or JPEG images)

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Print layout

LAYOUT

[layout]

Layout to export

Image file

OUTPUT

[файл]

Default: [Save to temporary file]

Name (including path) of the output file. One of:

  • Сохранить во временный файл

  • Save to File…

Advanced parameters

Ярлык

Имя

Тип

Описание

Map layers to assign to unlocked map item(s)

Optional

LAYERS

[enumeration] [layer]

Layers to display in the map item(s) whose contents are not locked

DPI

Optional

DPI

Default: Not set

[number]

DPI of the output file(s). If not set, the value in the print layout settings will be used.

Generate world file

GEOREFERENCE

[логическое значение]

Default: True

Determines if a world file should be generated

Export RDF metadata

INCLUDE_METADATA

[логическое значение]

Default: True

Determines if RDF metadata (title, author, …) should be generated

Enable antialiasing

ANTIALIAS

[логическое значение]

Default: True

Determines if antialiasing should be enabled

Результаты

Ярлык

Имя

Тип

Описание

Image file

OUTPUT

[файл]

Image file corresponding to the exported print layout

Код на Python

Algorithm ID: native:printlayouttoimage

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.9. Export print layout as PDF

Exports a print layout as a PDF file.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Print Layout

LAYOUT

[layout]

Layout to export

PDF file

OUTPUT

[файл]

Default: [Save to temporary file]

Name (including path) of the output file. One of:

  • Сохранить во временный файл

  • Save to File…

Advanced parameters

Ярлык

Имя

Тип

Описание

Map layers to assign to unlocked map item(s)

Optional

LAYERS

[enumeration] [layer]

Layers to display in the map item(s) whose contents are not locked

DPI

Optional

DPI

Default: Not set

[number]

DPI of the output file(s). If not set, the value in the print layout settings will be used.

Always export as vectors

FORCE_VECTOR

[логическое значение]

По умолчанию: Ложь

Determines if vectorial data should be left as vectors

Always export as raster

NEW in 3.28

FORCE_RASTER

[логическое значение]

По умолчанию: Ложь

Forces all the items in the map to be rasterized. This parameter takes precedence over the FORCE_VECTOR parameter.

Append georeference information

GEOREFERENCE

[логическое значение]

Default: True

Determines if a world file should be generated

Export RDF metadata

INCLUDE_METADATA

[логическое значение]

Default: True

Determines if RDF metadata (title, author, …) should be generated

Disable tiled raster layer exports

DISABLE_TILED

[логическое значение]

По умолчанию: Ложь

Determines if raster should be tiled

Simplify geometries to reduce output file size

SIMPLIFY

[логическое значение]

Default: True

Determines if geometries should be simplified to reduce output file size

Text export

TEXT_FORMAT

[enumeration]

Default: 0

Determines if text should be exported as path or text objects. Possible options are:

  • 0 - Always export text as paths (recommended)

  • 1 - Always export texts as text objects

Image compression

NEW in 3.28

IMAGE_COMPRESSION

[enumeration]

Default: 0

Determines compression level of the image and how suitable the file could be for printing outputs or post-production in external applications. Possible options are:

  • 0 - Lossy (JPEG)

  • 1 - Lossless

Export layers as separate PDF files

SEPARATE_LAYERS

[логическое значение]

По умолчанию: Ложь

If True, then a separate PDF file will be created per layer per map item in the layout. Additionally, separate PDF files may be created for other complex layout items, resulting in a set of PDF files which contain logical atomic components of the layout.

Результаты

Ярлык

Имя

Тип

Описание

PDF file

OUTPUT

[файл]

PDF file(s) corresponding to the exported print layout

Код на Python

Algorithm ID: native:printlayouttopdf

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.10. Extract labels

NEW in 3.24

Extracts label information from a rendered map at a given extent and scale.

If a map theme is provided, the rendered map will match the visibility and symbology of that theme. If left blank, all visible layers from the project will be used. Extracted label information include: position (served as point geometries), the associated layer name and feature ID, label text, rotation (in degree, clockwise), multiline alignment, and font details.

Параметры

Basic parameters

Ярлык

Имя

Тип

Описание

Map extent

EXTENT

[extent]

Extent of the map to extract the labels from

Available methods are:

  • Calculate from layer…: uses extent of a layer loaded in the current project

  • Calculate from layout map…: uses extent of a layout map item in the active project

  • Calculate from bookmark…: uses extent of a saved bookmark

  • Use map canvas extent

  • Draw on canvas: click and drag a rectangle delimiting the area to take into account

  • Enter the coordinates as xmin, xmax, ymin, ymax

Map scale

SCALE

[scale]

Extracted labels will be rendered using their properties set at this scale.

Map theme

Optional

MAP_THEME

[maptheme]

A map theme displaying the layers to extract the labels from. If unset, labels of the currently visible layers are extracted.

Include unplaced labels

Optional

INCLUDE_UNPLACED

[логическое значение]

Default: True

Specify whether all overlapping labels should be extracted, including the conflicting (thus unplaced) ones.

Extracted labels

OUTPUT

[vector: point]

Default: [Create temporary layer]

Specify the output vector layer for the extent(s). One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File…

  • Save to Geopackage…

  • Save to Database Table…

The file encoding can also be changed here.

Advanced parameters

Ярлык

Имя

Тип

Описание

Map resolution (in DPI)

Optional

DPI

Default: 96.0

[number]

Результаты

Ярлык

Имя

Тип

Описание

Extracted labels

OUTPUT

[vector: point]

Point vector layer representing the fetched labels. Each feature has attributes identifying its source (layer, feature ID) and the assigned labeling properties (text, font, size, rotation, …). A default style with labeling and null symbol is also applied to the layer.

Предупреждение

Because some of the generated fields have name with more than 10 characters, using the ESRI shapefile format (.SHP) to store the output may lead to unexpected rendering while loading the layer in QGIS.

Код на Python

Algorithm ID: native:extractlabels

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.12. Set layer style

Applies a provided style to a layer. The style must be defined in a QML file.

No new output are created: the style is immediately assigned to the layer.

Параметры

Ярлык

Имя

Тип

Описание

Input Layer

INPUT

[layer]

Input layer you want to apply the style to

Style file

STYLE

[файл]

Path to the .qml file of the style

Результаты

Ярлык

Имя

Тип

Описание

OUTPUT

[same as input]

The input layer with the new style assigned. No new layer is created.

Код на Python

Algorithm ID: native:setlayerstyle

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.13. Topological coloring

Assigns a color index to polygon features in such a way that no adjacent polygons share the same color index, whilst minimizing the number of colors required.

The algorithm allows choice of method to use when assigning colors.

A minimum number of colors can be specified if desired. The color index is saved to a new attribute named color_id.

The following example shows the algorithm with four different colors chosen; as you can see each color class has the same amount of features.

../../../../_images/topological_color.png

Рис. 27.1 Topological colors example

Параметры

Ярлык

Имя

Тип

Описание

Исходный слой

INPUT

[vector: polygon]

The input polygon layer

Minimum number of colors

MIN_COLORS

[number]

Default: 4

The minimum number of colors to assign. Minimum 1, maximum 1000.

Minimum distance between features

MIN_DISTANCE

[number]

Default: 0.0

Prevent nearby (but non-touching) features from being assigned equal colors. Minimum 0.0.

Balance color assignment

BALANCE

[enumeration]

Default: 0

Options are:

  • 0 — By feature count

    Attempts to assign colors so that the count of features assigned to each individual color index is balanced.

  • 1 — By assigned area

    Assigns colors so that the total area of features assigned to each color is balanced. This mode can be useful to help avoid large features resulting in one of the colors appearing more dominant on a colored map.

  • 2 — By distance between colors

    Assigns colors in order to maximize the distance between features of the same color. This mode helps to create a more uniform distribution of colors across a map.

Colored

OUTPUT

[vector: polygon]

Default: [Create temporary layer]

Specify the output layer. One of:

  • Create Temporary Layer (TEMPORARY_OUTPUT)

  • Save to File…

  • Save to Geopackage…

  • Save to Database Table…

The file encoding can also be changed here.

Результаты

Ярлык

Имя

Тип

Описание

Colored

OUTPUT

[vector: polygon]

Polygon vector layer with an added color_id column

Код на Python

Algorithm ID: qgis:topologicalcoloring

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.

27.1.1.14. Transfer annotations from main layer

Transfers all annotations from the main annotation layer in a project to a new annotation layer. Items placement can then be adjusted within the layer stack.

Параметры

Ярлык

Имя

Тип

Описание

New layer name

LAYER_NAME

[string]

Default: „Annotations“

Name of the annotations layer to create

Результаты

Ярлык

Имя

Тип

Описание

New layer name

OUTPUT

[layer]

A layer with items from the main annotation layer

Код на Python

Algorithm ID: native:transferannotationsfrommain

import processing
processing.run("algorithm_id", {parameter_dictionary})

ID алгоритма отображается при наведении мыши на алгоритм в Инструментах анализа. Словарь parameter dictionary содержит ключи параметров и их значения. См. Изпользование алгоритмов геообработки в консоли для детального описания того, как запускать алгоритмы анализа из консоли Python.