5 import os
,time
,string
,sys
,Gnuplot
,re
6 from pywps
.Process
.Process
import WPSProcess
8 class Process(WPSProcess
):
10 WPSProcess
.__init
__(self
,
13 abstract
="Paths on the Trentino SAT network",
15 storeSupported
= True,
16 statusSupported
= True,
18 self
.los
= self
.addComplexOutput(identifier
= "los",
19 title
= "Resulting output map",
20 formats
= [{"mimeType":"text/xml"}])
23 self
.cmd("g.mapset mapset=nico")
24 #:browse confirm saveas
25 self
.cmd("g.region -d")
26 #self.cmd("g.region vect=allgpx")
27 self
.status
.set(msg
="Region setted", percentDone
=20)
28 self
.cmd("v.out.ogr format=GML input=allgpx dsn=out.xml olayer=path.xml")
29 self
.status
.set(msg
="Results saved", percentDone
=80)
30 if "out.xml" in os
.listdir(os
.curdir
):
31 self
.los
.setValue("out.xml")
34 return "Output file not created"