[Qgis-user] QgsVectorFileWriter

Möri Cedric Cedric.Moeri at bd.so.ch
Wed Jan 21 06:10:05 PST 2009


Hi list

in a python plugin im using QgsVectorFileWriter.writeAsShapefile to write a shapefile to the disk.

The first time I use a certain file name/path (e.g /tmp/foo.shp), it works properly. If I try to rerun the script, it fails saying: 
ERROR 1: /tmp/foo.shp is not a directory.

It looks like it is not possible to replace an existing shapefile that way. Am I correct? Do I have to manage the files myself (i.e. delete them before writing the new file)? Or is there another way to replace an existing shapefile?

Thans a lot for any help

regards
Cédric


mit freundlichen Grüssen

Cédric Möri
GIS-Informatiker

--
Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
Rötistrasse 4
4501 Solothurn

Telefon: +41 (0)32 627 24 75
Telefax: +41 (0)32 627 22 14
mailto:cedric.moeri at bd.so.ch
http://www.agi.so.ch



More information about the Qgis-user mailing list