From cbcf6b36f0fcc8ab7dd7501e1a0fb34b001e58d5 Mon Sep 17 00:00:00 2001 From: Peter Powers <pmpowers@usgs.gov> Date: Wed, 23 Oct 2019 14:40:42 -0600 Subject: [PATCH] nshm poly updates --- .../usgs/earthquake/nshmp/site/NshmpPolygon.java | 8 ++++---- .../earthquake/nshmp/site/NshmpSiteFiles.java | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gov/usgs/earthquake/nshmp/site/NshmpPolygon.java b/src/gov/usgs/earthquake/nshmp/site/NshmpPolygon.java index 9641ea584..44c30f08c 100644 --- a/src/gov/usgs/earthquake/nshmp/site/NshmpPolygon.java +++ b/src/gov/usgs/earthquake/nshmp/site/NshmpPolygon.java @@ -12,8 +12,8 @@ public enum NshmpPolygon { CEUS_CLIP(Data.CEUS_CLIP, "Central & Eastern US Map Extents"), WUS_CLIP(Data.WUS_CLIP, "Western US Map Extents"), - AK_CLIP(Data.AK_CLIP, "Alaska Map Extents"), - HI_CLIP(Data.HI_CLIP, "Hawaii Map Extents"), + ALASKA_CLIP(Data.ALASKA_CLIP, "Alaska Map Extents"), + HAWAII_CLIP(Data.HAWAII_CLIP, "Hawaii Map Extents"), ALASKA(Data.ALASKA, "Alaska"), HAWAII(Data.HAWAII, "Hawaii"), @@ -72,7 +72,7 @@ public enum NshmpPolygon { { -100.0, 50.0 } }; - private static final double[][] AK_CLIP = { + private static final double[][] ALASKA_CLIP = { { -200.0, 48.0 }, { -125.0, 72.0 } }; @@ -105,7 +105,7 @@ public enum NshmpPolygon { { -137.5, 70.6 } }; - private static final double[][] HI_CLIP = { + private static final double[][] HAWAII_CLIP = { { -161.0, 18.0 }, { -154.0, 23.0 } }; diff --git a/src/gov/usgs/earthquake/nshmp/site/NshmpSiteFiles.java b/src/gov/usgs/earthquake/nshmp/site/NshmpSiteFiles.java index 477750dea..a8e52c018 100644 --- a/src/gov/usgs/earthquake/nshmp/site/NshmpSiteFiles.java +++ b/src/gov/usgs/earthquake/nshmp/site/NshmpSiteFiles.java @@ -2,8 +2,10 @@ package gov.usgs.earthquake.nshmp.site; import static com.google.common.base.Strings.padEnd; import static com.google.common.base.Strings.padStart; -import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.AK_CLIP; +import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.ALASKA_CLIP; import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.ALASKA; +import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.HAWAII_CLIP; +import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.HAWAII; import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.CEUS_CLIP; import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.CONTERMINOUS_US; import static gov.usgs.earthquake.nshmp.site.NshmpPolygon.CYBERSHAKE; @@ -52,6 +54,9 @@ import gov.usgs.earthquake.nshmp.NamedLocation; * @author Peter Powers */ final class NshmpSiteFiles { + + // TODO consider removing this to nshm-model-dev + // keeping the outputs in nshmp-haz private static final Path EXPORT_DIR = Paths.get("etc", "nshm"); private static final String EXTENTS_COLOR = "#AA0078"; @@ -92,7 +97,14 @@ final class NshmpSiteFiles { ALASKA.toString(), ALASKA.coordinates(), 0.1, - AK_CLIP.coordinates().bounds().toList()); + ALASKA_CLIP.coordinates().bounds().toList()); + + writePolyJson( + EXPORT_DIR.resolve("map-hawaii.geojson"), + HAWAII.toString(), + HAWAII.coordinates(), + 0.1, + HAWAII_CLIP.coordinates().bounds().toList()); writePolyJson( EXPORT_DIR.resolve("map-la-basin.geojson"), -- GitLab