Commit 917e3b8f authored by STURM Peter's avatar STURM Peter
Browse files

Initial import from a previous repository

parents
######## Project organization ##########
* /src : Folder with sources codes
/docs : Latex of the documentation
/tranus_qgis_plugin : QGIS plugin
/standalone : TRANUS standalone report displayer
* /docs : Documentation
######### Useful commands ##############
* Fast webserver for testing the 3d render HTML
python -m SimpleHTTPServer
* Reload plugin in QGIS
qgis.utils.reloadPlugin('tranusprocessor')
######### From Patricio ##############
* Create a hardlink to a folder on Windows (maybe for pointing the QGIS plugin to this project)
mklink /J C:\Users\pinzaghi\.qgis2\python\plugins\tranusprocessor C:\Users\pinzaghi\INRIA\qgistranus\src\tranus_qgis_plugin
* Examples of usage for the standalone version
python tranus_reports.py thematic --render2d --logscale ..\..\..\misc\grenoble_maps\sectir2010.json ..\..\..\misc\sample_data\report_sectir2010.txt 0 4 3 0 10
* ONE TO MANY REPORT
python tranus_reports.py one2many --render3d_path one2many ..\..\..\misc\grenoble_maps\sectir2010.json ..\..\..\misc\sample_data\report_sectir2010.txt ..\..\..\misc\sample_data\relations_data_sectir2010.txt 0 4 0
python tranus_reports.py one2many --colors 255:0:0 0:255:0 0:0:255 --range 0:40 40:80 80:100 --render3d_path one2many ..\..\..\misc\grenoble_maps\sectir2010.json ..\..\..\misc\sample_data\report_sectir2010.txt ..\..\..\misc\sample_data\relations_data_sectir2010.txt 0 4 5
File added
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
The goal of this manual is to explain the installation and behavior of the QGIS plugin that enhances and clarifies the reports of TRANUS in a friendly manner. This software was developed using Python and ThreeJS.
\ No newline at end of file
\subsection{Developement}
The code structure is intended to be easily adaptable and easily creating new reports in the software.
\subsubsection{Structure}
The main folders can be found in \emph{qgistranus > src > tranus\_qgis\_plugin}:
\begin{itemize}
\item templates: Folder with the 3D render basic template used in each report. These are all the files you will need if you want to change the threeJS render.
\item standalone: Folder with the script for the standalone version of the software.
\item reports: Folder with the main classes for every report and his UI files for the interface.
\begin{itemize}
\item base\_report.py: Is the basic report class every other report must inherit from. Usually you don't have to edit this one.
\item thematic\_report.py: This is the class of the Thematic report.
\item thematic\_map\_report\_ui.py: This file is automatic generated by a script, you should not edit it by hand, the proper way to edit the interface of this report is editing the thematic\_map\_report.ui file and then running the UI script.
\end{itemize}
\item generate\_report.py: GenerateReportDialog Class, main dialog of the plugin.
\item generate\_report.ui: Is the QGIS plugin interface of the main window. This windows will launch any kind of report.
\item tranusreports.py: Python class mandatory for the plugin to work.
\item resources.py: File needed by the QGIS plugin.
\item interface.py: This is the Interface class used to communicate input parameters to the reports classes.
\item ui2py.bat: The script to (re)generate the UI interfaces, edit it if you add more reports and re run it every time you change any interface. You have to edit the file for the first time to change the environment variables PYUIC\_PATH and TARGET\_PATH to match your needs.
\end{itemize}
\subsubsection{Creating new reports}
The GenerateReportDialog will create an instance of the report selected by the user and try to display the main dialog of it. The class of this dialog must be named \emph{REPORTCLASS\_Dialog} where REPORTCLASS is the class name you used for the report, for example the thematic report class is called \emph{ThematicMapReport}. \\
Don't forget to add the new report to the global variable \emph{\_\_valid\_report\_types} in \emph{base\_report.py}, that's the way the main plugin window knows there is a new report to be showed.
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment