Opened 15 years ago

Closed 15 years ago

#495 closed defect (fixed)

v.out.ascii: layer=2 column output wrong

Reported by: hamish Owned by: martinl
Priority: critical Milestone: 6.4.0
Component: Vector Version: 6.4.0 RCs
Keywords: v.out.ascii, layer Cc: grass-dev@…
CPU: x86-32 Platform: Linux

Description

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

Change History (3)

comment:1 by hamish, 15 years ago

Priority: majorcritical
Summary: v.out.ascii: warning message when layer=2v.out.ascii: layer=2 column output wrong

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 :( 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

comment:2 by martinl, 15 years ago

Cc: grass-dev@… added
Owner: changed from grass-dev@… to martinl
Status: newassigned

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

comment:3 by hamish, 15 years ago

Resolution: fixed
Status: assignedclosed

seems to work now, thanks.

Hamish

Note: See TracTickets for help on using tickets.