Implement common Geometry Service operations in an HTML5 web worker process

591
2
09-22-2011 03:47 AM
Status: Open
SamLarsen1
New Contributor III
Better responsiveness of mobile JavaScript API apps.

Some commonly used geometric operations could be written in JavaScript and used in an HTML5 web worker process.  This could be very useful for mobile web apps by reducing slow http://dev.opera.com/articles/view/web-workers-rise-up/"king mobile apps more responsive.  These could be created as a seperate set of widgets which can be requested on a 'per geometric operation' basis by apps which use the JavaScript API compact build, thus keeping the http://dev.opera.com/articles/view/web-workers-rise-up/"tline the web worker process:
http://dev.opera.com/articles/view/web-workers-rise-up/
http://www.sitepoint.com/javascript-threading-html5-web-workers/
http://www.sitepoint.com/javascript-large-data-processing/
http://www.sitepoint.com/javascript-shared-web-workers-html5/

A typical example could be the buffer operation:
1) User clicks a point and wants to perform a search for all related locations within 1km.
2) Instead of creating a 1km buffer via the geometry service and waiting for the polygon to be sent back in a response, the app could create the buffer itself thus eliminating the HTTP request for this step.
3) The resulting buffer is then used to query either graphics on the map or a REST query for a map service.
The above workflow would reduce the need for a 'synchronous' request to the Geometry Service and (depending on the level of connectivity) could result in a much more responsive process.
2 Comments
SamLarsen1
Also, another key requirement for me is working with projections in mobile JavaScript apps.
When working with British National Grid, i need to project my 'geolocation' each time i access it.  This is a big problem when i have to send a request back to the Geometry Service.  It would be fantastic if i could get a Geometry Service Web Worker which does a projection from one to the other.  I am sure this is also a requirement for many others who want to use their own projections in mobile web apps.
DanielBaternik
Excellent suggestion, was about to post the same idea when i saw this.

The geometry service is not as scalable as client side geometric operations. It needs to be re-implemented on the client. HTML5 worker processes are a great suggestion.

This is a must have to ensure highly efficient web GIS systems.