# sec_interp.core.utils.geometry_utils.processing module

Geometry processing utilities.

sec_interp.core.utils.geometry_utils.processing.create_buffer_geometry(geometry: qgis.core.QgsGeometry, crs: qgis.core.QgsCoordinateReferenceSystem, distance: float, segments: int = 5) → qgis.core.QgsGeometry

  Create a buffer around a geometry.

  Parameters:

    - geometry – Input geometry.

    - crs – Coordinate Reference System of the geometry.

    - distance – Buffer distance in layer units.

    - segments – Number of segments for the buffer approximation.

  Returns:

    The buffered geometry.

sec_interp.core.utils.geometry_utils.processing.create_memory_layer(layer_name: str, layer_type: str, crs: qgis.core.QgsCoordinateReferenceSystem, fields: list[qgis.core.QgsField]) → qgis.core.QgsVectorLayer

  Create a temporary memory (scratch) layer.

  Parameters:

    - layer_name – Name for the layer.

    - layer_type – QGIS geometry type string (e.g., ‘Point’, ‘LineString’).

    - crs – Coordinate reference system.

    - fields – List of fields for the layer.

  Returns:

    The created memory layer.

sec_interp.core.utils.geometry_utils.processing.densify_line_by_interval(geometry: qgis.core.QgsGeometry, interval: float) → qgis.core.QgsGeometry

  Densify a line geometry by a specific distance interval.

  Parameters:

    - geometry – Line geometry to densify.

    - interval – Maximum distance between vertices.

  Returns:

    The densified geometry.

sec_interp.core.utils.geometry_utils.processing.run_geometry_operation(operation: str, *args, **kwargs) → Any

  Wrap generic geometry operations.

  Parameters:

    - operation – Name of the operation to perform.

    - *args – Positional arguments for the operation.

    - **kwargs – Keyword arguments for the operation.

  Returns:

    Result of the operation.