From 5925cae38676d56ec2a1d7d3dcd219179c64038c Mon Sep 17 00:00:00 2001 From: Alexander Verbitsky Date: Wed, 17 Apr 2024 03:25:08 +0200 Subject: [PATCH] fix: VectorDataset.create does not use arguments --- gdal_boots/gdal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdal_boots/gdal.py b/gdal_boots/gdal.py index 8f9a39f..d77a43e 100644 --- a/gdal_boots/gdal.py +++ b/gdal_boots/gdal.py @@ -615,7 +615,8 @@ def to_vector(self, field_id=-1, callback: Callable[[float, str, Any], None] = N https://gis.stackexchange.com/questions/328358/gdal-warp-memory-datasource-as-cutline """ - vds = VectorDataset.create(self.geoinfo.epsg) + vds = VectorDataset.create() + vds.add_layer("test", VectorDataset.GeometryType.Polygon, self.geoinfo.epsg) band = self.ds.GetRasterBand(1) gdal.Polygonize(band, band, vds.layers.first().ref_layer, field_id, [], callback=callback) vds.ds.FlushCache()