University of Minnesota Mapserver WMS/WFS Documentation with Examples

Slides:



Advertisements
Similar presentations
A Roadmap of Open Source components for GI Web Services and Clients A Paul R Cooper MAGIC.
Advertisements

EURO4M Project Kick-Off, April 2010 OGC Web Services Data visualization using OGC web services Maarten Plieger Wim Som de Cerff Royal Netherlands Meteorological.
The Next Generation Network Enabled Weather (NNEW) SWIM Application Asia/Pacific AMHS/SWIM Workshop Chaing Mai, Thailand March 5-7, 2012 Tom McParland,
HTML I. HTML Hypertext mark-up language. Uses tags to identify elements of a page so that a browser such as Internet explorer can render the page on a.
Practical experiences with OGC services By Michal Sredl, Karel Charvat, Jachym Cepicky, Czech centre for Science and Society INSPIRE Conference, Istanbul,
Creating and Editing a Web Page Using Inline Styles
Geospatial One-Stop A Federal Gateway to Federal, State & Local Geographic Data
OneGeology-Europe - the first step to the European Geological SDI INSPIRE Conference 2010, Session Thematic Communities: Geology Krakow, June 24 th 2010.
XP Information Technology Center - KFUPM1 Microsoft Office FrontPage 2003 Creating a Web Site.
Europe’s Information Society eContentplus OrléansWP6 1st Coordination and progress meeting Technical information OGC WMS – WFS – CSW.
HTML Hypertext Markup Language –First proposed by CERN in 1989 –It is non-linear so it allows you to jump from place to place –Markup refers to the structure.
1 Chapter 12 Working With Access 2000 on the Internet.
ASP Tutorial. What is ASP? ASP (Active Server Pages) is a Microsoft technology that enables you to make dynamic and interactive web pages. –ASP usually.
Planned Title: Review of Evaluation of Geospatial Search Allan Doyle.
Introduction to HTML 2006 INT197B. What is the Internet? Global network of computers that are connected and communicate via a series of Protocols Protocols.
Web GIS – About and Need Arup Dasgupta Honorary Advisor GIS Development.
IWebFolio Using a Template Tutorial Images in this tutorial:
Chapter 2 Introduction to HTML5 Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
GIS on the Web. World Wide Web Internet Clients Servers FTP Opportunity in Web- based Mapping Disaster relief and Emergency management Global and.
Web Feature Service and Web Map Service WATER FOR A HEALTHY COUNTRY FLAGSHIP SISS Workshop v2.3 Pavel Golodoniuc, Josh Vote 8 May 2013.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Creating a Web Page HTML, FrontPage, Word, Composer.
1 of 5 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Linux Operations and Administration
1 Outline 3.1 Introduction 3.2 Editing HTML 3.3 First HTML Example 3.4 W3C HTML Validation Service 3.5 Headers 3.6 Linking 3.7 Images 3.8 Special Characters.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Creating a Web Site to Gather Data and Conduct Research.
CSCE Chapter 5 (Links, Images, & Multimedia) CSCE General Applications Programming Benito Mendoza 1 By Benito Mendoza Department.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
David Blasby The Open Planning Project New York. Goals Explain what a WFS and WMS are, and when to use them Be able to create simple spatial web applications.
An Introduction To Building An Open Standard Web Map Application Joe Daigneau Pennsylvania State University.
Introduction to HTML. What is a HTML File?  HTML stands for Hyper Text Markup Language  An HTML file is a text file containing small markup tags  The.
Integrating geospatial services with distributed multimedia resources Maurits van der Vlugt Webmapping Team Manager Social Change Online
The OpenGIS Consortium Geog 516 Presentation #2 Rueben Schulz March 2004.
HTML Hyper Text Markup Language A simple introduction.
Session 1 SESSION 1 Working with Dreamweaver 8.0.
ASP Introduction Y.-H. Chen International College Ming-Chuan University Fall, 2004.
Data Scrounging 101 Steve Signell, Instructor Robert Poirier, TA School of Science Rensselaer Polytechnic Institute Monday,
MapServer Support for Web Coverage Services Stephen Lime - Minnesota DNR Dr. Thomas E. Burk - University of Minnesota MUM Ottawa, Canada.
12.3 Using Open GIS web services to serve environmental data 21rst IIPS: Session 12 GIS Applications 12.3 Using Open GIS web services to serve environmental.
UNIT 14 1 Websites. Introduction 2 A website is a set of related webpages stored on a web server. Webmaster: is a person who sets up and maintains a.
Campus Tour COMP 523 Midterm Presentation Justin, Paul, Florian.
Development of Dynamic SLD and Understanding WCS Using Geo-server Supervisor Prof N.L Sarda Dept. of Computer Science & Engg. IIT-Bombay Bharti M.Tech.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
Data standards and client software How the demonstrator application uses the data standards.
Web Design (7) Images (1). Images and the Image Element Images can be placed in the flow of text..jpg,.png and.gif image files work in web pages The img.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
A GeoSpatial Mapping Architecture
Service Composition for GIS Sai Ma, Minruo Li, Weichang Du Faculty of Computer Science, University of New Brunswick, Canada 2008 IEEE Congress on Services.
RSISIPL1 SERVICE ORIENTED ARCHITECTURE (SOA) By Pavan By Pavan.
Introduction to Morpho RCN Workshop Samantha Romanello Long Term Ecological Research University of New Mexico.
1 MESSAGE EXCHANGE FOR Web Service-Based Mapping Services AHMET SAYAR INDIANA UNIVERSITY COMMUNITY GRIDS LAB. COMPUTER SCIENCE DEPARTMENT August 17, 2005.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
NASRULLAH KHAN.  Lecturer : Nasrullah   Website :
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
©2010 AIR WORLDWIDE 1 Using ArcGIS Server Web Map Services in Web Map Mash-Ups Benjamin Spaulding, Ph.D. AIR Worldwide Esri Boston Dev Meet-Up 12/8/2010.
LBSC 690 Session 4 Programming. Languages How do we learn a language? Learn by listening Then reading Then writing How do we teach programming? Learn.
IOOS Sea Surface Temperatures: Realizing Truly Distributed Data with Open Standards Presenter Kyle Draganov.
HTML Hyper Text Markup Language. The Basics u HTML documents contain “tags” which instruct the Browser software on how to present the information within.
ORNL DAAC SPATIAL DATA ACCESS TOOL Open Geospatial Consortium (OGC) Services Bruce E. Wilson Suresh K. Santhana Vannan Yaxing Wei Tammy W. Beaty National.
CGI – GeoSciML Testbed 3 Status for BRGM Jean-Jacques Serrano.
OBIS Web Services Mike Flavell OBIS Data Manager ODIN Africa Training Course on Marine Biodiversity Management, Oostende, Belgium, 17 March 2014.
Uploading Data Matthew Hanson  GeoNode made up of several components  Web Framework – Django  OGC Server – GeoServer  Database – PostGIS.
HTML Hyper Text Markup Language. Agenda Basics Tools Important tags Tables & databases Forms Publishing at Stern.
SSE WebMapViewer Recent Developments Steven Smolders SSE Workshop ESA - ESRIN, Frascati, Rome.
Windows Vista Configuration MCTS : Internet Explorer 7.0.
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Presentation transcript:

University of Minnesota Mapserver WMS/WFS Documentation with Examples WMS / WFS How To University of Minnesota Mapserver WMS/WFS Documentation with Examples Gayathri Swaminathan University of Oklahoma gayathri@ou.edu

Table of Contents. Introduction Web Map Server (WMS) Setting up a WMS Server WMS Client Implementations Web Feature Server (WFS) WFS Client Implementations Appendix

1.Introduction WMS* Mapserver web The Internet Application Client 1 WMS* Mapserver web Application Implementation (Server) The Internet Client 2 WFS** Client n Mapserver Web Application with WMS and WFS service * Web map service ** Web feature service

1.1 Terminologies WMS – Web map service / server WFS – Web Feature service / server OGC – Open GIS Consortium Mapserver – University of Minnesota’s Internet Mapping Software GML – Geographic markup language

1.2 Standards 1) Who sets the WMS/ WFS standards? OpenGIS Consortium (OGC) – This organization is analogous to the IEEE or ANSI in organizing and coordinating the various GIS specific application development. 2) Where can I find WMS/WFS related information? WMS 1.0.0 specification: http://www.opengis.org/docs/00-028.pdf WMS 1.1.0 specification: http://www.opengis.org/docs/01-047r2.pdf WMS 1.1.1 specification: http://www.opengis.org/docs/01-068r2.pdf WMS-Dev mailing list and archive: http://www.intl-interfaces.net/mailman/listinfo/wms-dev WMS FAQ: http://www.intl-interfaces.net/cookbook/WMS/faq/faqw.py?req=home WMS XML Capabilities validator: http://www.digitalearth.gov/wmt/xml/validator.html WMS Cookbook: http://www.intl-interfaces.net/cookbook/WMS/ WFS specification: http://www.opengis.org/techno/specs/02-058.pdf GML specification: http://www.opengis.net/gml/02-069/GML2-12.html

2. Web map server According to the Mapserver WMS How to document, “A WMS (or Web Map Server) allows for use of data from several different servers, and enables for the creation of a network of Map Servers from which clients can build customized maps.” GetCapabilities WMS CGI Implementation Request Types GetMap GetFeatureInfo DescribeLayer Mandatory requests supported per OGC recommendations Optional requests of some implementations Client’s Computer Per Mapserver’s website, Mapserver supports the following WMS versions: 1.0.0, 1.0.7, 1.1.0 (a.k.a. 1.0.8), and 1.1.1

2.1 Request Types GetCapabilities Client GetMap Client GetFeatureInfo XML document with metadata of the WMS Client GetMap Client GetFeatureInfo Client Text/ Plain attribute information Clicks on map Send request Text/ Plain using Mapserver query templates set in wms_feature_info_mime_type GML features XML description of One or more layers (currently supported Only in SLD servers) DescribeLayer* Client * NOT SUPPORTED IN MAPSERVER

3. Setting up a WMS Server All WMS requests are handled by the mapserver CGI. 1. Compilation settings: In unix, mapserver should have been compiled with the “with_wms” option. In windows, the nmake.opt file should have the WMS settings uncommented and then compiled. As a result, when you do a mapserv –v the SUPPORTS should include WMS_SERVER Example 1. On Unix: $ ./mapserv -v MapServer version 4.2-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE Example 2. On Windows: C:\apache\cgi-bin> mapserv -v MapServer version 4.2-beta1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS-WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

3. Setting up WMS Continued., 2. Set up map file - Mapserver For a WMS server implementation it is required to add metadata information for each layer that is to be advertised by the server. As recommended by WMS Mapserver How to documentation (http://mapserver.gis.umn.edu/doc/wms-server-howto.html), At the map level: Map NAME Map PROJECTION Map Metadata (in the WEB Object): wms_title wms_onlineresource wms_srs (unless PROJECTION object is defined using "init=epsg:...") And for each layer: Layer NAME Layer PROJECTION Layer Metadata wms_srs (optional since the layers inherit the map's SRS value) For a detailed description of each of the parameters mentioned above, visit the “Mapserver WMS How to” web page.

3.1 Test WMS Server Test recommendations from the Mapserver How to: 1. GetCapabilities: In a web browser, type in the URL, http://my.host.com/cgi-bin/mapserv?map=mywms.map&REQUEST=GetCapabilities Substitute my.host.com with your website and mywms.map with the absolute path to the map file in your web server Result: This request should return an XML document and prompt to save file. Save the file and open it in a XML Editor or text editors like notepad, EMacs etc., 2. GetMap http://my.host.com/cgi-bin/mapserv?map=mywms.map&VERSION=1.1.1 &REQUEST=GetMap&layers=state,province If map layers state and province STATUS ON or DEFAULT then an image of the map with the layers is displayed in the Browser A complete GetMap request example: http://my.host.com/cgi-bin/mapserv?map=mywms.map&VERSION=1.1.1&REQUEST=GetMap&LAYERS=prov_bound&STYLES=&SRS=EPSG:4326&BBOX= -173.537,35.8775,-11.9603,83.8009&WIDTH=400&HEIGHT=300&FORMAT=image/png

3.2 GetMap Parameters FORMAT WMS Server (mapserver cgi location) http://myhost/cgi-bin/mapserv?map=wms.map&VERSION=1.1.1&REQUEST=GetMap&LAYERS=prov&STYLES=&SRS=EPSG:4326&BBOX=xmin,xmax,ymin,ymax&WIDTH=400&HEIGHT=300&FORMAT=image/png VERSION REQUEST LAYERS STYLE SRS BBOX WIDTH HEIGHT FORMAT WMS Server (mapserver cgi location) WMS request version Spatial reference system from EPSG file Width of returned map image Format of returned map image Map layers Map file Bounding box corners (lower left, upper right) in SRS units Request-GetMap Rendering Style for SLD support. Mapserver currently does not support this, leave empty Height of returned map image

3.3 WMS Samples 1. MAP PARAMETERS – 2. LAYER PARAMETERS – Sample Map file: 1. MAP PARAMETERS – NAME TAMILNADU ….. WEB EMPTY “norecords.htm" TEMPLATE “tamilnadumap.htm" IMAGEPATH “/tmp/" IMAGEURL "/tmp/" METADATA "wms_title“ “TamilNadu WMS Server" "wms_abstract" “Tamilnadu" "wms_extent" "-633771.227805 1060738.573036 152927.340425 1689379.870746" "wms_accesscontraints" "none" "wms_contactperson" “Mahalakshmi" "wms_contactorganization" “Tamil Nadu" "wms_contactposition" "Software Engineer" "wms_fees" "none" "wms_onlineresource" "http://localhost/cgi-bin/mapserv.cgi?map=tnmap.map&" "wms_srs" "EPSG:99999" END 2. LAYER PARAMETERS – LAYER NAME state TYPE POLYGON STATUS DEFAULT DATA county PROJECTION #GEOGRAPHIC NAD83 proj=longlat ellps=GRS80 no_defs CLASS COLOR 255 255 255 "wms_title" "State" "wms_srs" "EPSG:4019"

4. WMS Client Implementations Browser WMS Server Mapserver WMS Client Arc Explorer

4.1 Connect from a browser Form URL(s) and make request to WMS Server 1. GetCapabilities Example: http://mymapserv/cgi-bin/mapserv?map=Tamilnadu.map&request=capabilities – Will get a XML document with Metadata information of the WMS Server. 2. GetMap Example: Get me a map of Tamilnadu state with rivers layer of size 500x700 http://tnmapserver/cgi-bin/mapserv?map=tnmap.map&VERSION=1.1.1&layers=state,rivers&Height=500&width=700&request=GetMap – Will get a map of tamil nadu state with the rivers layer per definition in tnmap.map Things to consider: Do a GetCapabilities and see the advertised SRS codes. For example, Lat/Lon projection, State Plane etc., When forming requests build from bare bones! Start with the mandatory required parameters and then add on Image formats available for example, jpeg, png etc., can also be found in the GetCapabilities NO STYLES SUPPORTED! MapServer currently does not support SLD based rendering stlyes Some WMS servers charge a fee, which is again mentioned in the GetCapabilities returned XML document

4.2 Connect from Mapserver WMS Client When there is a mapserver web application that requires connect to another server for obtaining certain layers and features, Mapserver WMS Client can be used. What is needed? Mapserver CGI compiled with WMS_CLIENT SUPPORT. When run in prompt, mapserver cgi should respond with a “Supports=WMS_CLIENT”. Mapfile,Templates definition similar to any other mapserver implementation. WMS Client Layer Definition ### RIVERS FROM TAMILNADU WMS SERVER### LAYER NAME riverscl TYPE POLYGON      STATUS ON      CONNECTIONTYPE WMS      CONNECTION "http://tnmapserver/cgi- bin/mapserv?map=tnmap.map&VERSION=1.1.1&layers=rivers&TRANSPARENT=TRUE" METADATA      "wms_title" “Rivers"      "wms_name" “riverscl"      "wms_server_version" "1.1.1"      "wms_format" "image/jpeg"      "wms_srs" "EPSG: 4326" END END The layer definition above makes a WMS request to the TNMAPSERVER with a TNMAP.MAP for a rivers layer in Lat/Lon projection (EPSG code: 4326)

4.3 Connect from Arc Explorer Here is a good documentation on the ArcExplorer connection, http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WMSMapserverArcExplorer What steps are needed? The following steps are a synopsis of the documentation URL above: Get Capabilities - http://myserver.mydomain/cgi-bin/mapserv?map=/path/on/server/to/mymap.map&request=GetCapabilties Use PHP to fake WMS 1.1.1 compatibility (visit http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WMSMapserverArcExplorer and follow instructions under Using PHP to fake WMS 1.1.1 compliance) Download ArcExplorer - Java Edition 4.0.1 from ESRI’s website Download the ArcExplorer Interoperability Extension for ArcExplorer Install ArcExplorer and then the extension in your computer Open ArcExplorer, and click on Interoperability->Connect to WMS Enter the URL to PHP file created in step 2, click ‘OK’ This should connect to the WMS Server and bring in all layers advertised by the WMS Server Just click on the checkbox next to a layer, to view layer

5. Web Feature Server (WFS) According to Mapserver’s web site Web Feature Service or WFS is, “A WFS ( Web Feature Service ) publishes feature-level geospatial data to the web. This means that instead of returning an image, as MapServer has traditionally done, the client now obtains fine-grained information about specific geospatial features of the underlying data, at both the geometry AND attribute levels.” What is required? Mapserver compiled with PROJ 4.4.3 or greater and GDAL 1.1.8 or greater WFS parameters are also configured in the metadata information, follow instructions here, http://mapserver.gis.umn.edu/doc42/wfs-server-howto.html on how to set up MAP metadata and LAYER metadata. The WFS does not allow a layer to be advertised in more than one SRS. Mapserver implictly uses the top-level SRS for all the layers defined, or if the top-level is not present (like a map projection), then the individual layer SRSs’ are used. As indicated in the WFS Server How to, “As a rule of thumb, simply set the wfs_srs at the map level (in web metadata) and never set the wfs_srs metadata at the layer level and things will work fine for most cases”

6.WFS Client Implementation A WFS client call can be made from a mapserver web application through a layer definition in the map file. What is needed? Mapserver compiled with WFS_CLIENT support , PROJ 4.4.3 or higher, GDAL 1.1.8 or higher libCurl 7.10 or higher Sample Layer Definition: LAYER NAME "mylayer" TYPE POINT CONNECTIONTYPE WFS CONNECTION "http://tnmapserver/cgi-bin/mapserv?map=tnmap.map&SERVICE=WFS&VERSION=1.0.0&TYPENAME=mypoints PROJECTION "init=epsg:4326" METADATA "wfs_connectiontimeout" "60" # Default is 30 seconds "wfs_latlonboundingbox" "-75 45 -70 50" # Area covered by this layer END CLASS SYMBOL 'triangle' COLOR 255 0 0

7. Appendix Some useful URL(s) WMS Cookbook - http://www.intl-interfaces.net/cookbook/WMS/ WMS How To - http://mapserver.gis.umn.edu/doc42/wms-server-howto.html WMS Wiki - http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?WMSMapServer WFS - http://mapserver.gis.umn.edu/doc42/wfs-server-howto.html WFS Client How to - http://mapserver.gis.umn.edu/doc/wfs-client-howto.html ACKNOWLEDGEMENTS: University of Minnesota – Mapserver Team, Developers and Users community that ever remain proactive in getting OpenGIS solutions work for community benefits.