Bug report #1190
GRASS modules: v.out.ogr wrong for PostGIS
|Affected QGIS version:||Regression?:||No|
|Operating System:||All||Easy fix?:||No|
|Pull Request or Patch supplied:||Resolution:||fixed|
|Crashes QGIS or corrupts data:||Copied to github as #:||11250|
the module v.out.ogr does not work for exporting data to PostGIS, as the module misses the crucial parameters (dbname etc.) for this format.
#1 Updated by Markus Neteler almost 13 years ago
The problem is not clear to me, on cmd line one has to enter:
v.out.ogr input=polygons type=area \\ dsn="PG:host=localhost dbname=postgis user=postgres" \\ olayer=polymap format=PostgreSQL
Is it impossible to define dsn like that or just annoying? If the latter, could different fields be defined and composed on the fly to one dsn string?
#3 Updated by cgsbob - over 12 years ago
Replying to [comment:2 rblazek]:
Fixed in revision 10899. Added new script + qgis module with separate fields for each db connection parameter.
Work sponsored by http://www.faunalia.it
I just tried those two scripts using QGIS 1.2 w/ GRASS 6.5.svn. I get a error message:
Traceback (most recent call last): File "/home/bobm/usr/share/qgis/grass/scripts/qgis.v.out.ogr.pg2.py", line 137, in <module> options, flags = grass.parser() [[AttributeError]]: 'module' object has no attribute 'parser'
I did a little check and found that this errors is related to a reorganization of grass.py (see [http://trac.osgeo.org/grass/changeset/37447]). I'm attaching a patch that seems to fix this problem.
Btw, I wasn't sure if I should reopen this ticket or submit a new one?