Presentation is loading. Please wait.

Presentation is loading. Please wait.

Centro de Referência em Informação Ambiental, CRIA Sidnei de Souza Abril 2006 mapcria web service.

Similar presentations


Presentation on theme: "Centro de Referência em Informação Ambiental, CRIA Sidnei de Souza Abril 2006 mapcria web service."— Presentation transcript:

1 Centro de Referência em Informação Ambiental, CRIA Sidnei de Souza Abril 2006 mapcria web service

2 it is a web service developed by CRIA to facilitate the implementation of web applications that require the dynamic production of maps It uses the University of Minnesota MapServer C library, MapScript wrap for Perl, v4.2.0 [ ]http://mapserver.gis.umn.edu Developed in Perl v5.8.0 Available as a SOAP server Allows multiple simultaneous jobs Map initial characteristics are specified on an XML document at once Accepts local layers files as well as available via WMS Provides several functions to maintain interaction mapcria web service

3 mapcria files mapfile wms CGI application draw polygons draw points draw lines db queries draw() User clicks on a web page link that calls a CGI application The CGI creates an XML file that describes the map to be produced. The XML file is sent to the mapcria web service using a SOAP connection Loads the layers according to the definitions on an specific mapfile. Returns a ticket to the caller application get_image(ticket) The application requests the newly created map image. The server delivers the requested image Draws the requested elements on the map. mapcria web service basic use

4 mapcria CGI application The service performs the required zoom on the map zoom_rectangle(ticket) get_image(ticket) The application requests a zoom and the resulting image. The server delivers the requested zoomed image The user selects an area to zoom in mapcria web service basic use

5 is a set of general purpose CGI Perl scripts that implement the basic functionalities required for the visualization of (and interaction with) maps produced by the mapcria web service. Once a map is initialized on the server, the mapcria viewer takes control of the job of providing the user with tools to continue the interaction with the server. The basic tools provided by the viewer are: Zoom In and Out Panning Reference map window Layers on / off panel Active layers window Plug-in to search a database based on selected coordinates * Plug-in to search a database to find points to be plotted on the map * User help information window Standard page generation for printing Multi-language interface * requires special applications according to the system mapcria viewer

6 mapcria CGI application The application starts the mapcria viewer passing the ticket as a parameter. mapcria web service use with the mapcria viewer The CGI creates an XML file that describes the map to be produced. The XML file is sent to the mapcria web service Returns a ticket mapcria viewer The mapcria viewer takes control of the job and provides an interface with the commonly used functions. Map viewer window Layers control window Reference map window Active layers window Database search window * Symbols select window * User help window Printable page

7 mapcria web service initial XML schema detail (draw)

8 mapcria web service methods draw get_active_layers get_image_width get_image_height get_image get_scalebar get_reference get_extent zoom_point zoom_rectangle zoom_coords zoom_all set_visibility toogle_layer get_field_value_by_coord set_image_scale click2map del_object finish

9 mapcria web service example #!/usr/local/bin/perl $|=1; use strict; use SOAP::Lite; my ($long,$lat) print Content-type: image/png\n\n; my $soap = SOAP::Lite -> uri("http://saruman.cria.org.br/manager") -> proxy(tcp://saruman.cria.org.br:5900/", timeout => 15) -> on_fault( sub { return undef } ); my $xml =<draw($xml)->result(); print $soap->get_image($ticket)->result(); $soap->finish($ticket);

10 current version documentation is available at Questions? On-line demonstration? Thank you! LAST SLIDE…


Download ppt "Centro de Referência em Informação Ambiental, CRIA Sidnei de Souza Abril 2006 mapcria web service."

Similar presentations


Ads by Google