off topic: earth.google.com

Brent Fraser bfraser at GEOANALYTIC.COM
Sat Jul 23 16:25:10 EDT 2005


Daniele,

  Google uses KML (Keyhole Markup Language, a XML-ish text format) to
define the data source (and it can optionaly hold geometry).  See
http://www.keyhole.com/kml/kml_doc.html and
http://www.keyhole.com/kml/kml_tut.html for details.

    Yes you can overlay data but unless you buy Google Earth Pro + GIS
data module, you must convert the data to KML.  Note that there is a
"binary" version known as KMZ, which is simply a zip file of KML.

    As for styling, the KML doc covers some of that, but I haven't tried
it yet.

The steps for connecting a WMS server are:

1. Create a WMS server able to serve data in Geographic WGS84 (EPSG:4326)
2. Write a "shim"/"reflector" script on a web server to act as a
translator between WMS and KML
3. Using Google Earth, do Add -> Network Link, and give the URL of your
script in the "Location" text box (e.g.
http://myserver.mydomain.com/mykml.asp).  Be sure to set the View-Based
Refresh setting to "After the Camera Stops"

Here's a ASP/VBScript version of the script (you'll need to set your own
values for the wms variable):

<%
bbox = Request.QueryString("BBOX")

coords = split(bbox,",")
wms =
"http://myserver.mydomain.com/mycgi.asp?VERSION=1.1.1&SERVICE=WMS&REQUEST=GetMap&STYLES=&FORMAT=image/jpeg&SRS=EPSG:4326&LAYERS=LAYER1&WIDTH=1024&HEIGHT=1024&BGCOLOR=0xFFFFFF&EXCEPTIONS=application/vnd.ogc.se_xml"

names = "My WMS"

response.ContentType = "application/vnd.google-earth.kml+xml"

url = wms + "&bbox=" + bbox
response.write("<Folder>")
response.write("<name>"+names+"</name>")
response.write("<drawOrder>"+i+"</drawOrder>")
response.write("<GroundOverlay>" + VBcrlf)
response.write("<Icon>" + VBcrlf)
response.write("<href>")
response.write("<![CDATA["+url+"]]>")
response.write("</href>" + VBcrlf)
response.write("</Icon>" + VBcrlf)
response.write("<LatLonBox>" + VBcrlf)
response.write("<north>")
response.write(coords(3))
response.write("</north>" + VBcrlf)
response.write("<south>")
response.write(coords(1))
response.write("</south>" + VBcrlf)
response.write("<east>")
response.write(coords(2))
response.write("</east>" + VBcrlf)
response.write("<west>")
response.write(coords(0))
response.write("</west>" + VBcrlf)
response.write("</LatLonBox>" + VBcrlf)
response.write("</GroundOverlay>" + VBcrlf)
response.write("</Folder>")

%>

The above example is a modified version of James Macgill's posted at
http://bbs.keyhole.com/ubb/showthreaded.php/Cat/0/Number/37249/an/0/page/10#37249

Have fun!

Brent Fraser

> You said:
> 9. You can overlay data (vectors and raster) from your computer.
> 10. You can connect to web data sources (like WMS with about 10 lines of
> server-based scripting).
>
> So, how can overlay data? Can I overlay a shape file? How can I define
> colour, labels, and so on (as in a Mapserver mapfile)?
>
> And how can I connect to a web data source like WMS?
> I have a webserver with Mapserver configured for WMS/WFS requests, how
> can I tell Google Earth to connect to my Mapserver?
>
> 	Daniele
>
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Brent Fraser
> Sent: Friday, July 22, 2005 4:58 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] off topic: earth.google.com
>
>
> Flavio,
>
>   Google Earth (not to be confused with Google Maps) is more than just
> mind blowing.  In my business (Satellite imagery sales and service) it's
> world shaking.
>
> The top ten things I like about Google Earth:
>
>  1. It's free, with upgrades for a fee.
>  2. The entire world (almost) is covered with pan-sharpened Landsat (15m
> pixels).  3. All (most?, some?) of Digital Globe's Quickbird imagery is
> shown (0.6m pixels).  4. The user-interface is dead simple.  5. The
> fade-in/fade-out of vectors and annotation on zooming is great.  6. The
> performance fantastic (like streaming video).  7. It's 3d. You can tilt
> the world and fly thought canyons.  8. It's even more 3d. It will render
> 3d objects such as buildings.  9. You can overlay data (vectors and
> raster) from your computer. 10. You can connect to web data sources
> (like WMS with about 10 lines of server-based scripting).
>
> The application: http://earth.google.com (after install, do View -> Play
> Tour)
> The community: http://bbs.keyhole.com
>
>
> Brent Fraser
>
>
> ----- Original Message -----
> From: "Flavio Hendry" <flavio at TYDAC.CH>
> To: <MAPSERVER-USERS at LISTS.UMN.EDU>
> Sent: Thursday, July 21, 2005 11:55 PM
> Subject: [UMN_MAPSERVER-USERS] off topic: earth.google.com
>
>
>> hi all
>>
>> as google is obviously a hot issue, have a look at
> http://earth.google.com/.
>>
>> just mindblowing.
>>
>> Mit freundlichem Gruss / Best Regards
>> Flavio Hendry
>>
>> ----------------------------------------------------------------
>> TYDAC NEWS http://www.tydac.ch/german/index.php?menu=News_actual
>> ----------------------------------------------------------------
>> ############      Mit freundlichen Gruessen / Kind Regards
>> ############             mailto:flavio at tydac.ch
>> ############         TYDAC AG - http://www.tydac.ch
>> ####    ####        Geographic Information Solutions
>> ####    ####         Luternauweg 12 -- CH-3006 Bern
>> ############   Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
>> ----------------------------------------------------------------
>



More information about the mapserver-users mailing list