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

Add intermediate if class #1924

Merged
merged 22 commits into from Jun 5, 2015
Merged

Conversation

lucernae
Copy link
Collaborator

@lucernae lucernae commented May 8, 2015

Work In Progress, Don't merge yet.

Adds progressively 12 Intermediate Base Classes specified in #1914

@lucernae
Copy link
Collaborator Author

lucernae commented May 8, 2015

@akbargumbira @cchristelis @timlinux
I need some review here. I'm not really sure what else should we consider when creating the base classes. Perhaps more layer checks or attributes?

@akbargumbira
Copy link
Member

This is not what I have in mind. The 12 classes shouldn't have calculate impact method. Running an IF is the job of the concrete IF. This is gonna be hard for the concrete IF to do its own analysis on calculating the impact. There's also too many layers of abstraction which I don't even understand the first time reading it..

@akbargumbira
Copy link
Member

But, let's hear other's opinion first @timlinux and @cchristelis

@lucernae
Copy link
Collaborator Author

@akbargumbira in that case, perhaps what you have in mind is just the layer checking here. Like, if we uses ContinuousVHClassifiedRE, we check that the hazard is a vector type and the exposure is raster?

@ismailsunni
Copy link
Member

hi @akbargumbira
I thought the calculation should be put in the 12 classes. And we just add the context (the hazard and the exposure) in the concrete class. I think you agree about it when we were discussing it in jakarta.


@hazard_map.setter
def hazard_map(self, value):
"""The classified hazard map by hazard type. Only valid for
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First line of docstring should be single line followed by a full stop and a new line.

…ate_if_class

Conflicts:
	safe/impact_functions/earthquake/earthquake_building/impact_function.py
	safe/impact_functions/generic/classified_raster_building/impact_function.py
	safe/impact_functions/inundation/flood_raster_osm_building_impact/impact_function.py
	safe/impact_functions/inundation/flood_raster_population/impact_function.py
	safe/impact_functions/inundation/flood_raster_road_qgis/impact_function.py
	safe/impact_functions/volcanic/volcano_point_population/metadata_definitions.py
@lucernae
Copy link
Collaborator Author

lucernae commented Jun 3, 2015

Test fails because of layer_mode_none issues.
Will merge it ASAP after that issue is resolved in develop

lucernae added a commit that referenced this pull request Jun 5, 2015
@lucernae lucernae merged commit 8bc3b90 into inasafe:develop Jun 5, 2015
@lucernae lucernae deleted the add_intermediate_if_class branch June 8, 2015 06:52
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

Successfully merging this pull request may close these issues.

None yet

4 participants