[GRASS-user] v.mkhexgrid bug

Hi, I get the following bug with v.mkhexgrid:

(Fri Sep 2 10:06:01 2011)
v.mkhexgrid output=grid regionname=ecosistemas@InnovaTurismo sidelength=500
Creating GRASS ascii file with hexagons
Importing GRASS ascii file
Construyendo topología para el mapa vectorial …
Registrando elementos…
42042 Elementos registrados.
78078 vertices registrados.
Construyendo áreas.
0 áreas construidas.
1 Islas construidas.
Adjuntando islas…
Adjuntando centróides…
Número de nodos: 18332.
Número de primitivas: 42042.
Número de puntos: 0.
Número de líneas: 0.
Número de contornos: 36036.
Número de centroides (baricentros): 6006.
Número de áreas: 0.
Número de íslas: 1.
Número de contornos incorrectos: 36036.
Número de centroides (baricentros) fuera del área: 6006.
v.in.ascii completo.
Cleaning and building topology
Importing and linking attributes
ERROR: Input table <tempgrid4328.csv> not found or not readable
GRASS_INFO_WARNING(4352,3): Nombre de columna cambiado: ‘cat’ → ‘cat_’
ERROR: An error occured renaming attribute table.

ALTER TABLE .tempgrid4328 RENAME TO grid;
(Fri Sep 2 10:06:08 2011) Comando finalizado. (7 sec)

It is possible to fix this?

Thanks!

Andrés

On Fri, Sep 2, 2011 at 3:21 PM, Andrés Silva <andres.silva.m@gmail.com> wrote:

Hi, I get the following bug with v.mkhexgrid:

(Fri Sep 2 10:06:01 2011)

v.mkhexgrid output=grid regionname=ecosistemas@InnovaTurismo sidelength=500

Creating GRASS ascii file with hexagons

...

v.in.ascii completo.
Cleaning and building topology
Importing and linking attributes
ERROR: Input table <tempgrid4328.csv> not found or not readable
GRASS_INFO_WARNING(4352,3): Nombre de columna cambiado: 'cat' -> 'cat_'
ERROR: An error occured renaming attribute table.
ALTER TABLE .tempgrid4328 RENAME TO grid;
(Fri Sep 2 10:06:08 2011) Comando finalizado. (7 sec)

It is possible to fix this?

Likely yes. But could you please post an example using
the North Carolina sample dataset? Then we could try
easily.

Markus

On Fri, Sep 9, 2011 at 6:17 AM, Andrés Silva <andres.silva.m@gmail.com> wrote:

Of course. I get the same bug:
(Fri Sep 9 01:13:27 2011)

v.mkhexgrid output=hexgrid regionname=central_10m@PERMANENT sidelength=500

Creating GRASS ascii file with hexagons
Importing GRASS ascii file
Construyendo topología para el mapa vectorial <tempgrid2543>...
Registrando elementos...
1925 Elementos registrados.
3575 vertices registrados.
Construyendo áreas.
0 áreas construidas.
1 Islas construidas.
Adjuntando islas...
Adjuntando centróides...
Número de nodos: 891.
Número de primitivas: 1925.
Número de puntos: 0.
Número de líneas: 0.
Número de contornos: 1650.
Número de centroides (baricentros): 275.
Número de áreas: 0.
Número de íslas: 1.
Número de contornos incorrectos: 1650.
Número de centroides (baricentros) fuera del área: 275.
v.in.ascii completo.
Cleaning and building topology
Importing and linking attributes
GRASS_INFO_WARNING(2564,3): Nombre de columna cambiado: 'cat' -> 'cat_'
ERROR: Input table <tempgrid2543.csv> not found or not readable

-> the table name should be without .csv extension, so the
v.mkhexgrid script needs a fix.

ERROR: An error occured renaming attribute table.
ALTER TABLE .tempgrid2543 RENAME TO hexgrid;
(Fri Sep 9 01:13:28 2011) Comando finalizado. (1 sec)

Markus

On Sun, Sep 11, 2011 at 5:07 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Sep 9, 2011 at 6:17 AM, Andrés Silva <andres.silva.m@gmail.com> wrote:

Of course. I get the same bug:
(Fri Sep 9 01:13:27 2011)

v.mkhexgrid output=hexgrid regionname=central_10m@PERMANENT sidelength=500

Creating GRASS ascii file with hexagons
Importing GRASS ascii file
Construyendo topología para el mapa vectorial <tempgrid2543>...
Registrando elementos...
1925 Elementos registrados.
3575 vertices registrados.
Construyendo áreas.
0 áreas construidas.
1 Islas construidas.
Adjuntando islas...
Adjuntando centróides...
Número de nodos: 891.
Número de primitivas: 1925.
Número de puntos: 0.
Número de líneas: 0.
Número de contornos: 1650.
Número de centroides (baricentros): 275.
Número de áreas: 0.
Número de íslas: 1.
Número de contornos incorrectos: 1650.
Número de centroides (baricentros) fuera del área: 275.
v.in.ascii completo.
Cleaning and building topology
Importing and linking attributes
GRASS_INFO_WARNING(2564,3): Nombre de columna cambiado: 'cat' -> 'cat_'
ERROR: Input table <tempgrid2543.csv> not found or not readable

-> the table name should be without .csv extension, so the
v.mkhexgrid script needs a fix.

Trevor, the author, has identified it as db.in.ogr bug and implemented a
workaround using SQL. Please try the new version from GRASS-Addons-SVN
and report if it solves the problem.

Markus

(cc'ing list to let interested people know)

On Thu, Sep 15, 2011 at 5:24 AM, Andrés Silva <andres.silva.m@gmail.com> wrote:

Yes. I test the script and works perfectly. Thanks!

Andrés Silva Marambio

Excellent.

Markus