Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[stem-dev] STEM Feature for single KML file animation -- Dev Questions

Hello all,

I've gotten some of the new KML features working in STEM. The interesting part is you can import STEM animations directly to Google Earth -- without Servlets, webserver, etc. All you need is the single KML output file.

Screenshot of new STEM KML animation Feature:
http://www.operonlabs.com/sites/default/files/field/image/stem-kml1.png

====

Questions for STEM Developers:

A. Where is the 'county' population data stored? For example, how do I go from a key like 'US-NY-36039' (county identifier) to retrieve the original population in the county and the current population in the county at a time-step? (to determine number of fatalities , or total number of Infections as an absolute value rather than percent).

B. Where can I find a simulation's actual 'start' and 'end' dates in String or DateTime format? What object and where is it?

C. Why is my simulation's 'cycle' counter jumping around at the beginning? It starts at cycle=0, then goes to cycle=2, then to cycle=7,8,9,10 etc?

D. Is there a 'proper' way to go about scaling an 'I' value to a polygon color? Should I just use the Aspect object? Any tips on this?

E. Are there any known bugs with the GE Servlet stuff? I'm getting some Servlet exceptions (can't connect to local web server). Is this feature broken (the network pipe)? It's not important -- just curious.

F. Why are there multiple classes which seem to be involved in writing KML files... What is the difference between KmlDisplay, KmlDisplayCustom, and KmlDisplaySelection? Is any of this functionality deprecated?

====

Here's what I've done on my local dev branch.

1. Added an Eclipse Google Earth logging option to write a STEM simulation to a single KML file. Now natively supports animations by double-clicking on KML file.

2. The single KML file is iteratively written during a simulation run. The KML file is in a newer format , written with new functions, so it is closely compatible with the Google Earth XML schema.

3. The KML file includes Placemarks which are labeled at the County level with time-stamped SEIR data.

4. KML Polygon Coloring (manually coded styles) works in Google Earth ... TODO: New KML coloring needs to be connected with Aspect prefs.

5. TimeSpan was added for each Placemark. Thus, once loaded into Google Earth, the KML file result of a STEM Simulation can be 'played' back at different speeds. Currently, the TimeSpan is just the previous to current iteration number.

6. The functionality works pretty well. The only issue is that a full 2 Year Continental U.S. Ebola simulation at county level results in lots of polygons, and a HUGE KML file (>250 MB). Compressing the KML to KMZ with winzip reduces the file size to about 10-30 MB, which is reasonable. There is, however, lots of data redundancy because the County-level Polygon coordinates need to be written (duplicated) for each time step in the simulation. This is a limitation of KML.

Even still, I was able to import a full continental US level simulation into Google Earth without too much of a problem on a modern core i7 laptop.


Back to the top