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?
Asked
Active
Viewed 317 times
1 Answers
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()
JimT
- 2,383
- 2
- 10
- 22