🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■ ■
    RIT.js
    skipped 2 lines
    3 3  // Most of the RFI caused by ground-based systems are military radars
    4 4  // Investigating the spatial and temporal characteristics of the signal can yield information on the deployment of military radar systems
    5 5   
     6 + 
    6 7  // Below is an overview of the 10 sections
    7 8   
    8 9  // 1. Load Data
    skipped 35 lines
    44 45  var vhA = vh.filter(ee.Filter.eq("orbitProperties_pass", "ASCENDING"));
    45 46  var vhD = vh.filter(ee.Filter.eq("orbitProperties_pass", "DESCENDING"));
    46 47   
    47  -//print(ee.Date(vhD.first().get('system:time_start')))
    48  -print(vhD.filter(ee.Filter.eq("platform_number", "A")).first());
    49 48  // --------------------- Step 2: Configure Map --------------------------------
    50 49   
    51 50  // Create the main map
    skipped 54 lines
    106 105   
    107 106  // Get keys from dictionary
    108 107  var selectItems = Object.keys(layerProperties);
     108 +var defaultLayer = 1;
    109 109   
    110  -// Create dropdown menu to toggle between imagery aggregated at different timescales
    111  -var layerSelect = ui.Select({
    112  - items: selectItems,
    113  - value: selectItems[1],
    114  - onChange: function (selected) {
    115  - // Loop through the map layers and compare the selected element to the name
    116  - // of the layer. If they're the same, show the layer and set the
    117  - // corresponding legend. Hide the others.
    118  - mapPanel.layers().forEach(function (element, index) {
    119  - element.setShown(selected == element.getName());
     110 +// Create dropdown menfu to toggle between imagery aggregated at different timescales
     111 +var layerSelect = ui
     112 + .Select({
     113 + items: selectItems,
     114 + onChange: function (selected) {
     115 + // Loop through the map layers and compare the selected element to the name
     116 + // of the layer. If they're the same, show the layer and set the
     117 + // corresponding legend. Hide the others.
     118 + mapPanel.layers().forEach(function (element, index) {
     119 + element.setShown(selected == element.getName());
    120 120   
    121  - var dict = {
    122  - Day: "daily",
    123  - Month: "monthly",
    124  - Year: "yearly",
    125  - };
     121 + var dict = {
     122 + Day: "daily",
     123 + Month: "monthly",
     124 + Year: "yearly",
     125 + };
    126 126   
    127  - // Add a line that provides information on the level of aggregation of the imagery currently being shown
    128  - image_info.setValue(
    129  - "You are currently viewing " +
    130  - dict[selected] +
    131  - " Sentinel-1 imagery from "
    132  - );
    133  - });
    134  - },
    135  -});
     127 + // Add a line that provides information on the level of aggregation of the imagery currently being shown
     128 + image_info.setValue(
     129 + "You are currently viewing " +
     130 + dict[selected] +
     131 + " Sentinel-1 imagery from "
     132 + );
     133 + });
     134 + },
     135 + })
     136 + .setValue(selectItems[defaultLayer]);
    136 137   
    137 138  // --------------------- Step 5: Create Opacity Slider --------------------------------
    138 139   
    skipped 23 lines
    162 163   
    163 164  // Get date range for Sentinel-1 imagery, backdate current date by one week to ensure imagery is available
    164 165  var start = ee.Date(sentinel1.first().get("system:time_start"));
    165  -var now = ee.Date(Date.now()).advance(-1, "week");
     166 +var now = ee.Date(Date.now()); //.advance(-1, "week");
    166 167   
    167 168  // Format date to display it to the user
    168 169  var date = ui.Label(now.format("MMMM dd, YYYY").getInfo());
    skipped 63 lines
    232 233  };
    233 234   
    234 235  // Create dateSlider to trigger the function Slide function
    235  -var dateSlider = ui
    236  - .DateSlider({
    237  - start: start,
    238  - end: now,
    239  - value: null,
    240  - period: 1,
    241  - onChange: slide,
    242  - style: { height: "0px" },
    243  - })
    244  - .setValue(now);
     236 +var dateSlider = ui.DateSlider({
     237 + start: start,
     238 + end: now,
     239 + value: null,
     240 + period: 1,
     241 + onChange: slide,
     242 + style: { height: "0px" },
     243 +});
    245 244   
    246 245  // --------------------- Step 7: Create RFI Chart --------------------------------
    247 246   
    skipped 6 lines
    254 253  // Generates a new time series chart of RFI for the given coordinates.
    255 254  var generateChart = function (coords) {
    256 255   // Update the lon/lat panel with values from the click event.
     256 + ui.url.set("lon", coords.lon.toFixed(4));
     257 + ui.url.set("lat", coords.lat.toFixed(4));
     258 + ui.url.set("zoom", mapPanel.getZoom());
     259 + 
    257 260   var latlonStr = coords.lat.toFixed(2) + ", " + coords.lon.toFixed(2);
    258 261   
    259 262   latlon.setValue("Coordinates: " + latlonStr);
    skipped 31 lines
    291 294   inspectorPanel.widgets().set(3, rfiChart);
    292 295   var getDate = function (callback) {
    293 296   dateSlider.setValue(ee.Date(callback));
     297 + ui.url.set("date", ee.Date(callback).format().getInfo());
     298 + print(ee.Date(ee.Date(callback).format().getInfo()));
     299 + 
     300 + var now = ee.Date(callback);
    294 301   };
    295 302   rfiChart.onClick(getDate);
    296 303  };
    skipped 161 lines
    458 465  // Dimona Radar Facility
    459 466  var loc2_function = function () {
    460 467   var lab1 = ui.Label(
    461  - 'Located in Israel\'s Negev Desert, the Dimona Radar Facility is a "top-secret X-band radar staffed by around 120 American technicians".',
     468 + "Located in Israel's Negev Desert, the Dimona Radar Facility is an X-band radar operated by the U.S. Military.",
    462 469   {},
    463  - "http://content.time.com/time/world/article/0,8599,1846749,00.html"
     470 + "https://web.archive.org/web/20081009203106/http://afp.google.com/article/ALeqM5gJP55YHdqMPMI7rhCh3tZCGxl0Pw"
    464 471   );
    465 472   var lab2 = ui.Label(
    466  - "The radar can monitor the take-off of any aircraft or missile up to 1,500 miles away, which would give Israel an extra 60-70 seconds to react if Iran fired a missile. The radar is so powerful that Israeli officials feared that RFI would impact the accuracy of anti-tank missiles being tested nearby."
     473 + "Though the point is centered on these large radar antennae, an X-band radar would probably not interfere with Sentinel-1's C-band instrument. The actual source of the observed RFI seems to be Israel's Negev Nuclear Research Center, \"a top-secret military site where Israel is widely believed to have developed the only nuclear arsenal in the Middle East\", located in the same valley just a few kilometers to the north. The radar was installed in 2008 to provide early warning against possible Iranian missile attacks. "
    467 474   );
    468 475   var lab3 = ui.Label(
    469  - "Though the point is centered on the large X-band radar antenna, the actual source of the observed RFI seems to be Israel's Negev Nuclear Research Center, located in the same valley just a few kilometers to the north. The RFI Graph above shows consistent and strong interference since 2017."
     476 + "The RFI Graph above shows consistent and strong interference since 2015."
    470 477   );
    471 478   
    472 479   configureExample([lab1, lab2, lab3], 0.8);
    skipped 111 lines
    584 591  mapPanel.onClick(generateChart);
    585 592   
    586 593  // Configure the map.
    587  -mapPanel.setOptions("Satellite");
     594 +mapPanel.setOptions("Hybrid");
    588 595  mapPanel.style().set("cursor", "crosshair");
    589 596   
    590 597  // Initialize with a test point.
    591 598  var initialPoint = ee.Geometry.Point(49.950656, 26.605644);
    592  -mapPanel.centerObject(initialPoint, 11);
     599 + 
     600 +var lon = ui.url.get("lon", -9999);
     601 +var lat = ui.url.get("lat", -9999);
     602 +var zoom = ui.url.get("zoom", -9999);
     603 +var urldate = ui.url.get("date", -9999);
     604 + 
     605 +if (lon != -9999 && lat != -9999) {
     606 + mapPanel.setCenter(lon, lat, zoom);
     607 + var now = ee.Date(urldate);
     608 + //var date= ui.Label(urldate.format("MMMM dd, YYYY").getInfo());
     609 + var initialPoint = ee.Geometry.Point(lon, lat);
     610 +} else {
     611 + // defauilt location
     612 + mapPanel.centerObject(initialPoint, 11);
     613 +}
     614 + 
     615 +//mapPanel.centerObject(initialPoint, 11);
    593 616   
    594 617  // Add all of the modules created above to the User Interface Panel
    595 618  inspectorPanel.add(intro);
    596  -inspectorPanel.add(dateSlider);
     619 +inspectorPanel.add(dateSlider.setValue(now));
    597 620  inspectorPanel.add(ui.Panel([latlon], ui.Panel.Layout.flow("horizontal")));
    598 621  inspectorPanel.add(ui.Label("placeholder"));
    599 622  inspectorPanel.add(
    skipped 29 lines
    629 652  // Optional: add country outlines
    630 653  // mapPanel.layers().set(5, country_layer)
    631 654   
    632  -// Add imagery aggregated by month by default.
    633  -mapPanel.layers().get(1).setShown(true);
    634  - 
Please wait...
Page is in error, reload to recover