gws.plugin.alkis.data.exporter

ALKIS exporter.

Export Flurstuecke to CSV or GeoJSON.

Source code: gws.plugin.alkis.data.exporter

Module Contents

class gws.plugin.alkis.data.exporter.Args(*args, **kwargs)

Bases: gws.Data

Arguments for the export operation.

format: Format

Export format.

fsList: Iterable[gws.plugin.alkis.data.types.Flurstueck]

Iterable of Flurstuecke to export.

groups: list[Group]

List of export groups to use.

progress: gws.lib.cli.ProgressIndicator | None

Progress indicator to update during export.

user: gws.User

User who requested the export.

class gws.plugin.alkis.data.exporter.Config(*args, **kwargs)

Bases: gws.ConfigWithAccess

Export configuration

format: Format | None

Export format. (added in 8.2)

groups: list[GroupConfig] | None

User-selectable export groups. (added in 8.2)

class gws.plugin.alkis.data.exporter.Format(*args, **kwds)

Bases: gws.Enum

Export format.

csv = 'csv'
geojson = 'geojson'
class gws.plugin.alkis.data.exporter.Group(*args, **kwargs)

Bases: gws.Data

Export group.

fieldNames: list[str]

List of field names from Model fields.

index: int

Ordinal index of the group.

keys: set[str]

Set of keys that are used in this group, e.g. fs_recs_gemarkung_text.

title: str

Title to display in the ui.

withBuchung: bool

Whether to include Buchung data.

withEigentuemer: bool

Whether to include Eigentuemer data.

class gws.plugin.alkis.data.exporter.GroupConfig(*args, **kwargs)

Bases: gws.Config

Export group configuration.

fields: list[gws.ext.config.modelField]

Fields to export.

title: str

Title to display in the ui

class gws.plugin.alkis.data.exporter.Model

Bases: gws.base.model.Object

configure()
class gws.plugin.alkis.data.exporter.Object

Bases: gws.Node

GWS object tree node.

format: str
groups: list[Group]
model: Model
configure()

Configuration hook.

run(args: Args) tuple[str, str]

Export a Flurstueck list to a temp file.

Returns:

A tuple (path, mime) where path is the path to the exported file and mime is the MIME type.