Assignment 4

 

Description: Interaction with a Web Map Server (WMS) in order to get a cartographic image from its bounding box, with zooming and panning.


Additional description.


  1. -A WMS (Web Map Service) returns us an image as a result of a request

  2. -In order to get such an image, basically what we have to carry out an http request

  3. -This is easy with processing, since the function loadImage allows an URL as input. Thus URL can be a complete request to a WMS.

  4. -We will use as an example this server: http://www.sigua.ua.es/cgi-bin/siguawms

  5. -We will ask for a map, with the GetMap parameter, and we will ask for a particular area. The first call we will use is:

  6. - http://www.sigua.ua.es/cgi-bin/siguawms?service=wms&VERSION=1.1.1& REQUEST=GetMap&layers=Fotografia,Edificios&srs=EPSG:23030& bbox=716323,4251040,717864,4252195&WIDTH=400&HEIGHT=300&FORMAT=image/png

  7. -In this call, the & acts as delimiter. The REQUEST is GetMap and the layers we ask for are the orto and buildings (Fotografia,Edificios).

  8. -bbox is essential for this assignment. It is the box we ask for in geographical coordinates, and must be proportional to the WIDTH and HEIGHT (size of the image).

  9. -The WMS client viewer you have to develop must allow:

   - ZOOM in/out with left/right mouse click. Modify the bbox accordingly to generate the zoom.

   - PANNING with the cursor keys. Move 1/5 of the screen size, independently of the zoom factor, in the appropriate direction.