[Qgis-user] Append in Import Vector into PostGIS didn't
Frederico dos Santos Soares
fssunb at gmail.com
Mon Oct 17 08:34:03 PDT 2016
Hi Sandro,
Yes I can but, where?
2016-10-17 7:07 GMT-02:00 Sandro Santilli <strk at kbt.io>:
> Frederico, would you be up to turn this into a pull request ?
>
> There's now a test for connection string building in
> python/plugins/processing/tests/GdalAlgorithmsTest.py
> where you could add a test for it.
>
> --strk;
>
> On Sat, Oct 15, 2016 at 08:29:57PM -0300, Frederico dos Santos Soares
> wrote:
> > --Sorted out
> >
> > Sharing with the list the solution found.
> >
> > In a current work process, I need to run several models using the
> > "processing" as "[OGR] Import into PostGIS" is the only tool that allows
> > the output of the models do "append" on a table of Postgres / PostGIS, I
> > had to solve the problem in the script.
> >
> > Recalling I am using QGIS 2.8
> >
> > The reference that I used to solve the problem, comes from the same tool
> in
> > version 2.14. Clarify that in version 2.14 Import into postgis did not
> work
> > if executed within a model, at least not work for me, I believe we have
> > another bug there.
> >
> > Returning. The "Import into postgis" (for available connections) works in
> > ogr2ogrtopostgislist.py file in the ... \ QGIS Wien \ apps \ qgis-ltr \
> > python \ plugins \ processing \ algs \ gdal
> >
> > The file in its original version builds the command of ogr2ogr with the
> > schema parameter "-lco" + schema outside the database configuration
> > parameters: -> ... -append -nlt MULTILINESTRING -lco SCHEMA = teste_geo
> ...
> >
> > I changed the file so that the schema parameter was written into the
> > connection as follows "active_schema =" + schema -> PG: "host = localhost
> > port = 5432 dbname = gis password = xxx active_schema=temp
> >
> > And voila it worked!
> >
> > Attached the file, marked with # rows that were changed.
> >
> > I hope that helps someone want to use this tool in their models. I'm
> using
> > it's pretty cool.
> >
> > Best regards.
> >
> > --
> >
> > Frederico dos Santos Soares
> > Geógrafo
> > 55 61 8416 0105
> > fssunb at gmail.com
>
--
Frederico dos Santos Soares
Geógrafo
55 61 8416 0105
fssunb at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20161017/857ecfb4/attachment.html>
More information about the Qgis-user
mailing list