Coverage for gws-app/gws/plugin/exporter/csv/__init__.py: 100%
16 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
1"""CSV exporter.
3Exports vector features with the GDAL ``CSV`` driver. Each model is
4written to its own file. GDAL creation options can be passed with
5``options``, see
6https://gdal.org/en/stable/drivers/vector/csv.html.
8Example::
10 exporters+ {
11 type "csv"
12 title "CSV"
13 target "download"
14 }
15"""
17import gws
18import gws.base.exporter
19import gws.lib.mime
22@gws.ext.config.exporter('csv')
23class Config(gws.base.exporter.Config):
24 """Export of features to CSV."""
26 pass
29@gws.ext.props.exporter('csv')
30class Props(gws.base.exporter.Props):
31 """CSV Exporter properties."""
33 pass
36@gws.ext.object.exporter('csv')
37class Object(gws.base.exporter.Object):
38 """CSV exporter."""
40 supportsVector = True
41 supportsRaster = False
42 supportsMultiLayer = False
44 def run(self, ea, er):
45 gws.base.exporter.util.run_gdal_vector_export('CSV', gws.lib.mime.CSV, ea, er)