Please create an account to cast your vote and join our community!

Exporting JSON Mashup into KML to open in KML Viewers

The TNM Viewer uses a GeoServices REST Specification that ESRI submitted to the OWF. Its a nice beginning standard to a JSON-Version like the OGC Web Context Profile in XML.

In any case, since lots of viewers like Google Earth, Open Layers, Google Maps, Bing, and many ESRI Viewers reads KML, but not the JSON GeoServices Spec standard (yet), it may be easier to share the JSON Mashup as KML.

The following demo takes a JSON file created after making a mashup, runs a java parser built in eclipse. It deploys as a Web Archive (WAR) on any JAVA App server like Tomcat - and is not directly tied to the TNM Viewer - can be used in any viewer.

It takes the user-customized mashup JSON file output from the TNM Viewer, then converts it to KML. It takes the Basemap options and selected basemap, the zoom extent and location, and then takes the services groups, overlays, user-added content, which were turned on, any transparency and layer order settings and loads it into KML.

So, far it can handle REST and WMS, and plans should be able to support network linked KML and RSS - but not data KML unless network linked over a URL.

The attached presentation shows the beta efforts which USGS is looking to employ in FY12.

This effort is a result of the USGS Community for Data Integration efforts coordinated by:

Any Map, Application, Tool, Mashup, Viewer, etc. that uses The National Map or National Atlas data, services or tools in a new or innovative way - any Tool, Client, Map, Mobile, Crowdsourcing, augmented reality, 3D, etc.. This category is about applying technology for new uses.

Any Map, Application, Tool, Mashup, Viewer, etc. that uses The National Map or National Atlas data, services or tools that solves problems on a local, tribal, or regional project level in any domain (science, energy, emergency, recreation, health, land use or planning, etc.)