Katrina NOAA imagery WMS

Bill Binko bill at BINKO.NET
Sat Sep 10 02:24:14 EDT 2005


> All,
> 
> A whole bunch of open source GIS'ers (led by Norman Vine and John 
> Graham) have been working with the San Diego State University to put 
> a gigantic WMS of just about every bit of Katrina imagery together 
> that we can find.
> 
> See http://katrina.telascience.org

Howard,

Saw your link on IRC and followed it.  Very interesting and wonderful of 
you guys to donate your time.  I notice that you have a WorldWind 
interface available, and thought I'd help out by providing a Google Earth 
redirector for it.

This is based on http://chris.narx.net/?p=15 and I have had excellent luck 
with it.

I cannot test this evening my Windows box went to bed with my wife.  
However, it should be 99% of what you need: just put this on your site and 
enable PHP for the directory it lives in.  You might want to tweak the 
layers and such for the WMS portion.  Also, Google Earth seems not to like 
interlaced images (of any format).

You will know better than I how to tweak the WMS query string below, but I 
have found this very very useful.  On a Windows box, both FireFox and IE 
will launch GoogleEarth with this file which will ask if you want to add 
the Folder.  If you do, it will add an option to your "Places" list.

I hope this helps, and let me know if there's anything else I can do.

Bill

---CUT---

<?php
error_reporting(E_ALL ^ E_NOTICE);
$bbox = $_SERVER["QUERY_STRING"];
$kvp = explode("=",$bbox);
$coords = explode(",",$kvp[1]);
$width = 800;
$height = 600;

$name[0] = "Katrina";
$wms[0] = "http://wms.telascience.org/cgi-bin/KatrinaWMS2?VERSION=1.1.0&REQUEST=GetMap&SRS=EPSG:4326&WIDTH=".$width."&HEIGHT=".$height."&STYLES=&TRANSPARENT=true&FORMAT=image/gif&WRAPDATELINE=TRUE";

for ($i = 0; $i < sizeOf($wms); $i++ ) {
  $url[$i] = $wms[$i]."&".$bbox;
}
$kml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$kml .= "<kml xmlns=\"http://earth.google.com/kml/2.0\">\n";
$kml .= "<Folder>\n";
$kml .= "<description>Katrina Images</description>\n";
$kml .= "<name>Katrina WMS Live Feed</name>\n";
for ($i = 0; $i < sizeOf($wms); $i++ ) {
  $kml .= "<GroundOverlay>\n";
  $kml .= "<name>".$name[$i]."</name>\n";
  $kml .= "<visibility>0.5</visibility>\n";
  $kml .= "<Icon>\n";
  $kml .= "<href><![CDATA[".$url[$i]."]]></href>\n";
  $kml .= "</Icon>\n";
  $kml .= "<LatLonBox>\n";
  $kml .= "<north>".$coords[3]."</north>\n";
  $kml .= "<south>".$coords[1]."</south>\n";
  $kml .= "<east>".$coords[2]."</east>\n";
  $kml .= "<west>".$coords[0]."</west>\n";
  $kml .= "<rotation>0</rotation>\n";
  $kml .= "</LatLonBox>\n";
  $kml .= "</GroundOverlay>\n";
}
$kml .= "</Folder>\n";
$kml .= "</kml>\n";
echo $kml;
?>



More information about the mapserver-users mailing list