[Qgis-user] QGIS/ArcGIS python interference

Torsten Lange torsten.lange at mail.de
Thu Apr 9 14:33:44 PDT 2015


Hi Luigi,

I think I got the idea of what you meant. Actually, in the very beginning befor using the QGIS plugin functionality I wrote a pure PyQT-Dialog which I called using the QGIS processing script connector. With the inputs I fed a simple python script, which however didn't applied any ArcGis-Python module. Ok, it might be worth, to go that step back to this more simple approach.

Thanks much for your thoughts!
Torsten

 Am 09-Apr-2015 22:21:54 +0200 schrieb luipir at gmail.com: 
hi Torsten

 I had a similar problem to run an external water model (of a client)
 requiring a different set of python libs and linked libraries... I use
 python subprocess command, that is more or less the same mechanism
 applied by Processing Toolbox to run some external command providers.
 In this way you can communicate with your application using stdin,
 stdout and stderr... and receive exit codes.
 More complex interprocess communication can be obtained parsing
 stdout, or piping on common files... or a lot of other mechanism.

 a good support by qgis can be obtained creating a Processing script
 that execute subprocess command of your application. This script can
 manage processing progressbar basing on result read from stdout.

 I hope this can help you

 regards, Luigi Pirelli

 **************************************************************************************************
 * LinkedIn: https://www.linkedin.com/in/luigipirelli
 * Elance: https://www.elance.com/s/edit/luigipirelli/
 * GitHub: https://github.com/luipir
 * Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
 * Mastering QGIS:
https://www.packtpub.com/application-development/mastering-qgis
 **************************************************************************************************

 On 9 April 2015 at 22:02, Torsten Lange  wrote:
 > Hello qgis-user fellows,
 >
 > I would like to pose a more general question here, because obviously my
 > previous mails seemed just too OT ;)
 >
 > Due to some severe problems when coincidently accessing/editing spatial data
 > (not the same data but in the same directory) with ArcGIS on remote (samba)
 > drives - which our IT sofar never couldn't really explain - I started using
 > QGIS to easy the situation for my colleagues and me.
 >
 > However, beside the sporty challenge for me to fastly adopt the productive
 > operation of the QGIS including some still apparent drawbacks I sometimes
 > just depend on functionallity that only ArcGIS provides. In our geological
 > driven case thats for sure the very sophisticated "Spline with Barrier"
 > function. We currently changed our workflow that previously based on a
 > ArcView 3.x plugin, but which caused more and more trouble since
 > Windows7/64bit rules the hardware in the department.
 >
 > At one time I agreed to program a workflow that does all the necessary
 > preprocessing and final gridding depending on quite a number of input
 > parameters. Of course, I had no plan to cut me off as a (quite happy) QGIS
 > user who by using QGIS in fact did an altruistic favour to the colleagues
 > but esp. to the IT dep. ;)
 >
 > So, I wrote a general python script using arcpy/spatial analyst... that
 > accepts the input parameters as dictionary provided on command line or using
 > a seperate python script defining a class holding the input parameter. I
 > created a QGIS dialog plugin that collects all those parameters in an
 > appropriate manner in the form of:
 >
 > start /i cmd /c python myWorkflow.py -d "configDict = {'inputIsoLineFile':
 > r"U:\... etc etc}"
 >
 > I also learned I had to copy the xxx64bit.pth-File (don't remember the
 > correct name right now) from the ArcGIS-Python directory to the QGIS python
 > site-packages directory.
 >
 > Now, beside some error messages (some gdal dll in QGIS....etc are not real
 > 32bit.... or so), which seem to have no real impact on the run itself, I got
 > my first grids, which I sent to a post processing befor leaving the desktop.
 >
 >
 > This to getting work cost me a lot of extra time. I mean, I did this "en
 > passent" while fullfilling my main work. So I'm really interested in what
 > would be your approach to that! In fact to me it seems much more easy if I
 > could start a cmd session that has no inherits from what so ever and comes
 > with the environment as if I would start it from the Windows menu.
 >
 > Sorry for the long description, appreciating some thoughts of you!
 > Torsten
 > _______________________________________________
 > Qgis-user mailing list
 > Qgis-user at lists.osgeo.org
 > http://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20150409/37d02742/attachment.html>


More information about the Qgis-user mailing list