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

Initial implementations #26

Merged
merged 23 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
917bb16
initial DepthHazard
jackschonherr Aug 16, 2024
6d63b42
renaming in Result, added unit test file
jackschonherr Aug 16, 2024
a0559c2
added parameter checking to Get
jackschonherr Aug 16, 2024
cbf06d8
implemented Has for LifeLosshazard, need to test more
jackschonherr Aug 16, 2024
2163411
changed unit tests to test individual methods
jackschonherr Aug 19, 2024
e090217
implemented get for LifeLossHazard, added tests #15
jackschonherr Aug 19, 2024
d0ac729
implemented IResultsWriter #16
jackschonherr Aug 19, 2024
bb16055
Implemented ConsoleWriter and unit tests for it #17
jackschonherr Aug 19, 2024
17c84dd
Implemented functionality and tests for first unit test of Structure #18
jackschonherr Aug 19, 2024
e6dced2
Added more tests for Structure, fixed issues with testing console output
jackschonherr Aug 20, 2024
c5d1843
implemented Location and BoundingBox, not sure about GDAL format for …
jackschonherr Aug 21, 2024
72f0d32
implemented IHazardProvider
jackschonherr Aug 21, 2024
a09045c
implemented RandomDepthHazardProvider and tests #21, and removed chec…
jackschonherr Aug 21, 2024
0819886
removed unneeded dependencies auto-generated by visual studio
jackschonherr Aug 21, 2024
a7a1415
added fields to Structure
jackschonherr Aug 21, 2024
7b91ac3
changed floats to doubles to match float64 specification
jackschonherr Aug 21, 2024
92148cd
removed filter from CI
jackschonherr Aug 22, 2024
0c4b9ad
removed no-build
jackschonherr Aug 22, 2024
2cc7a8f
changed unit tests for #17 and #18 to circumvent weird behavior with …
jackschonherr Aug 22, 2024
2d466f4
added initial interfaces and implementations for processors after the…
jackschonherr Aug 22, 2024
b3f0687
added GetLocation to ConsequenceReceptor and changed Location coordin…
jackschonherr Aug 22, 2024
aa7aeee
added auto properties where needed
jackschonherr Aug 22, 2024
f73e7ad
renamed indiviual tests to be more descriptive
jackschonherr Aug 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 56 additions & 1 deletion Consequences/Consequences/Structure.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,64 @@
using USACE.HEC.Hazards;
using System.Text.Json.Serialization;
using USACE.HEC.Hazards;
using USACE.HEC.Results;

namespace USACE.HEC.Consequences;
public class Structure : IConsequencesReceptor
{
[JsonPropertyName("fd_id")]
public string Name { get; set; }

[JsonPropertyName("st_damcat")]
public string DamCat { get; set; }

[JsonPropertyName("cbfips")]
public string CBFips { get; set; }

[JsonPropertyName("x")]
public float X { get; set; }

[JsonPropertyName("y")]
public float Y { get; set; }

[JsonPropertyName("ground_elv")]
public float GroundElevation { get; set; }

[JsonPropertyName("occtype")]
public string Occtype { get; set; }

[JsonPropertyName("found_type")]
public string FoundationType { get; set; }

[JsonPropertyName("firmzone")]
public string FirmZone { get; set; }

[JsonPropertyName("bldgtype")]
public string ConstructionType { get; set; }

[JsonPropertyName("val_struct")]
public float StructVal { get; set; }

[JsonPropertyName("val_cont")]
public float ContVal { get; set; }

[JsonPropertyName("found_ht")]
public float FoundHt { get; set; }

[JsonPropertyName("num_story")]
public int NumStories { get; set; }

[JsonPropertyName("pop2pmo65")]
public int Popo65day { get; set; }

[JsonPropertyName("pop2pmu65")]
public int Popu65day { get; set; }

[JsonPropertyName("pop2amo65")]
public int Popo65night { get; set; }

[JsonPropertyName("pop2amu65")]
public int Popu65night { get; set; }

public Result Compute(IHazard hazard)
{
List<ResultItem> resultItems = new List<ResultItem>();
Expand Down
4 changes: 2 additions & 2 deletions Consequences/Geography/BoundingBox.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace USACE.HEC.Geography;
public class BoundingBox
{
public Location _upperLeft;
public Location _lowerRight;
private Location _upperLeft;

Choose a reason for hiding this comment

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

yay!

private Location _lowerRight;
Brennan1994 marked this conversation as resolved.
Show resolved Hide resolved

public BoundingBox(Location upperLeft, Location lowerRight)
{
Expand Down