Hi list<br><br>I would like to know if there was a dedicated api method to create a new vector layer (and save it into a file) by copying a map canvas layer (which could be postgis, shapefile, etc.).<br>I have read here<br>
<a href="http://www.qgis.org/pyqgis-cookbook/vector.html#writing-shapefiles">http://www.qgis.org/pyqgis-cookbook/vector.html#writing-shapefiles</a><br>how to write a new shapefile. But then I would need to  &quot;manually&quot; copy each feature from the chosen layer to the new one.<br>
<br>I was thinking of a equivalent to the right-click &quot;Save as&quot; which brings an ui to choose the targer layer format, srid, etc., but I am trying to do it programatically.<br><br>Is there a proper way to do it ?<br>
<br>Thanks in advance<br>Kimaidou<br>