Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Tweak styles, improve render performance, filter metadata output, start adding vector models

ZachTRiceee6c19279081
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_All_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_All_v6_NRT.json
index 76a2c171e..34682fb8c 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_All_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_All_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Aqua_Thermal_Anomalies_All_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Day_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Day_v6_NRT.json
index 70886a4bb..b90ff1f69 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Day_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Day_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Aqua_Thermal_Anomalies_Day_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Night_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Night_v6_NRT.json
index 183386499..220e227c0 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Night_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Aqua_Thermal_Anomalies_Night_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Aqua_Thermal_Anomalies_Night_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_All_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_All_v6_NRT.json
index ddff58740..285c7adad 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_All_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_All_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Combined_Thermal_Anomalies_All_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Day_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Day_v6_NRT.json
index 25fe87c4a..768682e1f 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Day_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Day_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Combined_Thermal_Anomalies_Day_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Night_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Night_v6_NRT.json
index ce9b01867..7f04e78d4 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Night_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Combined_Thermal_Anomalies_Night_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Combined_Thermal_Anomalies_Night_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_All_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_All_v6_NRT.json
index 4e12da976..3213c9c0c 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_All_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_All_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Terra_Thermal_Anomalies_All_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Day_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Day_v6_NRT.json
index ac31406f3..5b19f76e4 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Day_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Day_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Terra_Thermal_Anomalies_Day_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Night_v6_NRT.json b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Night_v6_NRT.json
index 41398029f..66e5044eb 100644
--- a/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Night_v6_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/MODIS_Terra_Thermal_Anomalies_Night_v6_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "MODIS_Terra_Thermal_Anomalies_Night_v6_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
index 4a8f1d5d9..7da12d5c6 100644
--- a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
index ec5efc2f9..01979ec94 100644
--- a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
index 8a637bd28..651e74862 100644
--- a/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
+++ b/config/default/common/config/wv.json/layers/vector/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
@@ -14,7 +14,8 @@
"inactive": true,
"vectorStyle": {
"id": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT"
- }
+ },
+ "period": "daily"
}
}
}
diff --git a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
index 9a587287c..f278a87d7 100644
--- a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
+++ b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT.json
@@ -68,6 +68,124 @@
},
"circle-color": "#FF0000"
}
+ },
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_All_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IA_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
}
]
}
diff --git a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
index 370fe8e14..8c9a455e5 100644
--- a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
+++ b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT.json
@@ -68,6 +68,124 @@
},
"circle-color": "#FF0000"
}
+ },
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Day_v1_NRT",
+ "source-layer": "FIRMS_SNPP_ID_LL_v1_NRT_20181119",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
}
]
}
diff --git a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
index ddedbe6df..21d018ca4 100644
--- a/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
+++ b/config/default/common/vectorstyles/VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT.json
@@ -10,6 +10,124 @@
}
},
"layers": [
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181117",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181117",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181117",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_Confidence",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["==", ["get", "CONFIDENCE"], "low"], "rgba(55,255,0,1)",
+ ["==", ["get", "CONFIDENCE"], "nominal"], "rgba(255,128,0,1)",
+ ["==", ["get", "CONFIDENCE"], "high"], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "MODIS_Fire_Points_FRP",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": [
+ "case",
+ ["<=", ["get", "FRP"], 50], "rgba(255,0,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 50],
+ ["<=", ["get", "FRP"], 75]
+ ], "rgba(255,128,0,1)",
+ [
+ "all",
+ [">", ["get", "FRP"], 75],
+ ["<=", ["get", "FRP"], 100]
+ ], "rgba(55,255,0,1)",
+ "rgba(255,255,255,0.4)"
+ ]
+ }
+ },
+ {
+ "id": "default_style",
+ "source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
+ "source-layer": "FIRMS_SNPP_IN_LL_v1_NRT_20181118",
+ "type": "circle",
+ "paint": {
+ "circle-radius": {
+ "base": 2,
+ "stops": [[12, 1], [22, 10]]
+ },
+ "circle-color": "#FF0000"
+ }
+ },
{
"id": "MODIS_Fire_Points_Confidence",
"source": "VIIRS_SNPP_Thermal_Anomalies_375m_Night_v1_NRT",
diff --git a/config/default/release/config.json b/config/default/release/config.json
index 943363ecf..56b42ca8f 100644
--- a/config/default/release/config.json
+++ b/config/default/release/config.json
@@ -2,7 +2,7 @@
"wv-options-fetch": [
{
"from": "http://cache1-sit.gibs.earthdata.nasa.gov/wmts/epsg4326/nrt/wmts.cgi?request=GetCapabilities",
- "to": "gibs-geographic-nrt.xml"
+ "to": "gibs-geographic.xml"
},
{
"from": "http://cache1-sit.gibs.earthdata.nasa.gov/wmts/epsg4326/std/wmts.cgi?request=GetCapabilities",
@@ -16,36 +16,22 @@
"wv-options-wmts": [
{
"source": "GIBS:geographic",
- "from": "gibs-geographic-nrt.xml",
- "to": "gibs-geographic-nrt.json",
+ "from": "gibs-geographic.xml",
+ "to": "gibs-geographic.json",
"projection": "geographic",
"maxResolution": 0.5625
},
- {
- "source": "GIBS:geographic",
- "from": "gibs-geographic-std.xml",
- "to": "gibs-geographic-std.json",
- "projection": "geographic",
- "maxResolution": 0.5625
- },
- {
- "source": "GIBS:arctic",
- "from": "gibs-arctic-std.xml",
- "to": "gibs-arctic-std.json",
- "projection": "arctic",
- "maxResolution": 8192.0
- },
{
"source": "GIBS:arctic",
- "from": "gibs-arctic-std.xml",
- "to": "gibs-arctic-std.json",
+ "from": "gibs-arctic.xml",
+ "to": "gibs-arctic.json",
"projection": "arctic",
"maxResolution": 8192.0
},
{
"source": "GIBS:antarctic",
- "from": "gibs-antarctic-std.xml",
- "to": "gibs-antarctic-std.json",
+ "from": "gibs-antarctic.xml",
+ "to": "gibs-antarctic.json",
"projection": "antarctic",
"maxResolution": 8192.0
}
diff --git a/package.json b/package.json
index eb38b9b85..8833765a9 100644
--- a/package.json
+++ b/package.json
@@ -164,7 +164,7 @@
"jscrollpane": "^2.0.22",
"lodash": "^4.15.0",
"ol": "^5.2.0",
- "ol-mapbox-style": "^3.9.0",
+ "ol-mapbox-style": "^4.1.0",
"perfect-scrollbar": "^0.8.1",
"proj4": "2.3.3",
"promise-queue": "2.2.3",
diff --git a/web/index.html b/web/index.html
index 1cf5abed9..2365f4ab8 100644
--- a/web/index.html
+++ b/web/index.html
@@ -44,7 +44,6 @@ Licensed under the NASA Open Source Agreement, Version 1.3 (http://opensource.gs
<link type="text/css" rel="Stylesheet" href="build/wv.css?v=@BUILD_NONCE@">
<script type="text/javascript" src="build/wv.js?v=@BUILD_NONCE@"></script>
-
</head>
<body>
diff --git a/web/js/components/layer/settings/vector-styles.js b/web/js/components/layer/settings/vector-styles.js
new file mode 100644
index 000000000..13536cb34
--- /dev/null
+++ b/web/js/components/layer/settings/vector-styles.js
@@ -0,0 +1,151 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import lodashIndexOf from 'lodash/indexOf';
+import util from '../../../util/util';
+import Scrollbar from '../../util/scrollbar';
+
+class VectorStyleSelect extends React.Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ activeVectorStyle: props.activeVectorStyle
+ };
+ }
+
+ /**
+ * Render default legend option
+ */
+ renderDefault() {
+ const { layer, index, getDefaultLegend } = this.props;
+ const { activeVectorStyle } = this.state;
+ const legend = getDefaultLegend(layer.id, index);
+
+ return this.renderSelectorItemSingle(
+ legend,
+ 'default_style',
+ 'Default',
+ activeVectorStyle === 'default_style'
+ );
+ }
+ /**
+ * Pass palette to model after selection
+ * @param {String} id | custom Palette Id
+ */
+ onChangePalette(id) {
+ const { layer, clearCustom, setCustom, index } = this.props;
+
+ // Applying customs takes a while and
+ // it looks more natural to make this async
+ // instead of waiting
+ setTimeout(function() {
+ if (id === 'default_style') {
+ clearCustom(layer.id, index);
+ } else {
+ setCustom(layer.id, id, index);
+ }
+ }, 0);
+ this.setState({ activeVectorStyle: id });
+ }
+ /**
+ * Apply logic to render correct palette selection
+ * @param {String} id | Legend Id
+ */
+ customLegend(id) {
+ const {
+ getDefaultLegend,
+ getCustomPalette,
+ layer,
+ index,
+ palettesTranslate
+ } = this.props;
+ const { activeVectorStyle } = this.state;
+ var source = getDefaultLegend(layer.id, index);
+ var target = getCustomPalette(id);
+ var targetType =
+ target.colors.length === 1 ? 'classification' : 'continuous';
+
+ if (source.type === 'classification' && targetType === 'classification') {
+ return this.renderSelectorItemSingle(
+ target,
+ id,
+ target.name,
+ activeVectorStyle === target.id
+ );
+ }
+ }
+
+ /**
+ * Render classification customs when there is only one
+ * Color in colormap
+ * @param {Object} palette | Palette object
+ * @param {String} id | colormap Id
+ * @param {String} description | Colormap name
+ * @param {Boolean} isSelected | is this colormap active
+ */
+ renderSelectorItemSingle(palette, id, description, isSelected) {
+ const color = palette.classes
+ ? palette.classes.colors[0]
+ : palette.colors[0];
+ const caseDefaultClassName =
+ 'wv-palette-selector-row wv-checkbox wv-checkbox-round gray ';
+ const checkedClassName = isSelected ? 'checked' : '';
+ return (
+ <div key={id} className={caseDefaultClassName + checkedClassName}>
+ <input
+ id={'wv-palette-radio-' + id}
+ type="radio"
+ name="wv-palette-radio"
+ onClick={() => this.onChangePalette(id)}
+ />
+ <label htmlFor={'wv-palette-radio-' + id}>
+ <span
+ className="wv-palettes-class"
+ style={{ backgroundColor: util.hexToRGB(color) }}
+ >
+ &nbsp;
+ </span>
+ <span className="wv-palette-label">{description}</span>
+ </label>
+ </div>
+ );
+ }
+ render() {
+ const { index, layer, paletteOrder } = this.props;
+ const recommended = layer.palette.recommended || [];
+
+ return (
+ <div
+ className="wv-palette-selector settings-component noselect"
+ id={'wv-palette-selector' + index}
+ >
+ <h2 className="wv-header">Vector Style</h2>
+ <Scrollbar style={{ maxHeight: '200px' }}>
+ {this.renderDefault()}
+ {paletteOrder.map(id => {
+ if (lodashIndexOf(recommended, id) < 0) {
+ var item = this.customLegend(id);
+ if (item) {
+ return item;
+ }
+ }
+ })}
+ </Scrollbar>
+ </div>
+ );
+ }
+}
+VectorStyleSelect.propTypes = {
+ index: PropTypes.number,
+ layer: PropTypes.object,
+ clearCustom: PropTypes.func,
+ setCustom: PropTypes.func,
+ paletteOrder: PropTypes.array,
+ palettesTranslate: PropTypes.func,
+ getDefaultLegend: PropTypes.func,
+ getCustomPalette: PropTypes.func,
+ canvas: PropTypes.object,
+ checkerBoard: PropTypes.object,
+ activeVectorStyle: PropTypes.string
+};
+
+export default VectorStyleSelect;
diff --git a/web/js/map/layerbuilder.js b/web/js/map/layerbuilder.js
index b3ae1b397..83c252f04 100644
--- a/web/js/map/layerbuilder.js
+++ b/web/js/map/layerbuilder.js
@@ -9,17 +9,11 @@ import OlTileGridTileGrid from 'ol/tilegrid/TileGrid';
import MVT from 'ol/format/MVT';
import LayerVectorTile from 'ol/layer/VectorTile';
import SourceVectorTile from 'ol/source/VectorTile';
-// import Style from 'ol/style/style';
-// import Circle from 'ol/style/circle';
-// import Fill from 'ol/style/fill';
-// import Text from 'ol/style/text';
-// import Stroke from 'ol/style/stroke';
-// import { applyStyle } from 'ol-mapbox-style';
-import stylefunction from 'ol-mapbox-style/stylefunction';
+import { applyStyle } from 'ol-mapbox-style';
+// import stylefunction from 'ol-mapbox-style/stylefunction';
import lodashCloneDeep from 'lodash/cloneDeep';
import lodashMerge from 'lodash/merge';
import lodashEach from 'lodash/each';
-// import lodashIsEmpty from 'lodash/isEmpty';
import { lookupFactory } from '../ol/lookupimagetile';
import {
isActive as isPaletteActive,
@@ -34,17 +28,13 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
mapUi.events.on('selecting', hideWrap);
mapUi.events.on('selectiondone', showWrap);
};
- /*
+ /**
* Create a new OpenLayers Layer
*
* @method createLayer
* @static
- *
* @param {object} def - Layer Specs
- *
* @param {object} options - Layer options
- *
- *
* @returns {object} OpenLayers layer
*/
self.createLayer = function(def, options) {
@@ -192,16 +182,14 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
return date;
};
- /*
+ /**
* Create a layer key
*
* @function layerKey
* @static
- *
* @param {Object} def - Layer properties
* @param {number} options - Layer options
* @param {boolean} precache
- *
* @returns {object} layer key Object
*/
self.layerKey = function(def, options, state) {
@@ -224,17 +212,12 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
}
return [layerId, projId, date, palette, activeGroupStr].join(':');
};
- /*
+ /**
* Create a new WMTS Layer
- *
* @method createLayerWMTS
* @static
- *
* @param {object} def - Layer Specs
- *
* @param {object} options - Layer options
- *
- *
* @returns {object} OpenLayers WMTS layer
*/
var createLayerWMTS = function(def, options, day, state) {
@@ -309,17 +292,13 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
});
};
- /*
+ /**
* Create a new Vector Layer
*
* @method createLayerVector
* @static
- *
* @param {object} def - Layer Specs
- *
* @param {object} options - Layer options
- *
- *
* @returns {object} OpenLayers Vector layer
*/
var createLayerVector = function(def, options, day, state) {
@@ -382,10 +361,12 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
var sourceOptions = new SourceVectorTile({
url: source.url + urlParameters,
+ cacheSize: 8192,
layer: layerName,
crossOrigin: 'anonymous',
format: new MVT(),
- matrixSet: tms,
+ overlaps: false,
+ wrapX: false,
tileGrid: new OlTileGridTileGrid({
extent: extent,
origin: start,
@@ -394,212 +375,9 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
})
});
- // var scaleFeature = function (base, resolution) {
- // // var zoom = map.getView()
- // // .getZoom();
- // // var zoom = resolution;
- // // Minimum size of the button is 15 pixels
- // base = 5;
- // // Double the size for each zoom level
- // var add = Math.pow(2, resolution);
- // // But 47 pixels is the maximum size
- // var size = Math.min(base + add, base + 32);
- // return {
- // scale: size / 48,
- // size: size
- // };
- // };
-
- // Create style options and store them in a styleCache Object
- // ref: http://openlayers.org/en/v3.10.1/examples/kml-earthquakes.html
- // ref: http://openlayersbook.github.io/ch06-styling-vector-layers/example-07.html
- // var featureStyles = function(feature, resolution) {
- // var featureStyle, color, fill, stroke, image, text, label, labelFillColor, labelStrokeColor;
- // var fillColor = 'rgba(255,255,255,0.4)';
- // var strokeColor = '#3399CC';
- // var width = 1.25;
- // var radius = 5;
-
- // if (config.vectorStyles.rendered[def.vectorStyle.id]) {
- // var layerStyles = config.vectorStyles.rendered[def.vectorStyle.id].styles;
- // var styleGroup = Object.keys(layerStyles).map(e => layerStyles[e]);
- // }
- // var styleGroupCount = 0;
- // var matchedPropertyStyles = [];
- // var matchedLineStyles = [];
-
- // if (config.vectorStyles.rendered[def.vectorStyle.id]) {
- // // Match JSON styles from GC to vector features and add styleValue to arrays
- // lodashEach(styleGroup, function(styleValues) {
- // let stylePropertyKey = styleValues.property;
- // if (stylePropertyKey in feature.properties_) matchedPropertyStyles.push(styleValues);
- // if (feature.type_ === 'LineString' && styleValues.lines) matchedLineStyles.push(styleValues);
- // });
- // }
-
- // if (lodashIsEmpty(matchedPropertyStyles) && lodashIsEmpty(matchedLineStyles)) {
- // featureStyle = styleCache['default'];
-
- // let defaultFill = new Fill({
- // color: fillColor
- // });
- // let deafultStroke = new Stroke({
- // color: strokeColor,
- // width: width
- // });
-
- // if (!featureStyle) {
- // featureStyle = new Style({
- // image: new Circle({
- // fill: defaultFill,
- // stroke: deafultStroke,
- // radius: radius
- // }),
- // fill: defaultFill,
- // stroke: deafultStroke
- // });
- // styleCache['default'] = featureStyle;
- // }
- // } else {
- // // Style vector points
- // lodashEach(matchedPropertyStyles, function(matchedStyle) {
- // styleGroupCount++;
- // let pointStyle = feature.get(matchedStyle.property) + '_' + styleGroupCount;
- // if (pointStyle) {
- // featureStyle = styleCache[pointStyle];
-
- // // If there is a range, style properties based on ranges
- // if (matchedStyle.range) {
- // let ranges = matchedStyle.range.split(',');
- // let lowRange = ranges[ranges.length - 2].substring(1).trim();
- // let highRange = ranges[ranges.length - 1].slice(0, -1).trim();
- // if (matchedStyle.range.startsWith('[') && matchedStyle.range.endsWith(']')) { // greater than or equal to + less than or equal to
- // if (feature.properties_[matchedStyle.property] >= lowRange && feature.properties_[matchedStyle.property] <= highRange) {
- // color = matchedStyle.points.color;
- // }
- // } else if (matchedStyle.range.startsWith('[') && matchedStyle.range.endsWith(')')) { // greater than or equal to + less than
- // if (feature.properties_[matchedStyle.property] >= lowRange && feature.properties_[matchedStyle.property] < highRange) {
- // color = matchedStyle.points.color;
- // }
- // } else if (matchedStyle.range.startsWith('(') && matchedStyle.range.endsWith(']')) { // greater than + less than or equal to
- // if (feature.properties_[matchedStyle.property] > lowRange && feature.properties_[matchedStyle.property] <= highRange) {
- // color = matchedStyle.points.color;
- // }
- // } else if (matchedStyle.range.startsWith('(') && matchedStyle.range.endsWith(')')) { // greater than + less than
- // if (feature.properties_[matchedStyle.property] > lowRange && feature.properties_[matchedStyle.property] < highRange) {
- // color = matchedStyle.points.color;
- // }
- // } else {
- // color = matchedStyle.points.color;
- // }
- // // If there is a regexp and time property, style time vector points
- // } else if (feature.properties_.time && matchedStyle.property === 'time' && matchedStyle.regex) {
- // let time = feature.properties_.time;
- // let pattern = new RegExp(matchedStyle.regex);
- // let timeTest = pattern.test(time);
- // if (timeTest) {
- // color = matchedStyle.points.color;
- // radius = matchedStyle.points.radius;
- // if (matchedStyle.label) {
- // label = feature.properties_.time;
- // labelFillColor = matchedStyle.label.fill_color;
- // labelStrokeColor = matchedStyle.label.stroke_color;
- // }
- // }
- // // Else set default styles
- // } else {
- // color = matchedStyle.points.color;
- // radius = matchedStyle.points.radius;
- // width = matchedStyle.points.width;
- // }
-
- // if (!featureStyle) {
- // fill = new Fill({
- // color: color || fillColor
- // });
-
- // stroke = new Stroke({
- // color: color || strokeColor,
- // width: width
- // });
-
- // image = new Circle({
- // fill: fill,
- // stroke: stroke,
- // radius: radius
- // });
-
- // text = new Text({
- // text: label || '',
- // fill: new Fill({
- // color: labelFillColor || fillColor
- // }),
- // stroke: new Stroke({
- // color: labelStrokeColor || strokeColor
- // }),
- // font: '9px sans-serif',
- // offsetX: 24
- // });
-
- // featureStyle = new Style({
- // fill: fill,
- // stroke: stroke,
- // image: image,
- // text: text
- // });
-
- // var radiusDimensions = scaleFeature(radius, resolution);
- // radius = radiusDimensions.size;
-
- // var widthDimensions = scaleFeature(width, resolution);
- // width = widthDimensions.size;
- // // if ((width / (resolution * 100)) > width) {
- // // width = width / (resolution * 100);
- // // }
-
- // stroke.setWidth(width);
-
- // styleCache[pointStyle] = featureStyle;
- // }
- // }
- // });
-
- // // Style vector lines
- // lodashEach(matchedLineStyles, function(matchedStyle) {
- // let lineStyle = feature.type;
- // let lineColor = matchedStyle.lines.color;
- // let lineWidth = matchedStyle.lines.width;
- // let width = lineWidth || 1.25;
-
- // if (!featureStyle) {
- // var stroke = new Stroke({
- // color: lineColor || '#3399CC',
- // width: width
- // });
-
- // featureStyle = new Style({
- // stroke: stroke
- // });
-
- // var widthDimensions = scaleFeature(width, resolution);
- // width = widthDimensions.size;
- // // if ((width / (resolution * 100)) > width) {
- // // width = width / (resolution * 100);
- // // }
-
- // stroke.setWidth(width);
- // styleCache[lineStyle] = featureStyle;
- // }
- // });
- // }
-
- // // The style for this feature is in the cache. Return it as an array
- // return featureStyle;
- // };
-
var layer = new LayerVectorTile({
renderMode: 'image',
- preload: 1,
+ renderBuffer: '5',
extent: extent,
source: sourceOptions
});
@@ -608,34 +386,31 @@ export function mapLayerBuilder(models, config, cache, mapUi, store) {
var vectorStyles = config.vectorStyles.rendered;
var vectorStyle = def.vectorStyle.id;
var glStyle = vectorStyles[vectorStyle];
- stylefunction(layer, glStyle, 'default_style');
+
$(document).ready(function() {
$(document).on('change', document.getElementById('frpCheckbox'), function(e) {
if (document.getElementById('frpCheckbox').checked === true) {
- stylefunction(layer, glStyle, 'MODIS_Fire_Points_FRP');
+ applyStyle(layer, glStyle, 'MODIS_Fire_Points_FRP');
} else if (document.getElementById('confidenceCheckbox').checked === true) {
- stylefunction(layer, glStyle, 'MODIS_Fire_Points_Confidence');
+ applyStyle(layer, glStyle, 'MODIS_Fire_Points_Confidence');
} else {
- stylefunction(layer, glStyle, 'default_style');
+ applyStyle(layer, glStyle, 'default_style');
}
});
+ applyStyle(layer, glStyle, 'default_style');
});
}
return layer;
};
- /*
+ /**
* Create a new WMS Layer
*
* @method createLayerWMTS
* @static
- *
* @param {object} def - Layer Specs
- *
* @param {object} options - Layer options
- *
- *
* @returns {object} OpenLayers WMS layer
*/
var createLayerWMS = function(def, options, day, state) {
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index 534ac08fb..4d8609c73 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -914,10 +914,22 @@ export function mapui(models, config, store, ui) {
map.on('rendercomplete', onRenderComplete);
// Clicking on a vector shows it's attributes in console.
map.on('click', function(e) {
+ var attsCollector = [];
map.forEachFeatureAtPixel(e.pixel, function(feature, layer) {
- console.log(feature.getProperties());
+ var feats = feature.getProperties();
+ attsCollector.push(feats);
});
+
+ const unique = attsCollector
+ .map(e => e['layer'])
+ // store the keys of the unique objects
+ .map((e, i, final) => final.indexOf(e) === i && i)
+ // eliminate the dead keys & store unique objects
+ .filter(e => attsCollector[e]).map(e => attsCollector[e]);
+
+ console.log(unique);
});
+
return map;
};
/*
diff --git a/web/js/palettes/model.js b/web/js/palettes/model.js
index 2a6f5575b..85e62adca 100644
--- a/web/js/palettes/model.js
+++ b/web/js/palettes/model.js
@@ -154,10 +154,10 @@ export function palettesModel(models, config) {
return 0;
}
};
+
/**
* Gets a single colormap (entries / legend combo)
*
- *
* @method get
* @static
* @param str {string} The ID of the layer
@@ -173,10 +173,10 @@ export function palettesModel(models, config) {
}
return self.getRenderedPalette(layerId, index);
};
+
/**
* Gets the legend of a colormap
*
- *
* @method getLegend
* @static
* @param str {string} The ID of the layer
@@ -189,10 +189,10 @@ export function palettesModel(models, config) {
var value = self.get(layerId, index, groupStr);
return value.legend || value.entries;
};
+
/**
* Gets the legend of a colormap
*
- *
* @method getDefaultLegend
* @static
* @param str {string} The ID of the layer