Installing HydroPlatform
To test it just once
Login, download and unzip the latest: "hydroplatform-0.XX-exe.zip" file (hydroplatform executable for windows) then double-click on file: 'hydroplatform.exe' to run HydroPlatform
Developer install (if you want to benefit from regular updates)
Download the 2 required files (from Download tab - on the far right of TRAC menu; you must be logged in):
- test.zip (40 Mb) - this file containing all the libraries rarely changes
- hydroplatform-0.1.zip (200 Kb) - this file changes every time the HydroPlatform source code changes.
Install steps:
- Unzip test.zip into a folder, for example: C:\hp\test
- Unzip hydroplatform-0.1.zip which produces a folder: 'hydroplatform-0.1'; copy that folder into the C:\hp\test\ folder
- Double-click on C:\hp\test\run_hp.bat
To make the debugging phase more efficient (you only have to download a small 200 Kb file to update HydroPlatform), we'll keep working with the current install procedure. For the public beta release we'll have an install file (installHydroPlatform.exe).
Starting a new session
Connecting to a database
First you must connect to a database (a new or existing one). Click on the "Project"->"Connect" menu and select where your existing database is (.db file). If you're creating a new session, just click 'OK' and a new hydroplatform.db file is created. The database can be stored on your computer or online.
Creating a project
A project contains networks and object type definitions. You must create a project in order to create networks. Or you can open an existing project.
To create a new project, use the "Project" -> "Create" menu. After having provided a project name, you will be able to edit the project properties :
- General info
- Name : the name of the project
- Limit string length to 8 : sometimes you want to limit all the names (network, nodes, links, etc.) to a maximum of 8 caracters
- Projection : if you don't plan to overlay your networks with GIS files, leave this to "Undefined". Or else choose a projection. ! If you define a projection you must use a background GIS file.
- Time horizon info
- From : starting date of the period covered by your project
- To : ending date of the period covered by your project
- Time step : time step used in your project
- Units info : select the units that will be available in your project.
Creating 'Object Types'
Design the 'Object Types' (nodes or links) your network model requires. Go the the "Objects"->"Object Type Editor" menu. Each object can have parameter, table, or time-series data fields (or also references to other objects).
Creating or loading a network
With your project open and your 'Object Types' created, you can now build a network by connecting different instances of object types. Use "Network"->"Save As" to save different versions of the network (e.g. with different parameters or topologies).
Object Editor
Entering values into tables, time-series
Use 'Paste' button to paste from the clipboard (e.g. Excel).
Adding rows to a table
Objects with table fields are initialized with empty tables. To add rows manually, you need to be on the last row of the table and press the PAGE_DOWN key. This will add a new empty row to the table.
Loading external files
Loading non-georeferenced images
You need to create a world file by hand to make your image supported by Thuban. To to that, follow the following :
From http://mapserver.org/input/raster.html#georeference-with-world-files
World files are a simple mechanism for associating georeferencing (world coordinates) information with raster files. ESRI was the first company to propagate the use of world files, and they often used with TIFF instead of embedding georeferencing information in the file itself.
The world file contents look like the following. The first coefficient is the X pixel size. The second and third are rotational/shear coefficients (and should normally be 0.0). The fourth is the Y pixel size, normally negative indicating that Y decreases as you move down from the top left origin. The final two values are the X and Y location of the center of the top left pixel. This example is for an image with a 2m x 2m pixel size, and a top left origin at (356800E, 5767999N):
2 0.0000000000 0.0000000000 -2 356800.00 5767999.00
The name of the world file is based on the file it relates to. For instance, the world file for aerial.tif might be aerial.tfw. Conventions vary for appropriate endings. Jpg requires a .jpw file.
Creating the appropriate world file is a simple workaround to make your image be usable within Thuban.
Manually modifying an hp database directly
- Very advanced users only
HP is database agnostic. It relies on a library called sqlalchemy that does the link with any supported database (mysql, postgres, oracle, etc.). By default, if you do not specify a specific database connection when starting HP, it uses a SQLlite wich is a database system relying on a file (kind of like Access).
Depending on what you need to do, you can either use a frontend for SQLlite to edit the content of the db OR use a python script to transfer information from one db to the other (e.g. transfering the dataset from sqllite to mysql).
You need to have a database driver for the db you want to use. Mysql have the MySQLdb driver available for Python.
