Skip to content

Commit

Permalink
Merge pull request #40 from pmpowers-usgs/metadata-update
Browse files Browse the repository at this point in the history
metadata update; added support for 2s
  • Loading branch information
pmpowers-usgs committed Mar 16, 2017
2 parents f785196 + a2cc08b commit bba71ff
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 50 deletions.
94 changes: 48 additions & 46 deletions src/gov/usgs/earthquake/nshm/www/meta/Edition.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,53 @@
@SuppressWarnings("javadoc")
public enum Edition implements Constrained {

E2008(
"USGS NSHM 2008 Dynamic",
2008,
100,
EnumSet.allOf(Region.class)),

E2014(
"USGS NSHM 2014 Dynamic",
2014,
0,
EnumSet.allOf(Region.class));

private final String label;
private final int year;

/* not serialized */
final transient Set<Region> regions;

private final Constraints constraints;

final int displayOrder;

private Edition(
String label,
int year,
int displayOrder,
Set<Region> regions) {

this.year = year;
this.label = label;
this.displayOrder = displayOrder;
this.regions = regions;
this.constraints = new EditionConstraints(regions);
}

@Override public String toString() {
return label;
}

public int year() {
return year;
}

@Override public Constraints constraints() {
return constraints;
}
E2008(
"Dynamic: Conterminous U.S. 2008 (v3.3.0)",
2008,
100,
EnumSet.allOf(Region.class)),

E2014(
"Dynamic: Conterminous U.S. 2014 (v4.1.0)",
2014,
0,
EnumSet.allOf(Region.class));

private final String label;
private final int year;

/* not serialized */
final transient Set<Region> regions;

private final Constraints constraints;

final int displayOrder;

private Edition(
String label,
int year,
int displayOrder,
Set<Region> regions) {

this.year = year;
this.label = label;
this.displayOrder = displayOrder;
this.regions = regions;
this.constraints = new EditionConstraints(regions);
}

@Override
public String toString() {
return label;
}

public int year() {
return year;
}

@Override
public Constraints constraints() {
return constraints;
}

}
3 changes: 2 additions & 1 deletion src/gov/usgs/earthquake/nshm/www/meta/Metadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.opensha2.gmm.Imt.PGA;
import static org.opensha2.gmm.Imt.SA0P2;
import static org.opensha2.gmm.Imt.SA1P0;
import static org.opensha2.gmm.Imt.SA2P0;

import org.opensha2.calc.Vs30;

Expand Down Expand Up @@ -87,7 +88,7 @@ private static class HazardParameters {
imt = new EnumParameter<>(
"Intensity measure type",
ParamType.STRING,
EnumSet.of(PGA, SA0P2, SA1P0));
EnumSet.of(PGA, SA0P2, SA1P0, SA2P0));

vs30 = new EnumParameter<>(
"Site soil (Vs30)",
Expand Down
7 changes: 4 additions & 3 deletions src/gov/usgs/earthquake/nshm/www/meta/Region.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import static org.opensha2.gmm.Imt.PGA;
import static org.opensha2.gmm.Imt.SA0P2;
import static org.opensha2.gmm.Imt.SA1P0;
import static org.opensha2.gmm.Imt.SA2P0;

import org.opensha2.calc.Vs30;

Expand All @@ -27,7 +28,7 @@ public enum Region implements Constrained {
new double[] { -125.0, -65.0 },
new double[] { 24.6, 50.0 },
new double[] { -125.0, -65.0 },
EnumSet.of(PGA, SA0P2, SA1P0),
EnumSet.of(PGA, SA0P2, SA1P0, SA2P0),
EnumSet.of(VS_760)),

CEUS(
Expand All @@ -36,7 +37,7 @@ public enum Region implements Constrained {
new double[] { -115.0, -65.0 },
new double[] { 24.6, 50.0 },
new double[] { -110.0, -65.0 },
EnumSet.of(PGA, SA0P2, SA1P0),
EnumSet.of(PGA, SA0P2, SA1P0, SA2P0),
EnumSet.of(VS_2000, VS_760)),

WUS(
Expand All @@ -45,7 +46,7 @@ public enum Region implements Constrained {
new double[] { -125.0, -100.0 },
new double[] { 24.6, 50.0 },
new double[] { -125.0, -115.0 },
EnumSet.of(PGA, SA0P2, SA1P0),
EnumSet.of(PGA, SA0P2, SA1P0, SA2P0),
EnumSet.of(VS_1150, VS_760, VS_537, VS_360, VS_259, VS_180));

private final String label;
Expand Down

0 comments on commit bba71ff

Please sign in to comment.