Sat, Sep 23 2006
14:43:56
|
|
Request created by guest
|
|
Subject: v.patch: -a(ppend) issues
Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 2006-09-23
$ v.patch -e -a input=map1 output=map2
Error: option <output>: <map2> exists.
Should v.patch in -a(ppend) mode automatically set the --ovewrite flag?
It kind-off works:
$ v.patch -e -a input=map1 output=map2 --o
But leaves the output vector in a somewhat strange state - it is OK for Grass
commands (v.digit, v.info -c) but QGIS (current SVN head) complains about it
that "No layers available in this map". After I v.build this vector, QGIS accepts
it.
v.build helps, but it shouldn't be required. v.patch should output a valid vector.
Or maybe this is QGIS fault?
What do you think Radim?
Maciek
|
|
Wed, Feb 21 2007
18:25:23
|
|
Taken by mlanda
|
|
Thu, Feb 22 2007
13:23:01
|
|
Mail sent by mlanda
|
|
I am not sure how to enable overwriting existing files. There should be no
code before calling G_parser(). So it seems there is no way how to enable
overwriting together with the -a flag.
I committed to CVS extended flag description
-a Append files to existing file (overwriting existing files must be
activated)
---
Can you reproduce the problem with topology using spearfish dataset? |
|
Thu, Feb 22 2007
19:54:32
|
|
Mail sent by msieczka
|
|
mlanda wrote (Thu, Feb 22 2007 13:23:01):
> I am not sure how to enable overwriting existing files. There should be no
> code before calling G_parser(). So it seems there is no way how to enable
> overwriting together with the -a flag.
>
> I committed to CVS extended flag description
>
> -a Append files to existing file (overwriting existing files must be
> activated)
That's some help, thanks!
> Can you reproduce the problem with topology using spearfish dataset?
Any location:
v.random map1 n=1
v.random map2 n=1
v.patch -a in=map1 out=map2 --o
Try opening map2 in QGIS - no layers available. However, you can display and
query it fine in GRASS.
v.info map2 doesn't report anything suspicious. However, running v.build map2
or opening it with v.digit, validates it for QGIS.
I wonder whether this is an issue with QGIS or v.patch.
Maciek
|
|
Wed, May 9 2007
21:29:19
|
|
Status changed to resolved by mneteler
|
|
Wed, May 9 2007
21:29:19
|
|
Mail sent by mneteler
|
|
If you try
v.db.select map2
ERROR: Database connection not defined
you see that there is no DB connection. Why? Because v.random
doesn't attach a table (use v.db.addtable for this).
The given v.patch command looks pretty unusual to me:
- append to an existing map where you have to specify "overwrite"??
Pretty counterintuitive!
I think that:
v.patch in=map1,map2 out=map3
is better and -a might go away.
The resulting map3 shows nicely in QGIS.
Closing,
Markus |
|
Wed, May 9 2007
22:06:52
|
|
Mail sent by msieczka
|
|
mneteler wrote (Wed, May 9 2007 21:29:19):
> If you try
>
> v.db.select map2
> ERROR: Database connection not defined
>
> you see that there is no DB connection. Why? Because v.random
> doesn't attach a table (use v.db.addtable for this).
Sorry but I don't get it. Why are you talking about a table? The "v.patch -a"
has nothing to do with it.
> The given v.patch command looks pretty unusual to me:
> - append to an existing map where you have to specify "overwrite"??
> Pretty counterintuitive!
Anyway, isn't that strange that the output of a valid command (according to
manual) is corrupted, so that GRASS can use it and QGIS can't, until v.build
is run on it?
I do realize that the command looks strange, but I thought this issue might be
and indicator of something wrong with v.patch.
> Closing,
Hmm.
Maciek
|
|
Wed, May 9 2007
22:17:19
|
|
Status changed to open by mneteler
|
|
Wed, May 9 2007
22:18:11
|
|
Mail sent by mneteler
|
|
OK, re-opened.
Indeed, the mysterious command sequence
v.random map1 n=1
v.random map2 n=1
v.patch -a in=map1 out=map2 --o
fails to be visualized in QGIS. But I don't get the idea of this sequence.
Markus |
|