[GRASS-dev] Different v.mkgrid table output depending on grid size

Michel Wortmann wortmann at pik-potsdam.de
Fri Nov 27 14:14:00 PST 2015


Hi Devs,
I have been using the v.mkgrid command extensively recently and noticed that the tables of the output differ depending on the grid size. Apart from not having the columns rown and coln, larger grids’ row column counts from bottom to top rather than top to bottom as with smaller grids. I have dug in the code and found the appropriate lines in the main.c:




447	                    if (grid_info.num_rows < 27 && grid_info.num_cols < 27) {
448	                        sprintf(buf, "( %d, %d, %d, '%c', '%c' )",
449	                              attCount + 1, grid_info.num_rows - i,
450	                              j + 1, 'A' + grid_info.num_rows - i - 1, 'A' + j);
451	                    }
452	                    else {
453	                        sprintf(buf, "( %d, %d, %d )",
454	                                attCount + 1, i + 1, j + 1);





Has this a good reason or is this a bug? I guess inconsistent output is undesirable here.
Best,
Michel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151127/d164dc94/attachment.html>


More information about the grass-dev mailing list