Skip to main content
edited tags
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345
improved formatting
Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

Save Saving shapefile with QgsVectorFileWriter

I've tried to create a vector file (shapefile) with QgsVectorFileWriterQgsVectorFileWriter. This is my code:

path = "/home/camilocorredor/Documentos/ANT/4_Abril/File.shp"    
options = QgsVectorFileWriter.SaveVectorOptions()
options.driverName = "ESRI Shapefile"
 
    
QgsVectorFileWriter.writeAsVectorFormatV2(layer_test, path, QgsCoordinateTransformContext(), options)
 

The vector file never is created on the folder.

Any suggesting?

I've tried to create vector file (shapefile) with QgsVectorFileWriter. This is my code:

path = "/home/camilocorredor/Documentos/ANT/4_Abril/File.shp"    
options = QgsVectorFileWriter.SaveVectorOptions()
options.driverName = "ESRI Shapefile"
 
    
QgsVectorFileWriter.writeAsVectorFormatV2(layer_test, path, QgsCoordinateTransformContext(), options)
 

The vector file never is created on the folder.

Any suggesting?

I've tried to create a vector file (shapefile) with QgsVectorFileWriter. This is my code:

path = "/home/camilocorredor/Documentos/ANT/4_Abril/File.shp"    
options = QgsVectorFileWriter.SaveVectorOptions()
options.driverName = "ESRI Shapefile"
    
QgsVectorFileWriter.writeAsVectorFormatV2(layer_test, path, QgsCoordinateTransformContext(), options)

The vector file never is created on the folder.

Any suggesting?

naming
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65
Loading
Source Link
Loading