# sec_interp.core.utils.io module

I/O Utilities Module.

File I/O operations and user messaging.

sec_interp.core.utils.io.create_shapefile_writer(*args, **kwargs) → qgis.core.QgsVectorFileWriter

  Delegate to create_vector_writer (deprecated shim).

sec_interp.core.utils.io.create_vector_writer(output_path: str | Path, crs: qgis.core.QgsCoordinateReferenceSystem, fields: qgis.core.QgsFields, geometry_type: qgis.core.QgsWkbTypes.GeometryType = qgis.core.QgsWkbTypes.LineString, layer_name: str | None = None, overwrite_layer: bool = True, symbology_export: qgis.core.QgsVectorFileWriter.SymbologyExport = qgis.core.QgsVectorFileWriter.NoSymbology) → qgis.core.QgsVectorFileWriter

  Create and initialize a QgsVectorFileWriter for various vector formats.

  Supports Shapefile (.shp), GeoPackage (.gpkg), and DXF (.dxf) based on extension.

  Parameters:

    - output_path – File system path for the new file.

    - crs – The Coordinate Reference System.

    - fields – The attribute fields definition.

    - geometry_type – The mapping geometry type (default: LineString).

    - layer_name – Optional conceptual layer name.

    - overwrite_layer – Whether to overwrite existing layers.

    - symbology_export – Symbology export mode (default: NoSymbology).

  Returns:

    An initialized writer object.