[GRASS-dev] ERROR grass addon v/r.surf.nnbathy using a lat/lon location

Luca Delucchi lucadeluge at gmail.com
Tue Mar 27 03:06:01 PDT 2018


On 26 March 2018 at 14:50, Roberto Marzocchi
<roberto.marzocchi at gmail.com> wrote:
> from grass.pygrass.vector import VectorTopo
> pnt = VectorTopo(options['input'])
> pnt.open(mode='r')
> test=pnt.read(1)
> if test.is2D==True:
>    fout.write(parts[0]+' '+parts[1]+' '+parts[3])
> else:
>    fout.write(parts[0]+' '+parts[1]+' '+parts[4])
>

it is better not use this way to concatenate string, but it is better
to use .format function

> Maybe not the best code.. but it seem to works..
>

-- 
ciao
Luca

www.lucadelu.org


More information about the grass-dev mailing list