So is it ok now?
@ds I did...and it works. I got a human loss calculation for the Qayen earthquake of Iran.
I suggest you fix the foreign key manually and rerun the calculations to make sure that your suggestion works.
@ds After running loss calculations.
You can manually delete the tables and run everything again after fixing the bug in exposure-lib. The question I have is why we didn't notice this problem earlier. We have run test computations. In what context did this error appear?
I have edited the issue text so that it looks right. Also, please use a \
for the \fyi
or \rfc
.
Tara Evaz Zadeh (f2b878f4) at 28 Mar 10:13
Changed the foreign key reference in HazardFieldIntensity table
Tara Evaz Zadeh (358ec8ce) at 28 Mar 10:09
@ds In case an image helps better
@tara Please format the issue text so that it can be easily read.
The table HazardFieldIntensity
is created as below:
CREATE TABLE HazardFieldIntensity (
hazard_field_node_id INTEGER,
intensity_type_id INTEGER,
intensity_value REAL,
CONSTRAINT fk_hazard_field_node_id FOREIGN KEY (hazard_field_node_id) REFERENCES HazardFieldNode (id),
CONSTRAINT fk_intensity_type_id FOREIGN KEY (intensity_type_id) REFERENCES IntensityType (intensity_type)
)
The last line should change to REFERENCES IntensityType (id)
to avoid the error of sqlite3.IntegrityError: FOREIGN KEY constraint failed
.
Danijel Schorlemmer (358ec8ce) at 25 Mar 17:25
The function aggregate_exposure_entities
only aggregates building assets into tile assets if the aggregation condition is met, which is a tile containing fewer buildings than the given min_number_buildings
parameter. This causes all tiles with more than min_number_buildings
to keep their building entities. This defeats the notion of aggregating the dataset.
Laurens Oostwegel (ee0aff7b) at 22 Feb 14:15
Retrieve the floorspace attribute in function 'get_country_building...
Laurens Oostwegel (358ec8ce) at 22 Feb 14:07