Zao Liu CGL Report

Monday, March 12, 2007

Adding map server overlays on Google Earth



KML2.1 allows dynamically adding layers from ArcIMS, WMS, MapGuide to Google Earth. The method is:
1. Build a .kml file like below:
<networklink>
<name>Example of Overlays</name>
<flytoview>1</flytoview>
<link>
<href>http://156.56.104.164/GoogleCacheServer/servlet/WMSConnection?</href>
<refreshmode>onInterval</refreshmode>
<refreshinterval>30</refreshinterval>
<viewrefreshmode>onStop</viewrefreshmode>
<viewrefreshtime>7</viewrefreshtime>
<viewformat>BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth];CAMERA=\
[lookatLon],[lookatLat],[lookatRange],[lookatTilt],[lookatHeading];VIEW=\
[horizFov],[vertFov],[horizPixels],[vertPixels],[terrainEnabled]</viewformat>
</networklink>

If you specify a <viewrefreshmode> of onStop and do not include the <viewformat> tag in the file, the following information is automatically appended to the query string:

BBOX=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]

This information matches the Web Map Service (WMS) bounding box specification.Also, horizPixels and vertPixels defines the bounding box's width and height.

When load this file in Googel earth, it will make a http "get" query to the link URL you defined with the query values.

2. Then we can easy build a CGI or servlet to deal with the query string and build a wms like query string to query for the county servers layers and dynamiclly write a KML file with the layer URL back. Google earth could add the layer according to this kml file. Please note: must access to a WMS server that can output WGS84 coords (EPSG 4326).

Image resizing in JAI vs. ImageMagick

Part of the functionality of the cacheing server application is the dynamic and on-the-fly resizing of images to whatever dimensions are required by the client.

I wrote the first version of the image resizing code using Java Advanced Imaging (JAI), but it is apparent that the quality of the resized images wasn't quite good. I tried setting JAI to use bicubic interpolation (InterpolationBicubic and InterpolationBicubic2) instead of the default nearest-neighbour (InterpolationNearest) method. Still produced inconsistent results.

I had looked at using ImageMagick, using the java JMagick bridge, but that was just plain funky.. It relies on a JNI bridge that apparently doesn't compile well.I decided to try an ImageMagick solution using java's Runtime.exec() - and it works perfectly. Image quality is much better. The memory issues we were seeing with JAI disappeared (JAI was barfing on Very Large Images, where ImageMagick chews through them with ease). The downside is that it takes considerably longer to process the resized images, and since ImageMagick can only work with local files (not URLs), I have to download the image from the web each time I want to process it.

Thursday, March 08, 2007

Status report for March 7th

1. Built the offline version of Quicksim2.
2. There is an interesting website called Flash Earth. An application built in Flash that uses satellite and aerial imagery from a variety of online mapping websites,like Google map, yahoo, ask.com, even NASA daily image of cloud. Also, when we zoom in or zoom out using Flash Earth, the feeling is more like Google earth, better than Google map.This give me some idea of building a flash-based map client with collaboration. Also, some useful layers we can add to our servers.
3. Working on add Morgon County GIS server layers to our cache server. Also, I need do more work to build a good cache version for Monroe county.
4. Marlon pierce has updated the paper for the IndianMashUp project. The link is:
http://www.servogrid.org/slide/iSERVO/CacheMap/

Thursday, February 15, 2007

Status report for Feb 15th

1. I am working on writing the paper of IndianaMashup project for Journal of terrestrial Observation (JTO).

2. Ahmet Sayar is trying to come back the GEOFEST DISLIN service. After he finishes, I will build the service of earthquake contour plot for California.

3. I have found some web map servers in California which I will use to start building the cache version for the state and add the contour plot layer on it.
The map servers I found are as below:
Los Angeles should be a good start for GEOFEST purposes, since we can easily do some GeoFEST simulations of nearby faults.

4. Updating GoogleMapConnector to cooperate well with the new version of Google map tiles.

Thursday, February 01, 2007

Status report for Jan 31th

1. Updated slides for IndianaMashup project with Marlon Pierce and will use this as a abstraction to write a article for Journal of terrestrial Observation.
http://www.crisisgrid.org/cgwiki/images/8/8f/OGF19_IndianaCacheMap.ppt

2. Discussed with Marlon Pierce about the plan of this semester including four parts:
  • Work with Ahmet Sayar on scientific plotting overlays (contour plots, vector maps) and
    try to get his Dislin contour plot service of California integrated with a California version of my service.
  • Try to find county web map server for California, such as ESRI, OGC and start building a cache server for these as we did for Indiana state.
  • Add more functions for map collaboration tools and fix the bugs.
  • Try to add some dynamic or read time display of map features.

Thursday, November 30, 2006

Status report for Nov 29th

1. Adding a flex module on Indiana cache server, so the map server can support almost all functions like zooming, geocoding, layer changing, whiteboard scribbling concurrently on client by message passing using flex data service. The link for this sample is:
Indiana map collaboration

2. In order to run this demo, you need flash media player first installed. Downloading URL is: Flash Media Player
Installation Instructions:
(1) Installation of Adobe Flash Player may require administrative access to your PC, which is normally provided by your IT department. For the installation to succeed, you may be asked to close all open browser windows during the installation.
(2) Click the Download Now button. A dialog box will appear asking you where to save the Installer.
(3) Save the Installer to your desktop, and wait for it to download completely.
(4) An Installer icon will appear on your desktop. Double-click on it.
(5) You may be prompted to close open browser windows to continue with the installation.
(6) You can verify the version you have installed by visiting the About Flash page

3. Adding chatboard to the client. So every one who login in can chat with others in this board. (It is just a simple implementation now)

4. Next step:
The server doesn't save the status of clients, so any one who join in the session didn't know other's status, he have to wait for other's next step to join in th session. Also, anyone join the session can control the map, so it is a bit confusing. I wanna using passing baton method to solve this problem so that at a time only one person can control the map.

Wednesday, November 15, 2006

Status Report for Nov 15th

In order to implement Google map collaboration, I added a collaboration panel including whiteboard on top of Google Maps by implmenting a flex module, but that you could add on top of any application (HTML, Ajax, or Flex).

The Flex module adds the following collaboration features to Google Maps:
1. Map sharing: Maps are kept in sync (in real time) between users involved in a collaboration session.
2. Videoconferencing (Webcam sharing and VOIP): You can share your Webcam and microphone to add video and audio to your collaboration session.
3. Whiteboarding: Collaborating users can draw on the map. For example you could draw potential directions, etc. The users’ whiteboards are kept in sync in real time.
4. Cursor sharing: When you move your mouse, other users see the movements of your mouse and what you are pointing at.

The Flex features used in this example include:
1. Publish/subscribe messaging and support for real-time communication
2. Drawing API
3. Support for webcam/voice capture and streaming (Flash Media Server is required for streaming).

Run a simplified version of the application.

Thursday, November 09, 2006

Status report for Nov 8th and next steps

1. Finish caching all 17 county servers in Indiana State we know so far and add feature service for all these counties. Moreover, I will build a more stable service. It should be done by the end of this semester.

2. Use DHTML collaborative with Ajax techniques to make a white-board on the client side. Now I have build a graphic Javascript library which supports dynamically draw lines, rectangle, circle, polygon as what user wants. I am trying to solve the trouble of synchronization between multiple clients. I have discussed it with Tao. It should be a good service to add to GLOBALMMCS.

3. I am working with Ahmet Sayar to try to get his Dislin contour plot service of California integrated with a California version of my service.