From c0475a2c4cacd37ab82d34a135ac0116d7869d2f Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Thu, 6 Oct 2022 16:01:32 -0600
Subject: [PATCH] read in map and sites

---
 .../nshmp/netcdf/reader/ReaderHazardCurves.java       | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/reader/ReaderHazardCurves.java b/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/reader/ReaderHazardCurves.java
index f8531d5..9c465d2 100644
--- a/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/reader/ReaderHazardCurves.java
+++ b/src/hazard/src/main/java/gov/usgs/earthquake/nshmp/netcdf/reader/ReaderHazardCurves.java
@@ -7,6 +7,7 @@ import java.util.EnumMap;
 import java.util.List;
 import java.util.Map;
 
+import gov.usgs.earthquake.nshmp.geo.json.GeoJson;
 import gov.usgs.earthquake.nshmp.gmm.Imt;
 import gov.usgs.earthquake.nshmp.netcdf.data.NetcdfData;
 import gov.usgs.earthquake.nshmp.netcdf.data.NetcdfDataHazardCurves;
@@ -43,7 +44,15 @@ public class ReaderHazardCurves extends Reader {
     // get map of IMLs
     var imls = mapImls(vImls, netcdfData.imts());
 
-    return new NetcdfDataHazardCurves(netcdfData, imls);
+    // get map boundary geojson
+    var map =
+        GeoJson.from(targetGroup.findAttribute(Key.MAP).getStringValue()).toFeatureCollection();
+
+    // get test sites geojson
+    var sites =
+        GeoJson.from(targetGroup.findAttribute(Key.SITES).getStringValue()).toFeatureCollection();
+
+    return new NetcdfDataHazardCurves(netcdfData, imls, map, sites);
   }
 
   @Override
-- 
GitLab