QGIS Algorithm provided by QGIS (native c++) Print layout map extent to layer (native:printlayoutmapextenttolayer). Creates a polygon layer containing the extent of a print layout map item. This algorithm creates a polygon layer containing the extent of a print layout map item (or items), with attributes specifying the map size (in layout units), scale and rotation. If the map item parameter is specified, then only the matching map extent will be exported. If it is not specified, all map extents from the layout will be exported. Optionally, a specific output CRS can be specified. If it is not specified, the original map item CRS will be used.

qgis_printlayoutmapextenttolayer(
  LAYOUT = qgisprocess:::qgis_default_value(),
  MAP = qgisprocess:::qgis_default_value(),
  CRS = qgisprocess:::qgis_default_value(),
  OUTPUT = qgisprocess:::qgis_default_value(),
  ...,
  .complete_output = .complete_output_option(),
  .quiet = .quiet_option(),
  .messages = .message_option()
)

Arguments

LAYOUT

layout - Print layout. Name of print layout in current project.

MAP

layoutitem - Map item. UUID or item id of layout item.

CRS

crs - Override CRS. CRS as an auth ID (e.g. 'EPSG:3111'). CRS as a PROJ4 string (e.g. 'PROJ4:…'). CRS as a WKT string (e.g. 'WKT:…'). Path to a layer. The CRS of the layer is used..

OUTPUT

sink - Extent. Path for new vector layer.

...

further parameters passed to qgisprocess::qgis_run_algorithm()

.complete_output

logical specifying if complete out of qgisprocess::qgis_run_algorithm() should be used (TRUE) or first output (most likely the main) should read (FALSE). Default value is TRUE.

.quiet

logical specifying if parameter .quiet for qgisprocess::qgis_run_algorithm() Default value is TRUE.

.messages

logical specifying if messages from qgisprocess::qgis_run_algorithm() should be printed (TRUE) or not (FALSE). Default value is FALSE.

Details

Outputs description

  • HEIGHT - outputNumber - Map height

  • OUTPUT - outputVector - Extent

  • ROTATION - outputNumber - Map rotation

  • SCALE - outputNumber - Map scale

  • WIDTH - outputNumber - Map width