1

I would like to use qgis similarly as a chart plotter for dynamic data that are created by a Fortran code (being basically a ship simulator.) I have two questions: how do I integrate Fortran into qgis the best way and how can I dynamically update the plot of the position?

1 Answer 1

2

Two questions here. I'll attempt both in turn:

1) Integrating Fortran into QGIS. To a certain extent this depends on your requirements, however I would recommend wrapping the Fortran in Python to then be able to update the QGIS plot. To call the fortran from python either use system calls (os.system) or pyfortran (caveat - not tested)

2) It is possible to dynamically update QGIS using python scripting. to do this use a the pyqt function:

from PyQt4.QtCore import QTimer

Put something like this together :

def updatePlot():
    #update qgis here

    #call function to get fortran results
    QTimer.singleShot(50,getData)

def getData():
    #get data here

    #call function to update plot
    QTimer.singleShot(50,updatePlot)

getData()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.