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
e50a1077
Commit
e50a1077
authored
5 months ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Plain Diff
Merge branch 'sites' into 'main'
Location to Site See merge request
!428
parents
87c6d807
39ed7dc9
No related branches found
No related tags found
1 merge request
!428
Location to Site
Pipeline
#506550
passed
5 months ago
Stage: build
Changes
1
Pipelines
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 @
e50a1077
...
...
@@ -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
+
" "
;
...
...
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