<?php
require_once "../../../config/settings.inc.php";
require_once "../../../include/myview.php";
$t = new MyView();
$t->title = "Gibson Ridge Placefiles";
$t->content = <<<EOM

<h3>IEM Data in Gibson Ridge Placefile format</h3>

<p>
<a href="https://grlevelx.com">Gibson Ridge Software</a> develops
a very popular set of RADAR data visualization programs.  These placefiles
can be freely used for educational use.  Use of the non government data
"on-air" by media is strictly not allowed without permission of the
provider.
</p>

<div class="row">
<div class="card card-body">
<div class="col-sm-12">

<h3>Placefile Range Ring Generator</h3>
<form method="GET" action="/cgi-bin/request/grx_rings.py" name="rings">

<p>Contributed by Zach Hiris, this generates a static placefile with range
rings specified at the given distance for a point.
<a class="btn btn-secondary" href="/cgi-bin/request/grx_rings.py?help">
<i class="bi bi-file-text" aria-hidden="true"></i> Backend documentation</a> for those wishing to
use this service in their own applications.
</p>

<div class="row">
<div class="col-sm-4">
<strong>Location Label:</strong><br />
<input type="text" name="loc" value="My Location">
</div>
<div class="col-sm-4">
<strong>Latitude (degrees N)</strong>
<input type="text" name="lat" value="42.00">
</div>
<div class="col-sm-4">
<strong>Longitude (degrees E)</strong>
<input type="text" name="lon" value="-94.33">
</div>
</div>


<table class="table">
<thead><tr><th>Ring</th><th>Miles</th><th>Label (use \\n for line feed)</th><th>Red (0-255)</th><th>Green (0-255)</th>
<th>Blue (0-255)</th><th>Alpha (0-255)</th></tr></thead>

<tbody>
<tr>
  <td>1</td>
  <td><input type="text" size="5" maxlength="5" name="m0" value="100"></td>
  <td><input type="text" size="40" name="t0" value=""></td>
  <td><input type="text" size="5" maxlength="3" name="r0" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="g0" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="b0" value="0"></td>
  <td><input type="text" size="5" maxlength="3" name="a0" value="255"></td>
  </tr>
<tr>
  <td>2</td>
  <td><input type="text" size="5" maxlength="5" name="m1" value="0"> (0 disables)</td>
  <td><input type="text" size="40" name="t1" value=""></td>
  <td><input type="text" size="5" maxlength="3" name="r1" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="g1" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="b1" value="0"></td>
  <td><input type="text" size="5" maxlength="3" name="a1" value="255"></td>
  </tr>
<tr>
  <td>3</td>
  <td><input type="text" size="5" maxlength="5" name="m2" value="0"> (0 disables)</td>
  <td><input type="text" size="40" name="t2" value=""></td>
  <td><input type="text" size="5" maxlength="3" name="r2" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="g2" value="255"></td>
  <td><input type="text" size="5" maxlength="3" name="b2" value="0"></td>
  <td><input type="text" size="5" maxlength="3" name="a2" value="255"></td>
  </tr>

</table>
</table>

<p>Download Filename: <input type="text" name="fn" value="placefile_rings.txt"></p>

<input type="submit" value="Generate Placefile">
</form>
</div>
</div>

<p>
<table class="table table-striped">
        <thead><tr><th>v3 Support</th><th>Title</th><th>Description</th></tr></thead>
<tr>
  <td>No</td>
  <th><a href="iadot_trucks.txt">Iowa DOT Truck Locations</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/iadot_trucks.txt<br />
  <i>Notes:</i>  Locations of Iowa DOT Snow Plows.</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="roadcond.php">Iowa Winter Road Conditions</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/roadcond.php<br />
  <i>Notes:</i>  Observations provided by the Iowa State Patrol.</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="asos.php">Iowa ASOS Data</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/asos.php<br />
  <i>Notes:</i>  none at this time</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="rwis.php">RWIS Data</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/rwis.php?network=IA_RWIS<br />
  <i>Notes:</i> Provide the proper network code to get other state's
  RWIS data.  Not all states openly report their RWIS information!</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="webcams.php?overview">IEM Webcam Overview</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/webcams.php?overview<br />
  <i>Notes:</i>  This layer provides the locations and direction
that the webcam is looking.  <b>This layer should be used along with the
individual network layers...</b> There aren't bandwidth concerns with this
layer.</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="webcams.php?network=KCCI">KCCI-TV Webcams</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/webcams.php?network=KCCI<br />
  <i>Notes:</i>  You will not want to use this on a low bandwidth
connection as all of the webcam images are loaded every 1-5 minutes.  Please
only use this layer when you are using the data!  Thanks...</td>
</tr>
<tr>
  <td>No</td>
  <th><a href="webcams.php?network=KCRG">KCRG-TV Webcams</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/webcams.php?network=KCRG<br />
  <i>Notes:</i>  You will not want to use this on a low bandwidth
connection as all of the webcam images are loaded every 1-5 minutes.  Please
only use this layer when you are using the data!  Thanks...</td>
</tr>

<tr>
  <td>Yes</td>
  <th><a href="l3attr.txt">NEXRAD Level3 Attributes</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/l3attr.txt<br />
  <i>Notes:</i> This is a placefile of the level3 NEXRAD storm attributes. This
may be useful when looking at level2 data.  You can optionally pass a nexrad
        3 character ID to limit the display to a certain NEXRAD. ie)
        <code>l3attr.txt?nexrad=DMX</code>.  Otherwise, the service will utilize the
        longitude and latitude passed to the server by the Gibson Ridge Client
        to limit the displayed attributes.

    <br /><strong>Additional Query Parameters</strong>: You can provide additional
    URL parameters to limit the returned attributes. For example,
    <code>l3attr.txt?tvs</code> will only return attrs with TVS flagged.
    <code>l3attr.txt?poh=50</code> will only return attrs with a probability of
    hail at least of 50%.  The third option is <code>l3attr.txt?meso=4</code>
    will return attrs with at least a MESO value of 4.  A fourth option is to
    limit the max_size of hail via <code>l3attr.txt?max_size=1</code>.
    You can combine these
    all in any order if you want along with the <code>nexrad</code> value.</td>
</tr>

<tr>
  <td>No</td>
  <th><a href="watch_by_county.php">SPC Watch by County</a></th>
  <td>{$EXTERNAL_BASEURL}/request/grx/watch_by_county.php?<br />
  <i>Notes:</i> This is a placefile of the union of counties within a
  Storm Prediction Center watch.  You can optionally pass an option
  <code>alpha=255</code> to set the alpha value for the used color.  This value
  is a number between 0 and 255. The
  service uses the official NWS colors for Severe Thunderstorm Watch (#DB7093)
  and Tornado Watch (yellow).</td>
</tr>

<tr>
  <td>No</td>
  <th><a href="time_mot_loc.txt">NWS Warning TIME...MOT...LOC</a> (TOR)</th>
  <td>{$EXTERNAL_BASEURL}/request/grx/time_mot_loc.txt?<br />
  <i>Notes:</i> This provides lines indicating the path of travel for
  tornado warnings based on the coding within the warning.</td>
</tr>

<tr>
  <td>No</td>
  <th><a href="time_mot_loc.txt?all">NWS Warning TIME...MOT...LOC</a> (TOR+SVR)</th>
  <td>{$EXTERNAL_BASEURL}/request/grx/time_mot_loc.txt?all<br />
  <i>Notes:</i> This provides lines indicating the path of travel for
  tornado and severe thunderstorm warnings based on the coding within the warning.</td>
</tr>

<tr>
  <td>No</td>
  <th><a href="time_mot_loc.txt?all&amp;valid=2020-05-25T00:00Z">NWS Warning TIME...MOT...LOC (Historical)</a> (TOR+SVR)</th>
  <td>{$EXTERNAL_BASEURL}/request/grx/time_mot_loc.txt?all&valid=2020-05-25T00:00Z<br />
  <i>Notes:</i> Provides any TIME...MOT...LOC tracks for a four hour window of
  time around the given UTC timestamp.  This uses the Gibson Ridge
  <code>TimeRange</code> option to sync the data with RADAR display.  You'd have
  to manually add this placefile for each four hour window of time you have interest
  in!</td>
</tr>

</table>
EOM;
$t->render('single.phtml');
