2008-02-07: Making KMZ Consoles
From Datafedwiki
Look for dynamic GE loading in WeatherBonk
[edit] Making a single layer console
parts:
loop.wsfl: Service that takes four services as parameters: init, calc, accu, done; and the time range parameter in ISO 8601 format. &time_range=2008-01-1/2008-01-03/P1D
init: url that returns the initial resource. In this case, a static kmz file, consoles/empty.kml. You can edit it with editfile.aspx. To use xslt generated dataset specific headers, replace consoles/empty.kml with ARC/KMZ_timeseries_header%26dataset_abbr%3dEMC_Model%26param_abbr%3dPM25
calc: is called in the loop and parameter &datetime= is passed in. If it's a WMS call, you can say &TIME=$(datetime). In this case, it makes one kmz image layer http://webapps.datafed.net/chain.wsfl?chain=ARC/EMC_Model/kmz.chain&datetime=2008-01-01
accu: receives resource from init as $(source) and from calc as $(target). In this case, it appends a time stamped image into the kmz.
done: service that receives the stuff after processing via parameter &done=. In this case, there is no postprocessing.
These single layers can be combined with google earth. Here's an example:
[edit] Using default Catalog views as image source
This console is saved in http://webapps.datafed.net/views/consoles/AIRNOW.pmfine_2007_Jun.kmz
In this case, calc is a url to our default view using service cgi.wsfl. Parameters:
dataset_abbr=AIRNOW
view_id=map
export_format=kmz
title=AIRNOW.pmfine
To use a saved out map_view, use
view_state=070512_FloridaSmoke/070512FloridaSmoke_map
or using page:
page=070512_FloridaSmoke/070512FloridaSmoke&view_id=map
[edit] Additional Parameters
The main processing service, ARC/EMC_Model/kmz.chain, contains publib parameters that can be set via the loop. For the chains under ARC/, like ARC/EMC_Model, they are: georect, lat+lon min+max and param_abbr
Here are EMC_Model consoles that use them all to make Northeast views:
Point datasets can use
symbol_depth=400
symbol_height=50
symbol_width=50
[edit] Other Datasets
Under ARC/ folder we have several datasets that are set up to cache one datetime KMZ files. So far working are: EMC_Model, NAAPS_Global, NAAPS_NoAm, OMI_AI_G, OnEarth_JPL, SURF_MET.
These work from the url as well
Next Coming: Point datasets & using any of our datasets with map view &export_format=kmz
[edit] Important URL encodings.
If you pass a parameter via url, you must encode these. The rest can be encoded, but they don't really matter.
'?' : %3f
'=' : %3d
'%' : %25
'&' : %26
[edit] THE REST IS OUTDATED AND WILL BE DELETED IN THE NEAR FUTURE
It still works if you replace 'webapps.datafed.net' with 'datafed2.seas.wustl.edu/dvoy_services'
[edit] Making Consoles for Google Earth
Start with this URL:
Edit parameter &name=GaFlSmoke, it will be shown in GE tree view
Open http://webapps.datafed.net/editfile.aspx
Open file consoles/SoCalSmoke.html Change the text "Southern California Smoke 2007-10-20/2007-10-28" to your preference. Save file as "MyConsole.html"
Edit parameter &desc=consoles/GaFlSmoke.html to &desc=consoles/MyConsole.html
Edit &datetime=2007-04-17/2007-05-04/P1D to your range
Append '-' in front of every state you want invisible like
view_states=ARC/AIRNOW/pmfine_KMZ,-ARC/AIRNOW/super_KMZ
pmfine will be visible, super will not
Add parameter &save=consoles/MyConsole.kmz to save it in the server
Query the url in firefox. It's a slow process, so you should test first with a few days only.
Your're done Open url http://webapps.datafed.net/views/consoles/MyConsole.kmz
[edit] If you want to edit the console
Open the .kmz in GE. Edit it to your hearts content.
Save the .kmz as a file and upload to datafed. No web access yet, sorry.
All the page settings and KMZ making settings are in the views/ARC subdirectories. use editfile.aspx to change the KMZ settings and datafed.aspx File/open page to change view settings.
[edit] If you change the view settings:
You must invalidate the cache by adding parameter &action=save. remove other views to avoid refreshing them too!
To change AIRNOW.super settings:
Use editfile.aspx to edit ARC/AIRNOW/super_KMZ.xml
[edit] Where Are We Going: Improvements to the KMZ Console Maker
All of the KMZ presentations have been inserted into a KMZ directory on the vigor server. These KMZs have been reviewed for errors and improvements in the KMZ console maker and the metadata stylesheet. The following issues should be addressed in the following weeks:
- The folder holding all of the datasets in the KMZ has a description that shows logos of only NASA and Datafed.
I'll fix this now, but we need to move the console document snippet to vigor also so anybody can edit them. --Hoijarvi
- In Globchem.kmz, the G5FCST dataset shows no metadata and all pictures are the same.
G5FCST Is not registered in wiki, so no metadata. I'll email Erin. Also the server seems to be broken, I cannot get even the existing time. I'll investigate. --Hoijarvi
- The xsl file that transforms the RDF feed from the esipwiki has several problems
- The DataSpace, Dataset Talk, and DataFed Wiki links do not point to where they should
- The descriptions of the datasets can cause a strange clumping of the bottom half of the metadata description. This should be adjusted so that no matter how long or short the dataset description, the metadata will look the same.
I Peeked into it, it's an xslt issue, Email to Jon --Hoijarvi
The first problem regarding the xsl file has been fixed --MarkK
[edit] Dynamic Data LaYers in GoogleEarth
Probably the greatest technological advance in Google Earth is the patent pending Network Link(TM) mechanisms described by Google's Keyhole Markup Language(TM) specification. These Network Links allow individuals, businesses, governments, and other organizations to easily publish dynamic geospatial data layers and have them seamlessly integrated into the unified Google Earth environment where it will be seen by millions of users as they search the globe.
On a GoogleEarth related note, GoogleEarth sets its time ranges for animations based on all the files that have been loaded in the session. Restricting the time cursor to currently selected folder fixes this problem, but in order to view datasets simultaneously, the father folder of all the datasets must be selected.
