Tuesday, February 17, 2009

ESRI Geoprocessing in Google Earth

I've heard it for years: "Google Earth is great, no really, I love it, but....it's not analysis."

OK - I guess what you've been saying is that while hundreds of millions of people have downloaded Google Earth all around the world, and have used it to prepare for and respond to natural disasters, find drug farms , protect the rainforest , bring attention to and spatially explain the Crisis in Darfur, even do Imagery Intelligence Analysis - that all of this is "just qualitative analysis."

Tough crowd.....

So despite all of those things, I still hear that Google Earth isn't analysis, and this almost always comes from staunch GIS shops.

Hey, I understand - I'm a GIS guy too. I guess what you're getting at is that unlike the GIS systems you've always used, Google Earth is more of a Geospatial Exploration System, and you want to be able to do some qualitative analysis - some geospatial analytics.

Ah, maybe some Geoprocessing?

Geoprocessing is a GIS operation used to manipulate GIS data. A typical geoprocessing operation takes an input dataset, performs an operation on that dataset, and returns the result of the operation as an output dataset. Common geoprocessing operations include geographic feature overlay, feature selection and analysis, topology processing, raster processing, and data conversion. Geoprocessing allows for definition, management, and analysis of information used to form decisions.[1]

OK, so what if we could extend that Google Earth user experience to be able to leverage your current or future geoprocessing capabilities?

I first saw the potential for this, before coming to Google, when Jack Dangermond and John Hanke co-presented at Where 2.0 last May.

They showed a great little demo of the Google Earth client communicating with the ESRI ArcGIS Server, but you could tell the communication was a little bit of a kludge.

They were using the embedded browser and the center of the Google Earth ?BBOX= NetworkLink information to pull the demo off.

That was before the Google Earth API (3D Google Earth browser plugin) was released.

Now however, we can actually build this application utilizing simple JavaScript and capturing key user events, then passing these events as real geometries over to the ESRI ArcGIS Server JavaScript API and do it all right in the web browser!

Watch a short screencast of the application below:

I first started working on this back at GEOINT in November where I quickly hacked together a side-by-side example of the Google Earth API and the ESRI JSAPI , and then demoed some more refined progress last week at the Google Earth Enterprise User's Conference in D.C.

Durring that demo however, I was still unable to conduct the second required geoprocessing task on any drive-time-rings that were complex or that covered a large area - which was most of them.

It turns out, that there is a pretty significant limitation on geometries that you send Geoprocessing task queries on the ArcGIS Server if you're not running your application on the same server as the ESRI software.

It bombs out if the geometry in the query exceeds 2,000 characters (which is a browser limitation) and the only way around this currently is to complicate the ESRI JSAPI by deploying a proxy in ASP.Net or Java / JSP...

This is a shame, it really makes things more difficult than I'd like them to be for interacting with ArcGIS Server services - I don't think I should have to mess with Tomcat configurations to get things working...but alas, we do for now.

Ok, now off to the ESRI Federal User's Conference - I'll be demoing this application at the Google booth, so stop by and say hello and check it out and tell me how much you hate it in person :)

I promise to have some well commented source code and a link to try out the application up on Google Code ASAP!

Next up - Geoprocessing with some Open Geospatial tools on the backend.....stay tuned.


Jarlath O'Neil-Dunne said...

Impressive work sir!

Anonymous said...


Shame that the Google Maps API licence prevents commercial use, thereby rendering this functionality irrelevant for the not-not-for-profit sector.

Sean Wohltman said...

@Jarlath - Thanks buddy :)

@Anonymous, well, actually, there is a Google Earth Enterprise version of the plugin currently in beta...real beta, not just Google Beta - so anyone can take advantage of this capability.

I'd love non profits, state and local governments, etc to hook the free version up to their existing ArcGIS Servers -

Those that run commercial operations, or insist on running password protected sites, can purchase Google Earth Enterprise...

Mapdex said...

There is also a php proxy tou can download if you don't want to deal with .net or java.


As you mentioned, the url length restriction is a browser limitation. When you deal with geometries it is quite easy to eclipse the url length limit.