English 中文(简体)
KML + Google Earth: Big complex overlay with timeline selector?
原标题:

Got a question regarding overlays and timelines in Google Earth (or possibly other KML-friendly clients).

I have data for every minute of the day for a given day that represents a numeric value for various areas on the map, and I want to display that data in a manner that looks basically like a weather radar map. So, for each minute, I basically have a big list of lat/lon bounding boxes, each of which has an associated numeric value; the display would involve drawing a polygon over the bounded area, and the polygon s color would depend on that numeric value.

I can see many ways of doing this for a single moment in time; either build a PNG with something like ImageMagick for the entire map area and overlay the bitmap, or draw the polygons directly on the map... the question, though, is how I can set this up so a time range can be selected by the user, and all the overlays which fit within that time range will all be displayed. And it has to be as responsive as possible, so efficiency is key.

It would be possible to pre-render lots and lots of PNG files, one for each time slice, for example; or would it be better to use polygons, or ... ?

Finally - is Google Earth the best client for this? Or would I maybe be better off with something else?

Thanks!!

最佳回答

The Open Geospatial Consortium WMS standard for serving maps defines support for a TIME parameter, which allows support for temporal requests. WMS services providing this support are known as WMS-T. As far as I know, of the Open Source map servers only Mapserver and partially Geoserver provide support for WMS-T (I may be very wrong with this, as I speak only from personal experience). Check this page to get all the details on setting up a WMS-T service:

http://mapserver.org/ogc/wms_time.html

You can easily see how the request work having a look at this URLs:

http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=true&FORMAT=image%2Fpng&TIME=2005-08-29T13%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90,22.5,-67.5,45&WIDTH=256&HEIGHT=256

Note how the TIME parameter changes from 2005-08-29T13%3A00%3A00Z to 2005-08-30T13%3A00%3A00Z (Times are formatted according to the ISO 8601 specification).

http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=true&FORMAT=image%2Fpng&TIME=2005-08-30T13%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90,22.5,-67.5,45&WIDTH=256&HEIGHT=256

On the client side, although Google Earth can act as WMS client I don t think it supports temporal dimension on WMS requests. On the other hand, building a web client that supports them is really easy with OpenLayers, an open source Javascript web mapping framework, as you can see in the following example:

http://dev.openlayers.org/releases/OpenLayers-2.8/examples/wmst.html

Hope this give you some clues.


Edit: You can define multiple time values, a single range or multiple ranges. For instance, for a single range the URL will be:

http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r-t.cgi?LAYERS=nexrad-n0r-wmst&TRANSPARENT=true&FORMAT=image%2Fpng&TIME=2005-08-30T13%3A00%3A00Z/2005-09-01T13%3A00%3A00Z&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A4326&BBOX=-90,22.5,-67.5,45&WIDTH=256&HEIGHT=256

Note the TIME parameter being 2005-08-30T13%3A00%3A00Z/2005-09-01T13%3A00%3A00Z

问题回答

The time features of KML are well documented and include time span. I would recommend that you try using both vector and image based methods depending on how close in the user is zoomed:

  • When the user is zoomed out (small scale) lots of cells will need to be drawn, making it more efficient to use an image. The PNGs could be packaged up in a kmz file, which is just a zipped directory.
  • When the user is zoomed in close (large scale) fewer cells will need to be drawn making vector the most efficient method. Google Earth can plot a large number of vectors, without much trouble but there are limits.

Google Earth is fantastic as a General Purpose viewer which is very very user friendly. However, the time series tools are more complicated so it will depend on the sophistication of your users. How applicable it is to your project depends on the type of data you have and the sort of output you want. You may get better results using flash.





相关问题
anything better than bounding boxes?

I have a scenario, where I have x million longitude latitude points. When a new long/lat point is added I want to know efficiently which other points are within a user configured distance parameter, ...

how to create image from gis data in C#

I m using C# to pull spatial data from a sql server 2008 database. I m then trying to perform operations on that data, but to start... I want to be able to visualize it. That is, I would like to ...

java api for simple gis computations

I am trying to develop some simple location logic in the server-side portion of a java servlet-based webapp. There are really just two operations that I m interested in: Given a start point (lat/...

does anyone know a good mapinfo forum?

I m new using mapinfo and I am going to work a lot with it. I haven t been able to find a good forum, making it impossible to get community driven assistance. I wish any of you could tell me if there ...

Determining visible area from globe frustum

I m working with a mapping application (worldwind) and trying to determine the minimum and maximum latitudes and longitudes that are currently displayed. I have access to the frustum, but I m not sure ...

热门标签