This project has moved. For the latest updates, please go here.

HydroDesktop Project Files

HydroDesktop uses a project to store downloaded time series, map symbology and geographic data.
The HydroDesktop project is a folder with three types of files: The project file (.dspx), the SQLite Database (.sqlite) files and the Shapefile (.shp) geographic data files.
The .dspx and the .sqlite files should have the same name, for example project1.dspx and project1.sqlite.

.dspx file format description

The .dspx file is a XML (eXtensible markup language) text file with information about the symbology of map layers (color, transparency, visibility, line width), names of geographic data files, map view extent, and map projection.

Project File Scenarios for testing

Following scenarios require detailed testing:
  1. start HydroDesktop
  2. Create new project
  3. Open Project
  4. Save Project
  5. Save Project As
  6. Change Database
  7. Create new database
  8. Close HydroDesktop
  9. Double-click on a *.hdprj file

0. At first run of a new version

  • If settings.xml does not exist, assume first run.
  • Create a settings.xml, with the default paths (which is where files are store in the install)
  • ASK user where to create a new project
    • should discourage writing to the "default" project
Expected behavior: User starts HydroDesktop. The file c:\\Program Files\CUAHSI HIS\HydroDesktop\projects\default\Default.dspx is opened.
Exceptional cases:
  • Default.hdprj file doesn't exist
  • DataRepository.sqlite database specified in the Default.hdprj file doesn't exist

1. Start HydroDesktop

  • read settings.xml
    • check version
    • Update if needed.
    • validate paths to informationversion.
Expected behavior: User starts HydroDesktop. The file c:\\Program Files\CUAHSI HIS\HydroDesktop\projects\default\Default.hdprj is opened.
Exceptional cases:
  • Default.hdprj file doesn't exist
    • (ask user to create a select project, or create a new project)
  • DataRepository.sqlite database specified in the Default.hdprj file doesn't exist

2. Create New Project

Expected behavior:
  1. User specifies the path of the new hdprj file.
  2. The new hdprj file is opened with default base map shapefiles.
  3. A new default SQLite database in the same folder as the new project is also created.
Exceptional cases:
  • The user doesn't have write permission for the specified folder

3. Open Project

Expected behavior:
  1. User specifies the hdprj project file to be opened.
    1. If changes have been made to the current project, a message 'Save Changes to Current Project?' is first shown.
  2. The map layers are loaded according to the hdprj file.
  3. The database connection is set according to the hdprj file and the theme layers are loaded.
  4. Plugins are activated or deactivated according to the hdprj file.
Exceptional cases:
  • The existing hdprj file is in incorrect format (changes have been made by external editor)
  • Some of the shapefiles specified in the hdprj file don't exist
  • The SQLite database specified in the hdprj file doesn't exist
  • The SQLite database is in incorrect format (some tables have been deleted)

4. Save Project

Expected behavior:
  1. The current path to the SQLite database, the names of currently active plugins and the map layer names and symbology are saved to the existing hdprj project file.

5. Save Project As

Expected behavior:
  1. user dialog appears to allow user to select a directory for the new project
  2. The current project file is saved to the user specified directory.
  3. The SQLite database is also copied to the user specified directory. The relative paths to the map layers and to the SQLite database path are updated.
  4. The move logic is missing from the code

6. Change Database

Expected behavior:
  1. user select database.
    1. where should this open up? in the project, or in the directory of the present database
    2. the file dialog should open up in the directory of the present database
  2. The database path is changed.
    1. warning if this is not in the same directory as the project
  3. Changed database Event is posted.
    1. All plugins and user controls are refreshed to use the modified database connection.
Exceptional cases:
  • The SQLite database file is in incorrect format.

7. Create New Database

Expected behavior:
  1. dialog appears, opened in same directory as project (or in database directory?)
    1. The user specifies the name of the new database.
  2. The new SQLite database is created by copying the dbTemplate.bin file.
Exceptional cases:
  • The user doesn't have write permission for the specified folder

8. Close HydroDesktop

Expected behavior:
If changes have been made to the current project, a message 'Save Changes to Current Project?'
  1. if the default project is opened:
    1. User selects yes: show a 'Save As' dialog and let the user specify the file name
    2. User selects no: undo all changes to default.hdprj project file and default.sqlite database.
  2. the proposed behavior is similar to MS Word, ArcGIS and MapWindow applications.

9. Double-Click on the *.dspx project file in Windows Explorer

Expected behavior: The installer sets the file association of *.hdprj extension with HydroDesktop. The HydroDesktop application is opened with the map layers and database connection as specified in the hdprj project file.

Last edited Oct 18, 2012 at 9:28 PM by jirikadlec2, version 17

Comments

jd29877 Sep 8, 2010 at 7:20 PM 
Maybe it's better to also include the Search Result Shapefiles in the *.hdprj project file, as in ArcMap that a *.mxd file saves everything in it. Then users can decide to keep it or to remove it.

twhitvine Sep 3, 2010 at 2:54 PM 
Is it safe to start with the default in Program Files? Can users with low permissions edit things in Program Files? I wonder if error will happen when HD tries to update settings.xml for user with low permissions. Perhaps should write to user's application settings folder.