[GRASS-user] loop import+merge
thibault.lemaitre at laposte.net
Tue Dec 14 08:12:10 EST 2010
I think there is a python problem when you write :
> while i<150:
In fact, transform i in a string would cause python to stop the loop
after the first iteration.
You may change this by another variable like j, like the following :
'v.in.ogr', flags="o", dsn="PG:dbname=schirpat",
Try it and tell us if it works, yeah ?
Le 14/12/2010 13:32, Patrick_schirmer a écrit :
> Still trying to create an import and merging of various files via a
> python-loop, as direct import is too heavy. I was searching on how to
> add a flag"-o" in python some days ago. Found out that it will work
> with 'flags="o"' if I put it directly behind the command, but am still
> not able to combine two flags (-o and --o).
> Even though, it seems that the loop I tried with "v.patch" will not
> work at all if input and output has the same filename. I would
> therefor have to create a dummy-file that will have to be a copied at
> the end of each iteration.
> Kind of:
> v.patch in=iterationresult,previousfinal out=temp
> v.copy in=temp out=previousfinal --overwrite
> Is there a command doing this "v.copy --overwrite"? Or does anyone
> have any other ideas on how to solve this task. It really is essential
> that I find any solution to this.
> Thanks for your help,
> ############script of loop###############
> while i<150:
> 'v.in.ogr', flags="o", dsn="PG:dbname=schirpat",
> layer="sc.av_liegensch", output="GR_av_liegensch_poly"+i,
> type="boundary,centroid", where="bfs="+i)
> grass-user mailing list
> grass-user at lists.osgeo.org
More information about the grass-user