[GRASS-dev] [GRASS GIS] #495: v.out.ascii: warning message when layer=2

#495: v.out.ascii: warning message when layer=2
--------------------------------+-------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: Vector | Version: 6.4.0 RCs
Keywords: v.out.ascii, layer | Platform: Linux
      Cpu: x86-32 |
--------------------------------+-------------------------------------------
Hi,

when trying to do v.out.ascii for layer=2 I get tons of
{{{
WARNING: Feature has more categories. Only first category (1) is exported.
}}}

One for every single point. It's rather annoying to see so many and I'm
not really clear about what it actually means. Will only layer 1 be
exported even when I specifically asked for layer 2?

example:
{{{
#spearfish
v.in.ascii out=surv_track format=standard -n << EOF
L 3 1
  608119 4915294
  606085 4919979
  599926 4920470
  1 1
EOF

# v.to.points creates 2 layers
v.to.points in=surv_track out=surv_pts dmax=100

v.out.ascii surv_pts layer=2
[noise]
}}}

(in my real case I've added a new column to layer 2 and use the new
v.out.ascii columns= to export those values)

?

thanks,
Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/495&gt;
GRASS GIS <http://grass.osgeo.org>

#495: v.out.ascii: layer=2 column output wrong
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: critical | Milestone: 6.4.0
Component: Vector | Version: 6.4.0 RCs
Resolution: | Keywords: v.out.ascii, layer
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by hamish):

  * priority: major => critical
  * summary: v.out.ascii: warning message when layer=2 => v.out.ascii:
              layer=2 column output wrong

Comment:

Ah, I (think I) see what the warning means,

{{{
v.out.ascii tmp_point_9669 layer=2 column=width 2> /dev/null | head
608119|4915294|1|594.62231400
608079.22533499|4915385.61470284|1|594.62231400
608039.45066998|4915477.22940567|1|594.62231400
607999.67600497|4915568.84410851|1|594.62231400
607959.90133996|4915660.45881135|1|594.62231400
607920.12667495|4915752.07351418|1|594.62231400
607880.35200994|4915843.68821702|1|594.62231400
607840.57734493|4915935.30291985|1|594.62231400
607800.80267992|4916026.91762269|1|594.62231400
607761.02801492|4916118.53232553|1|594.62231400
}}}

it means that it is mixing up cats from layer=1 and layer=2.

layer=1 cat is always 1 in this map (orig cat of v.to.points input line)
and so it retrieves the layer=2 cat=1 value (594.622) for all points :frowning:
instead of by layer 2 cats:

{{{
v.db.select tmp_point_9669 layer=2 | head
cat|lcat|along|width
1|1|0|594.622314
2|1|99.876312|550.689599
3|1|199.752625|460.65393
4|1|299.628937|410.969189
5|1|399.505249|454.671559
6|1|499.381561|457.451076
7|1|599.257874|472.407835
8|1|699.134186|562.410718
9|1|799.010498|597.98247
}}}

changing title of bug & increasing severity.

Hamish

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/495#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#495: v.out.ascii: layer=2 column output wrong
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: assigned
  Priority: critical | Milestone: 6.4.0
Component: Vector | Version: 6.4.0 RCs
Resolution: | Keywords: v.out.ascii, layer
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

Hopefully fixed in r35918 (devbr6), r35936 (trunk) and r35937 (relbr64).

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/495#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#495: v.out.ascii: layer=2 column output wrong
-----------------------+----------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.0
Component: Vector | Version: 6.4.0 RCs
Resolution: fixed | Keywords: v.out.ascii, layer
  Platform: Linux | Cpu: x86-32
-----------------------+----------------------------------------------------
Changes (by hamish):

  * status: assigned => closed
  * resolution: => fixed

Comment:

seems to work now, thanks.

Hamish

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/495#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>