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])

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


2018-03-26 12:21 GMT+02:00 Helmut Kudrnovsky <hel...@web.de>:

>
> >I have no idea of a possible python command.. I will do some >search..
> Have
> you any suggestion?
>
> Have a look into pygrass
>
> https://grass.osgeo.org/grass74/manuals/libpython/pygrass_vector.html
>
>
>
> -----
> best regards
> Helmut
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to