<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr">Hi,</div><div dir="ltr">Hints of answers below...</div><div dir="ltr"><br>Le 4 févr. 2019 à 02:42, Reginald <<a href="mailto:Reginald.Carlier@ingelmunster.be">Reginald.Carlier@ingelmunster.be</a>> a écrit :<br><br></div><blockquote type="cite"><div dir="ltr"><span>Hello list,</span><br><span></span><br><span>I am running QGIS 3.4 on windows 7 and I have a bat file that uses ogr2ogr</span><br><span>to get a layer of points from a WFS service. The bat file works when I run</span><br><span>it in the OSGeo4W shell but not if I run it in the windows cmd shell. Then</span><br><span>it complains about not finding the SRS.</span><br></div></blockquote><div><br></div><div>This is normal. The OSGEO4W shell prepares the environment path to basically tell the shell where to find all the various softwares. You can manually set up this path but you can just use the OSGeo4w shell. More on this here concerning temporary path for a shell. <a href="https://stackoverflow.com/questions/6832496/command-prompt-how-to-add-a-set-path-only-for-that-batch-file-executing">https://stackoverflow.com/questions/6832496/command-prompt-how-to-add-a-set-path-only-for-that-batch-file-executing</a></div><div><br></div><br><blockquote type="cite"><div dir="ltr"><span>Now I want to make a model to fetch the points and to do an intersection</span><br><span>with the polygon of an area.</span><br><span>The model also needs to style the points.</span><br><span>Doing the intersection and the styling can be done in the model.</span><br><span>My question is if I can run a bat file in the osgeo4W shell from within a</span><br><span>model?</span><br></div></blockquote><div><br></div>This is where I am lost. Are you using the QGIS processing graphical modeller or are you trying to do this from a dos batch file? If you are trying to do this from the batch file, I would look are the link below are try working with the processing modeller. Personally, I would make a python script instead of trying to do this with a dos .bat file if this is the case. Keep in mind that QGIS 2 and QGIS 3 use different versions of python so most tutorials on the web are probably made for QGIS 2.<br><div><br></div><a href="http://www.qgistutorials.com/en/docs/processing_graphical_modeler.html">http://www.qgistutorials.com/en/docs/processing_graphical_modeler.html</a><div><br></div><div>QGIS and python.</div><div><br></div><div><a href="https://www.qgistutorials.com/en/docs/getting_started_with_pyqgis.html">https://www.qgistutorials.com/en/docs/getting_started_with_pyqgis.html</a><br><div><br></div><div>Nicolas<br><blockquote type="cite"><div dir="ltr"><span></span><br><span>Regards,</span><br><span></span><br><span></span><br><span></span><br><span>--</span><br><span>Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html">http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html</a></span><br><span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a></span><br><span>List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span><br><span>Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></span></div></blockquote></div></div></body></html>