Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: DaLA Configuration #2

Open
mf4dl1 opened this issue Jun 29, 2015 · 12 comments
Open

RFC: DaLA Configuration #2

mf4dl1 opened this issue Jun 29, 2015 · 12 comments

Comments

@mf4dl1
Copy link
Owner

mf4dl1 commented Jun 29, 2015

Status

This RFC is in draft

Problem

Lot of configuration need to be setup before doing DaLA. In fact, the core estimation is based on some of these configuration files including hazard, exposure and assumptions setup.

User Interface

This interface will be put under the QGIS Menu > Plugin > InaSAFE. It shall be put after "InaSAFE Keyword Editor" with the label "DaLA Configuration":

jaksafe menu

Path

Path tab, store set of information related to path, folder location and several input file.

1 dala configuration - 01 - path
1 dala configuration - 02 - path2

Table

Tables tab stores information related to tables that used by DaLA.

1 dala configuration - 03 - table

URL

URL tab stores information of URL from flood reporting system (for Jakarta using DIMS) which return JSON services.

1 dala configuration - 04 - url

Subsector

Subsector tab consist of Subsector list that used for DaLA.

1 dala configuration - 05 - subsector

Hazard Classification

Hazard Classification tab enables user to configure classification of Flood level that used for DaLA. In this case will be using flood depth and duration.

1 dala configuration - 06 - hazard class

Damage

This tab enables user to define the assumptions of Damage valuation for each Hazard Classification.

1 dala configuration - 07 - damage

Loss

This tab enables user to define the assumptions of Loss valuation for each Hazard Classification.

1 dala configuration - 08 - loss

Aggregate

This tab enables user to define the assumptions of Damage and Loss valuation for each Hazard Classification in the form of Boundary Aggregate number.

1 dala configuration - 09 - aggregate

Insurance

This tab enables user to configure Insurance DaLA related information.

1 dala configuration - 10 - insurance

@mf4dl1 mf4dl1 changed the title RFC: #1 DaLA Configuration RFC: DaLA Configuration Jun 29, 2015
@mf4dl1 mf4dl1 assigned mf4dl1 and ghost and unassigned mf4dl1 Jun 30, 2015
@ghost
Copy link

ghost commented Jul 4, 2015

@mf4dl1, I have partially completed Path tab as follow. It has too many fields to fill and hardly fits in one screen. Few questions:

  1. On Path tab, can we take out Input File group box and use Layer window instead?
  2. On Path tab, can we just relay on Project Folder information to automatically get Output File and Input Folder information?
  3. On Table tab, table names should be transparent to user. Can we take out the tab?
  4. On Subsector tab, can we just use Text Edit?
  5. For the rest of the tabs (Hazard Class, Damage, Loss, Aggregate, and Insurance) with table in it, I think user can use spreadsheet applications instead. On point 2), we can list the path to all of the files so user can easily find them.

What do you think?

screen shot 2015-07-05 at 01 27 18

@ghost
Copy link

ghost commented Jul 4, 2015

@timlinux, I have Qt .ui file for DaLA Configuration window. Can I put it under /safe/gui/ui directory? Also, what is the preferable file name for this? Thanks.

@timlinux
Copy link

timlinux commented Jul 5, 2015

Hi @ekaakurniawan

@timlinux, I have Qt .ui file for DaLA Configuration window. Can I put it under /safe/gui/ui directory? Also, what is the preferable file name for this? Thanks.

Yes in the ui dir. Please note that we dynamically compile ui files (instead of using py4uic) so please look at other dialog implementations for an example.

Referring to your dialog above:

  • Please note our HIG rules here: https://github.com/AIFDR/inasafe/wiki/human-interface-guidelines
  • Please use QScrollArea parent widgets where you have large lists of widgets so that dialog can be resized to a smaller size on small screens
  • You should not need to specify the path to QGIS since the plugin already runs in the context of QGIS, so we know what it is.
  • It seems like a lot of configuration options the user must provide - plenty of room for something to go wrong because a user made a bad choice. Please consider using other mechanisms to get the info you need including:
    • inference (e,g, make the output file name automatic and just let the user specify where it gets written)
    • the InaSAFE keywords system
    • looking at how we use definitions.py to define options
    • the paramters framework to standardise forms
  • If you are not already, look at QSettings to maintain state for your config dialog.

@mf4dl1
Copy link
Owner Author

mf4dl1 commented Jul 6, 2015

Hi @ekaakurniawan ,

  1. Yes we can.

For Building Exposure and Road Exposure can be set as an Exposure using Keyword Creation Wizad or InaSAFE keyword editor in InaSAFE menu.

For Boundary, we can set as an aggregation layer also using Keyword Creation Wizad or InaSAFE keyword editor in InaSAFE menu.

postprocessing

aggregation

We also can move Classification Impact to Hazard Classification Tab.

  1. Yes we can.

  2. Yes we can. We can set table name as static and cannot be change by the user. Because user doesn't need to change it anyway.

  3. Yes we can.

  4. I don't understand exactly what you mean by this, but we can discuss this tomorrow anyway.

@ghost
Copy link

ghost commented Jul 14, 2015

Hi @timlinux,

I have just pushed DaLA Configuration Dialog on this CL 3330c09. Please help to check.

I managed to install InaSAFE-dev. Now, I am trying to run the dialog on QGIS but don't know how (I did it during the Hackathon but I cannot recall). Do you have the step-by-step? Thanks.

Hi @mf4dl1,

Following are the UIs please help to check. I combine Path and URL together.

screen shot 2015-07-14 at 12 35 35

screen shot 2015-07-14 at 12 35 52

@mf4dl1
Copy link
Owner Author

mf4dl1 commented Jul 14, 2015

Hi Eka,

I think we don't need to put URL in this configuration anymore, since we have it already in #3 .

We also don't need project folder anymore as @timlinux said.

Currently we only need these two Classification file configuration to be set in DaLA Configuration.

1 dala configuration - 00 - classification

@ghost
Copy link

ghost commented Jul 16, 2015

Hi @mf4dl1,

Please find the new update on this CL 1da8041. Following is the screen shoot.

screen shot 2015-07-16 at 18 06 34

Hi @ismailsunni,

Could you help to advise on how to load this new DaLA Configuration dialog on InaSAFE-dev plugin? Please also help on determining the icon to use for the dialog.

Thanks

@timlinux
Copy link

@ekaakurniawan wrote:

I have just pushed DaLA Configuration Dialog on this CL 3330c09. Please help to check.

I managed to install InaSAFE-dev. Now, I am trying to run the dialog on QGIS but don't know how (I did it during the Hackathon but I cannot recall). Do you have the step-by-step? Thanks.

Could you as @ismailsunni or @lucernae to help you on hipchat - I am going to be tied up over the next week so they will be able to more help.

For an icon, we could ask @MariaSolovyeva to help. For getting your dialog to work, I suggest to take a peek at another dialog for now and copy the implementation pattern we used e.g.

https://github.com/AIFDR/inasafe/blob/develop/safe/gui/tools/extent_selector_dialog.py

Pay particular attention to the fact that we dont pre-compile uic files - see e.g.

FORM_CLASS = get_ui_class('extent_selector_dialog_base.ui')
class ExtentSelectorDialog(QDialog, FORM_CLASS):

Regards Tim

@ghost
Copy link

ghost commented Jul 17, 2015

@timlinux, I have implemented non pre-compiled uic files (3330c09#diff-6152571d5870b3175ae09a5f7ccd6c0eR22). Just not sure if it works. I will check with @ismailsunni or @lucernae to run the dialog. Thanks.

@timlinux
Copy link

Hi

As someone who loves minimalism, its nice to see the dialog reduced in complexity. A couple more suggestions:

In your case I would get rid of both the group box and the tab as they both seem superfluous.

Regards

Tim

@ismailsunni
Copy link
Collaborator

Hi @ekaakurniawan
To add your dialog to InaSAFE:
Go to plugin.py (https://github.com/AIFDR/inasafe/blob/develop/safe/plugin.py#L398). There is initGui method which populates the menu actions. You can look at one of the method, e.g. _create_options_dialog_action, and follow the code on how to add the icon, and set the actions. Don't forget to create a class for the gui. It seems you have created one in your https://github.com/mf4dl1/jaksafe/blob/develop/safe/gui/tools/dala_configuration_dialog.py

Just ping me in hipchat, if you need help.

@ghost
Copy link

ghost commented Jul 22, 2015

Thanks @ismailsunni. It works (c9f10f3). I will start looking at InaSAFE keywords creation wizard and try to better integrate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants