Skip to content
Snippets Groups Projects
Commit eed671ba authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

add map and sites

parent ee453f69
No related branches found
No related tags found
2 merge requests!665Production Release | nshmp-haz,!663Resolves - Map Bounds in Service Usage
......@@ -10,6 +10,7 @@ import java.util.stream.DoubleStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import gov.usgs.earthquake.nshmp.geo.json.FeatureCollection;
import gov.usgs.earthquake.nshmp.gmm.Gmm;
import gov.usgs.earthquake.nshmp.gmm.NehrpSiteClass;
import gov.usgs.earthquake.nshmp.model.HazardModel;
......@@ -73,6 +74,8 @@ public class SourceService {
final Map<NehrpSiteClass, Double> siteClasses;
final List<Parameter> imts;
final List<Double> bounds;
final FeatureCollection map;
final FeatureCollection sites;
public SourceModel(HazardModel model) {
name = model.name();
......@@ -86,6 +89,8 @@ public class SourceService {
.map(imt -> new Parameter(ServletUtil.imtShortLabel(imt), imt.name()))
.collect(toList());
bounds = DoubleStream.of(model.bounds().toArray()).boxed().collect(toList());
map = model.map().orElseThrow();
sites = model.sites().orElseThrow();
}
public String getName() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment