[Qgis-developer] use ogr2ogr in a plugin

Luigi Pirelli luipir at gmail.com
Thu Oct 29 07:54:45 PDT 2015


may you use processing wrapper to ogr2gr?

e.g.

import processing
processing.runalg("your processing command get with
processing.alglist",... etc etc)

is that you are looking for?

in this waqy you are os independent.

regards,
Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Elance: https://www.elance.com/s/edit/luigipirelli/
* GitHub: https://github.com/luipir
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
**************************************************************************************************


On 28 October 2015 at 15:09, Denis Rouzaud <denis.rouzaud at gmail.com> wrote:
> Hi all,
>
> I would like to use ogr2ogr in a plugin, and I wonder if it's possible
> to call the one that has been installed along QGIS, independently from
> the OS.
>
> The idea is to connect to a Postgres DB and writes content of tables
> into shapefiles. One way would be to load the tables in QGIS and write
> content manually, but a single ogr2ogr would be quite straightforward.
>
> Thanks a lot for any lead,
>
> Denis
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer


More information about the Qgis-developer mailing list