Skip to content

Processing toolbox: Add option to generate bounding boxes of features #734

@arjxn-py

Description

@arjxn-py

https://docs.qgis.org/3.40/en/docs/user_manual/processing_algs/qgis/vectorgeometry.html#qgisboundingboxes

Add an option in processing toolbox that creates bounding box geometries (envelopes) for each feature in a vector layer. This can be useful for visualizing the spatial extent of features.

This operation would:

  • Replace each geometry with a rectangle (its bounding box).
  • Preserve the original feature attributes.

A simple ogr2ogr command would look like:

[
  '-f', 'GeoJSON',
  '-dialect', 'sqlite',
  '-sql', 'SELECT ST_Envelope(geometry) AS geometry, * FROM input'
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions