diff --git a/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java b/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java index 41ddb5cd4c8b4f77db01a239823e1a9d3d0f45c5..530a721eb96cd20c2654db7a92c71b6ef844247c 100644 --- a/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java +++ b/src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java @@ -59,6 +59,23 @@ public final class Sites { } } + /** + * Convert a location to site with site data. + * + * @param loc of site + * @param siteData site specific data from model + * @param vs30 optional vs30 value used when running multiple site classes + */ + public static Site locationToSite( + Location loc, + SiteData siteData, + OptionalDouble vs30) { + + Site.Builder site = initBuilder(loc, siteData); + vs30.ifPresent(site::vs30); + return site.build(); + } + private static Site recordToSite( Record record, Set<String> keys, @@ -229,16 +246,6 @@ public final class Sites { .collect(toUnmodifiableList()); } - private static Site locationToSite( - Location loc, - SiteData siteData, - OptionalDouble vs30) { - - Site.Builder site = initBuilder(loc, siteData); - vs30.ifPresent(site::vs30); - return site.build(); - } - private static final int TO_STRING_LIMIT = 5; private static final String SITE_INDENT = LOG_INDENT + " ";