gws.plugin.alkis.data.exporter¶
Export of 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.DataArguments for the export operation.
- fsList: Iterable[gws.plugin.alkis.data.types.Flurstueck]¶
Iterable of Flurstuecke to export.
- progress: gws.lib.cli.ProgressIndicator | None¶
Progress indicator to update during export.
- class gws.plugin.alkis.data.exporter.Config(*args, **kwargs)¶
Bases:
gws.ConfigWithAccessExport of Flurstück data to CSV or GeoJSON.
- model: gws.ext.config.model | None¶
Fields to export.
- models: list[gws.ext.config.model] | None¶
Field sets the user can choose from.
- class gws.plugin.alkis.data.exporter.Model¶
Bases:
gws.base.model.ObjectExport model, a set of fields written to the export file.
The field names are flat Flurstueck keys, see
index.flatten_fs.- configure()¶
- class gws.plugin.alkis.data.exporter.ModelProps(*args, **kwargs)¶
Bases:
gws.PropsObject properties.
- class gws.plugin.alkis.data.exporter.Object¶
Bases:
gws.NodeALKIS exporter.
Writes Flurstuecke to a CSV or GeoJSON file, using export models the user can choose from.
- configure()¶
Configuration hook.
Called when the node is initialized. Raising an exception here aborts the creation of the node.
- get_models(user: gws.User, uids: list[str] | None = None) list[Model]¶
Return export models the user can use.
Unknown uids are logged and ignored.
- Parameters:
user – The user.
uids – Model uids to select. If empty, all models are considered.
- Returns:
A list of models.
- props_with_flags(user: gws.User, withEigentuemer: bool, withBuchung: bool) Props | None¶
Return exporter properties with the models available to the user.
Models with owner or land register fields are left out if the user has no access to that data.
- Parameters:
user – The user.
withEigentuemer – Whether the user may see owner data.
withBuchung – Whether the user may see land register data.
- Returns:
Exporter properties, or
Noneif the user cannot use the exporter or no model is available.
- run(args: Args)¶
Export a list of Flurstuecke to a file.
- Parameters:
args – Export arguments, including the Flurstuecke, the models and the output path.
- Raises:
gws.NotFoundError – If the export type is not supported.