Biodiversity Analyst
Institut Macaulay Land Use Research Institute
Supérieur d’ Craigiebuckler
Informatique, de Aberdeen
Modélisation et de leursAB15 8QH
ApplicationsUK
Complexe Universitaire des Cézeaux
BP125
63173 Aubière CEDEX
ANNEXE
Documentation on the use of the biodiversity Database and PRIM PRO program
Responsable du projet: Alessandro GIMONA
Responsable ISIMA: Vincent BARRA
Présenté par: Nicolas MATRAND Guilhem VORS
Octobre 2007 – Avril 2008
Table des annexes
A Presentation and installation of the Biodiversity DatabaseI
A.1 installation and connection ...... I
A.2 general interface ...... II
B How to use BDB ...... III
B.1 creation and suppression function ...... III
B.2 join function ...... IV
B.3 exportation function, conditioned exportation ...... V
B.3.1 Exportation in’.csv’ file ...... V
B.3.2 Exportation in’.long_xyz’ file ...... VI
B.3.3 Exportation with a Query ...... VII
C Documentation of Biodiversity Analyst : Interface with PRIMPRO2.exe . VIII
C.1 Using Prim Pro Program ...... VIII
C.2 Buttons ...... IX
C.3 Output ...... X
C.4 Input parameters ...... X
A Presentation and connection of the Biodiversity Database
1 Installation and connection
The installation and the connection to the Biodiversity Database (BDB) are not difficult, but there are some things to know.
First step, you need to download a Database server, for example MySQL (which you wan download at Then you put all the files of the bin folder of mysql in the bin folder of Biodiversity Analyst (BA).
Then you launch this icon: , and then you follow these instruction :
First, the setup type : choose complete
MySQL.com Sign-up : choose Skip Sign-up
MySQL Server Instance Configuration : choose Detailed Configuration
choose Developer machine (I think here is the change)
choose Multifunctional Database
choose Decision Support (DSS)/OLAP
ok, next
choose Standard Character Set
ok, next
root password: root
and after next etc...
If the execution failed in Start service, follow these steps :
First, Mysql Server Instance configuration : choose remove instance
Then, in the control panels, in add or remove program, click on Mysql Server 5.0 and click on remove
(Mysql is now remove)
Delete the directory C:\Program Files\MySQL
Then reboot the computer
Re-install Mysql by following Big Step 1
When you have no error, just click on the connection button in the general interface of BDB and you are connected.
2 General interface
This is the interface when you click on file -> manage database. The left part of the interface is for the creation, suppression, modification and view of the table of the BDB. The right part is for the exportation in file, with condition that you write in the Query Box. The message Box show if what you’ve done had worked, and prints the message error otherwise. The number of record in the upper-left is set to the number of row of the created table.
Fig A.1 General interface with BDB
B How to use BDB
1 Creation and suppression function :
To create a table from a .csv or a .txt file, click on the creation button and select the file. If it’s a .csv file, you must have column separated by a comma, otherwise it must be separated by a tabulation.
If you want to see the table, check the See Table button.
Fig B.1 View Table
2 Join function :
If you want to join tables, you must have a field in each table that is equal. Then you select the join button and it creates the table (called “name_joined”). If you don’t have the same field, mysql will advise you that you got an error in your mysql syntax, and will not create the table.
Fig B.2 Join two tables
3 Exportation function and conditioned request:
3.1 Exportation in ‘.csv’:
If you want to export your file in a .csv format, you just have to click on the right button after selected the table you want to export, and then select the output directory, and your “tablename.csv” file is created in this directory. The export using doesn’t matter here.
The exportation in .csv file is just the writing of the table in a file, it’s used if you want to put this file in input of another function for example.
Fig B.3 Export ‘.csv’ file
3.2 Exportation in ‘.long_xyz’
The exportation in this format is a bit more complicated. Basically the exportation does the following steps:
- from the original table, it create the first line depending on the exportation using you choose (if you select family, then the first line will be QDS, X,Y,family_name1,family_name2 …)
- all the line from the second to the end will be created as follows:
-first column QDS (number of line)
-second X (float or int) positive
-third Y (float or int) positive
-all the column following those 3 equal to 0 or 1, depending if the species/family/genus has been saw in the X, Y area.
Fig B.4 Export ‘.long_xyz’ file
3.3 Exportation with a query:
When you export a file, you can also had a query to BDB in order to get only the row where TAG1 < 1000.000 for example. To do this, you just have to select the table you want to export, write in the query box “TAG1 < 1000.000”, and click on the LONG_xyz button (it doesn’t work with the .csv exportation.) and you get the file.
Be aware that to have a valid query, you must write a field name in your query which is in the table you have selected, otherwise you will have an sql error message.
You can add query with AND and OR button, so you can get the table you want.
Fig B.5 Export ‘.long_xyz’ file with a query
C Documentation of Biodiversity Analyst : Interface with PRIMPRO2.exe
1 Using Prim Pro Program
Do RandomisationAnalisis-> PrimPro Program. Here is the interface that we can see on figure A.1:
Fig. C.1 PrimPro Program
2 Buttons:
- Browse (files input): To select the files to use. With the first Browse you must select files with the .DAT extension.
- Browse (Species files): To select the files with the extension .PAR. These files have to contain the first line before every grid. These files have to have this form:
Fig C.2 Example of Spname.PAR
- Browse (Space files): To select the files with the extension .PAR. These files have to have this form:
Fig.C.3 Exemple of space files ‘.PAR’
Input files and PRIMPRO2.exe must be in the same directory, because PRIMPRO2.exe doesn't read the ways of directories.
3Outputs:
Only the name of the directory is useful to create results files. Once it's done, results files will be named res1.txt, res2.txt and res3.txt. However the executable PRIMPRO2.exe must be in the same directory, because this executable create result files in the same directory where it was.
4 Input parameters:
Input parameters are placed between input files and output files. In text zones you can put into only numerical values. If you press a key which is not a numerical values nothing will be write in the text zone.
On the left there are two radio button group, once to explain what kind of grid PRIMPRO.exe use, and a other one to chose the randomisation. If you put into a text zone a numerical values above the maximal value, this message will come.
Fig C.4 Error: to high number
Nicolas MATRAND & Guilhem VORS