<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry I posted the wrong code in the previous post it should read<div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span style="color: rgb(192, 45, 157); ">import</span> sextante <span style="color: rgb(192, 45, 157); ">as</span> st</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; ">    <br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">densify = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:densifygeometries"</span>),Polygon,Detail,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">extractNodes = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:extractnodes"</span>,densify,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">voronoi = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:voronoipolygons"</span>,extractNodes,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">voronoi_lines = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:polygonstolines"</span>,voronoi,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">polygon_lines = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:polygonstolines"</span>,Polygon,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">clip = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:clip"</span>,Polygon,voronoi_lines,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">outData = st.runalg(<span style="color: rgb(214, 44, 36); ">"qgis:difference"</span>,clip,polygon_lines,<span style="color: rgb(192, 45, 157); ">None</span>)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">The error I receive follows:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><p style="font-family: 'Times New Roman'; font-size: medium; ">Oooops! SEXTANTE could not open the following output layers</p><ul style="font-family: 'Times New Roman'; font-size: medium; "><li>Output:<font size="3" face="Courier New" color="ff0000">/var/folders/jk/2kj1gpl15d1747rkn7sl_mkh0000gn/T/sextante/scriptexamplescript521deca6725e4911ab0ecebf719f4bdf.shp</font></li></ul><p style="font-family: 'Times New Roman'; font-size: medium; ">The above files could not be opened, which probably indicates that they were not correctly produced by the executed algorithm</p><p style="font-family: 'Times New Roman'; font-size: medium; ">Checking the log information might help you see why those layers were not created as expected</p><div>Cheers,</div><div>Bjorn</div><div><br></div></div><div><div>On Jul 27, 2013, at 13:29 PM, <a href="mailto:bjorn.burr.nyberg@gmail.com">bjorn.burr.nyberg@gmail.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hej Everyone,<br>New to the mailing list here... and I am having some trouble writing a<br>script that I was hoping someone could lend me a hand with. Mainly this is a<br>script I use to get centerline's of a polygon that I used in ArcGIS before<br>and I want to adapt it to work in QGIS. Anyways there are a sequence of<br>algorithms from qgis that I want to use in memory before getting the final<br>output as a series of points (which then need to be processed further)<br>however chaining these algorithms simply fails after the first one where the<br>output is simply not being created for the next step to process.<br><br>Here is a snippet of that code - any help would be appreciated!<br>Cheers,<br>Bjorn<br><br>#Definition of inputs and outputs<br>#==================================<br>##[Example scripts]=group<br>##Polygon=vector<br>##Detail=number 1000<br>##Scale=boolean True<br>##All_Paths=boolean False<br>##Output=output vector<br><br>#Algorithm body<br>#==================================<br>import sextante as st<br><br>densify = st.runalg("qgis:densifygeometries"),inFC,Detail,None)<br>extractNodes = st.runalg("qgis:extractnodes",densify,None)<br>voronoi = st.runalg("qgis:voronoipolygons",extractNodes,None)<br>voronoi_lines = st.runalg("qgis:polygonstolines",voronoi,None)<br>polygon_lines = st.runalg("qgis:polygonstolines",inFC,None)<br>clip = st.runalg("qgis:clip",inFC,voronoi_lines,None)<br>out = st.runalg("qgis:difference",clip,polygon_lines,None)<br><br>layer = st.getobject(out)<br>features: = st.getfeatures(layer)<br>Points = []<br>for feature in features:<br>    Points.append(features.geometry().asMultiPolyline())<br><br><br><br>--<br>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Chain-Temporary-Algorithms-tp5069057.html">http://osgeo-org.1560.x6.nabble.com/Chain-Temporary-Algorithms-tp5069057.html</a><br>Sent from the Quantum GIS - Developer mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>Qgis-developer mailing list<br><a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/qgis-developer<br></div></blockquote></div><br></div></body></html>