Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-lib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-lib
Commits
284e5e27
Commit
284e5e27
authored
5 months ago
by
Powers, Peter M.
Browse files
Options
Downloads
Plain Diff
Merge branch 'main' of
https://code.usgs.gov/ghsc/nshmp/nshmp-lib
parents
16f30650
e50a1077
No related branches found
No related tags found
1 merge request
!429
AM09 site term fix
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java
+17
-10
17 additions, 10 deletions
src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java
with
17 additions
and
10 deletions
src/main/java/gov/usgs/earthquake/nshmp/calc/Sites.java
+
17
−
10
View file @
284e5e27
...
@@ -59,6 +59,23 @@ public final class Sites {
...
@@ -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
(
private
static
Site
recordToSite
(
Record
record
,
Record
record
,
Set
<
String
>
keys
,
Set
<
String
>
keys
,
...
@@ -229,16 +246,6 @@ public final class Sites {
...
@@ -229,16 +246,6 @@ public final class Sites {
.
collect
(
toUnmodifiableList
());
.
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
int
TO_STRING_LIMIT
=
5
;
private
static
final
String
SITE_INDENT
=
LOG_INDENT
+
" "
;
private
static
final
String
SITE_INDENT
=
LOG_INDENT
+
" "
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment