Bug report #1190
GRASS modules: v.out.ogr wrong for PostGIS
| Status: | Closed | ||
|---|---|---|---|
| Priority: | Low | ||
| Assignee: | |||
| Category: | GRASS | ||
| 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 |
Description
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.
History
#1
Updated by Markus Neteler almost 17 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?
#2
Updated by Redmine Admin over 16 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Fixed in revision 10899. Added new script + qgis module with separate fields for each db connection parameter.
Work sponsored by http://www.faunalia.it
Radim
#3
Updated by cgsbob - over 16 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
Radim
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?
#4
Updated by Redmine Admin over 16 years ago
I have commited you patch in revision 10936.
Non need to open a new ticket I believe.
Thanks.
Radim
