Opened 6 years ago

Last modified 5 years ago

#2310 new defect

r.in.xyz: zcol should not be compulsory when method=n

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Raster Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

In r.in.xyz, zcol is not necessary when method=n since all r.in.xyz does is count the points. However, by default the module defines z=3, which means that max_col becomes 3 and thus, for a simple file with only x and y coordinates, max_col > ntokens (line 679 of main.c) and the modules fails with

ERROR: Not enough data columns.

As it seems impossible to unset z, the only solution is to add a third, bogus, column to the input data.

The code seems pretty much designed with the idea that a zcol is present and it does not seem super-trivial enough for me do just change that.

I consider this a bug as it does seem counter-intuitive to require a zcol when a method such as n is available.

Change History (1)

comment:1 Changed 5 years ago by martinl

Milestone: 6.4.6
Note: See TracTickets for help on using tickets.