I'm building a Processing Model in QGIS that ultimately exports a points shapefile (vector layer) as a CSV in a different coordinate system than the shapefile.

I ordinarily accomplish this in the "Save Vector Layer As" window (see image below) which I access by right-clicking on the shapefile in the Layers Panel. In this window, I uncheck field_1 and field_2 for export (I do not need those fields), and I export GEOMETRY "AS_YX" (I do need coordinates in the desired coordinate system to be written to the CSV).

"Save Vector Layer As" window

Can I access this "Save Vector Layer As" algorithm for use in a QGIS Processing Model?

  • I think it is not available in the model algorithmen. You can try to make a proccessing script instead. This should not be that much code.There is on class called: QgsVectorFileWriter.writeAsVectorFormat(vlayer, "xy.csv", "utf-8", None, "CSV", layerOptions ='GEOMETRY=AS_WKT') which is doing the whole stuff. – eurojam Mar 12 '18 at 8:06
  • Welcome to GIS SE! As a new user be sure to take the Tour where you will see that there should be only one question asked per question under our focussed Q&A format. Please ask your "PS" as a separate question. – PolyGeo Mar 12 '18 at 8:43

You simply set any process' output as final output by naming the field below <output vector>, then there will be a dialogue where you want to save it to. Though you can not choose a desired CRS for example, that you'll have to set via transform before.

  • The PS should be asked as a separate question. – PolyGeo Mar 12 '18 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.