[Qgis-user] QGIS/ArcGIS python interference

Torsten Lange torsten.lange at mail.de
Thu Apr 9 14:54:48 PDT 2015


Hi Nathan,

Infact I just want to create the input parameter set, which the script needs for the preprocessing and gridding workflow. The plan was to start a cmd session that runs python with the required script and arguments - as if I would run cmd from the menu and then type python myWorkflow.py -d "configDict = {key:val, key:val etc}". The solution I use now is creating a batch file with the respective call and run it. So I have something to check if it doesn't work.

The only problem that comes with this approach (which I thought to be simple to work) is, that I cannot run this juvenile cmd session. All of these sessions what ever I tried inherited somehow python environment of QGIS. Actually I googled a lot, and there might be some work arounds - but as I wrote - I have only a very limited time to play around without interfering with the work I'm actually paid for ;) I would be glad to check for the necessary things later at home, but I have no ArcGIS to simulate realistc conditions ;)

Torsten

 Am 09-Apr-2015 22:34:13 +0200 schrieb madmanwoo at gmail.com: 

Hey Torsten, 

What seems to the issue? You are trying to run a arcpy script from inside qgis? 

Nathan 
 On Fri, 10 Apr 2015 6:02 am 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/1d103ebe/attachment.html>


More information about the Qgis-user mailing list