Concurrent Web Map Cache Server: A “Web 2.0 Meets SOA” Case Study Zao Liu, Marlon Pierce, Sunghoon Ko, Geoffrey Fox Community Grids Laboratory Indiana University & Neil Devadasan Polis Center Indiana University Purdue University Indianapolis
Google Maps provide a highly interactive user interface and capabilities (geolocations, directions)
But GIS services have much more detailed local information.
Indiana has orthophotography with much higher zoom levels than Google maps.
Local county servers have many interesting map layers not in Google
Parcels/property lines, school district lines
And these tie into feature services with interesting data like pinpoint addresses, tax assessments, etc.
So obviously it makes sense to adopt the Google approach but enhance it with local data.
Ultimately we hope to ties this into representations of scientific data generated on the Grid.
Browser + Google Map API Cass County Map Server (OGC Web Map Server) Hamilton County Map Server (AutoDesk) Marion County Map Server (ESRI ArcIMS) Browser client fetches image tiles for the bounding box using Google Map API. Cache Server requests map tiles at all zoom levels with all layers. These are converted to uniform projection, indexed, and stored. Overlapping images are combined. Must provide adapters for each Map Server type . The tile server fulfills Google map calls with cached tiles at the requested bounding box that fill the bounding box. Google Maps Server Cache Server Tile Server Adapter Adapter Adapter
Building a Cache Server Reverse engineering Map Server requests.
Map image requests for ESRI ArcIMS and ArcMap are based on ArcXML
ESRI sends SOAP-like XML over HTTP. Note the generated image is left on the server. Client has to retrieve it in a separate step. Server cleans up images every 10 minutes or so (a configurable parameter).
Map requests for other type of servers are using HTTP GET method.
Trick is to figure out the correct format for the name/value pairs.
Requesting format of MapGuide and WMS is almost the same
Map image is directly returned in the HTTP response (GIF, JPG, etc)
Request for AutoDesk MapGuide Server http://litemap.co.hamilton.in.us:8080/liteview/servlet/MapGuideLiteView?VERSION=1.1.1&REQUEST=Gemap&LAYERS=COUNTY_PLAN.MWFparcels&SRS=EPSG:4326&BBOX=86.0009765625,40.06125658140474,85.99960327148438,40.062307630891&WIDTH=256&HEIGHT=256&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=TRUE&WMTVER=1.1.1&STYLES= Request for WTH Web Map Server http://thinkopengis.wthengineering.com/cgibin/mapserv.exe?map=cass0805.map&VERSION=1.1.1&REQUEST=GetMap&LAYERS=parcels,roads,highways&SRS=EPSG:4326&BBOX=86.4596523336861,40.6980435683496,86.3180175693406,40.7924667445799&WIDTH=600&HEIGHT=400&FORMAT=image/png&BGCOLOR=0xFFFFFF&TRANSPARENT=FALSE&WMTVER=1.1.1
Google Maps works by delivering map tiles that fill a bounding box.
Google Map API 2.0 lets you point at your own tile server.
We use this to serve up our own map data together with Google maps.
To do this, all tiles should be saved as the same bounding box as Google map tiles.
Tiles must have same size, projection, and coordinate values as underlying Google base maps.
Each tile uses tile ID and zoom level as its name (ie, tile36.48.10), so no database is needed to find the tile.
Our tile naming convention based on Google’s lat/lon to transverse Mercator projection.
tileX.Y.Zoom, but must first convert lat and lon to rectangular coordinates.
Naming convention discussed on next slide. See http://mapki.com/wiki/Lat/Lon_To_Tile
Using zoom level as the first-level directory and layer as the second-level directory to store tiles.
Converting bounding box to Google tile values Google uses an x,y coordinate system combined with a zoom value to specify the tiles to retrieve from the server. These coordinates are calculated using an algorithm which can be found in GoogleMapki. See: http://www.codeproject.com/useritems/googlemap.asp Steps for fetching image tiles from county map servers that match Google map tiles. Example Tile: http://mt0.google.com/mt?n=404&v=w2.37&x=0&y=0&zoom=16.
Naming Tiles Example A (-88.2, 42.4) B(-84.6, 37.1) Bounding box of Indiana at zoom level 10 Tile 1 (36,47 ) Tile 2 (36,48) Tile 3 (36,49) Tile 4 (37,47) Tile 5 (37,48) Tile 6 (37,49)
1 - Database Tile-County Mapping Process IGS boundary- checking service County Map Fetcher thread County Map Fetcher thread County Boundary Fetcher thread which need to use JAI library to combine tiles from different counties . County Web Map Services County Web Map Services County Web Map Services County Web Map Services County Web Map Services
Building Indiana Map client Using Google Map API
Google Map API V2 enables us to add custom map directly on Google Map .
To utilize Google map API to build Indiana map client, there are several steps:
Register for using Google map API
Create a collection of copyrights.
Give those copyright collections to all tile layers that we want to add on Google Map.
Pass those tile layer(s) off to create a map type.
Example code for building custom map on Google Map
Create a GCopyright
var copyright = new GCopyright(1, new GLatLngBounds(new GLatLng(-90, -180), new GLatLng(90, 180)), 0, “@Indiana Geology Survey");
Add the GCopyright to a GCopyrightCollection
var copyrightCollection = new GCopyrightCollection('Chart'); copyrightCollection.addCopyright(copyright);