50
TALLER WFS: INTERFACES WEB PARA INFORMACION GEOGRAFICA VECTORIAL (WFS Tutorial - Web Interface for Geospatial Vector Data)

WFS Tutorial OGC Interoperability Day - Toluca mexico - May 30 2013

Embed Size (px)

Citation preview

Page 1: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

TALLER WFS: INTERFACES WEBPARA INFORMACION

GEOGRAFICA VECTORIAL (WFSTutorial - Web Interface for

Geospatial Vector Data)

Page 2: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013
Page 3: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Agenda• OGC• Motivation and Web Services• Features• GML• WFS

Page 4: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Open Geospatial Consortium (OGC)• Funded in 1994

• Voluntary consensus

• Standards organization

• Leads the development of standards for geospatial and locationbased services.

Page 5: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

OGC MissionTo serve as a global forum for the collaboration of developers and usersof spatial data products and services, and to advance the development ofinternational standards for geospatial interoperability.

Page 6: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Miembros OGCMas de 450 a nivel mundial

En México:

Page 7: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Publishing Geospatial Data

Page 8: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Publishing Geospatial Data

Page 9: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

What changed?

Page 10: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

What changed?

Page 11: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

What is this?

Page 12: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Internet

Page 13: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Internet enables the World Wide Web

Page 14: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

The Web = All Information fromComputers connected around theworld.

Page 15: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

How do we connect to the Web?Protocols

• TCP/IP• HTTP (GET, POST)

Page 16: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Let's Try - SetupTo view HTTP requests, we can use Firefox:

• Open: Tools / Web Developer / Web Console• Select Net

Page 17: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Let's Try - Test• Open any page• Open a wrong URL• Inspect the console• Click on example petition: "Get http:// ...."

Page 18: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

What Should I get back if I ask a serverfor a "Toluca"

• A Map of Toluca• A video• A picture• The history• List of Hotels• ???

Page 19: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

We need to design specialized systemsPor ejemplo - Servicio de restaurantes:

• Encuentrame todos los restaurantes a 5 km de distancia• Encuentrame el restaurante con el mejor guacamole y chorizo verde• Agrega mi comentario - comida salada, servicio terrible - al

restaurante X• Reserva el restaurante YY a las 8 PM y preparen un ponque con 30

velas

Page 20: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Heterogeneous Services

Page 21: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Heterogeneous Services

Page 22: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Lack of agreement looks bad

Page 23: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Agreement of Interfaces- Great!

Page 24: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Feature

Page 25: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Geospatial Feature

Page 26: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Feature has Properties

Page 27: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

GeneralizationClass = Tree

Properties of Tree:

• Height

• Location

Page 28: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Feature InstanceMy favorite tree in Cartagena is the one in front of the hotel Colombia.

Page 29: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Features Modeling

Page 30: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Geographic Markup Languaae (GML)<Bridge> <span>100</span> <height>200</height> <gml:centerLineOf> <gml:LineString> <gml:pos>100 200</gml:pos> <gml:pos>200 200</gml:pos> </gml:LineString> </gml:centerLineOf></Bridge>

Page 31: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Feature Instance of Type Bridge<Bridge> <span>100</span> <height>200</height> <gml:centerLineOf> <gml:LineString> <gml:pos>100 200</gml:pos> <gml:pos>200 200</gml:pos> </gml:LineString> </gml:centerLineOf></Bridge>

Page 32: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Feature Types are defined in GML<xs:complexType name="BridgeType"> <xs:complexContent> <xs:extension base="gml:AbstractFeatureType"> <xs:sequence> <xs:element name="span" type="xs:integer"/> <xs:element name="height" type="xs:integer"/> <xs:element ref="gml:centerLineOf"/> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType>

Page 33: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

GML Provides• Defines an abstract feature model

• Provides XML Schemas

• Provides primitives:

• Geometry

• Feature Types

• Coordinate Reference Systems

Page 34: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

GML Geometries

Page 35: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

How can I model a radio station?

Page 36: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

How can I model a radio station?point - when looking at a country map

Page 37: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

How can I model a radio station?polygon - location of the building

Page 38: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

How can I model a radio station?Multipolygon - Area of Transmition

Page 39: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Communities develop their ownApplication Schemas

• AIXM – Aviation

• CAAML – Canadian avalanches

• CityGML – 3D city models

• CSML – Climate Science Modelling

• DAFIF – Defense aviation

• GeoSciML - Geoscience

• ...

Page 40: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Web Feature Service (WFS)• Service (Protocol)• Do the following with Geographic Features:

• publish• access• manipulate

Page 41: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

WFS Operations• getCapabilities - summary of the service• DescribeFeatureType - structure of the feature types• GetFeature - get the feature instance• Transaction - create, update and delete geographic features• Lock Feature - Protects feature record when updating it.

Page 42: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

GeoServer Demo

• GeoServer is the reference implementation for WFS 1.1.0.• Open and free software• Java-based

Page 43: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

GeoServer Demo• http://localhost:8080/geoserver/web/• click on Demos• Explore Operations

Page 44: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Example getCapabilitieshttp://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetCapabilities

http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetCapabilities

Page 45: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Example DescribeFeaturehttp://localhost:8080/geoserver/topp/ows? service=WFS&version=1.1.0&request=DescribeFeatureType& typeName=topp:tasmania_water_bodies

http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp:tasmania_water_bodies

link

Page 46: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Example getFeaturehttp://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=getFeature&TypeName=topp:tasmania_water_bodies

http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.1.0&request=getFeature&TypeName=topp:tasmania_water_bodies

Page 47: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Query based on values of propertiesLakes with area > 1067000000 cm. Request:

http://localhost:8080/geoserver/topp/ows? service=WFS&version=1.1.0&request=getFeature& TypeName=topp:tasmania_water_bodies& FILTER= <Filter xmlns="http://www.opengis.net/ogc"> <PropertyIsGreaterThan> <PropertyName>AREA</PropertyName> <Literal>1067000000</Literal> </PropertyIsGreaterThan> </Filter>

http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_water_bodies&maxFeatures=50&outputFormat=GML2&&FILTER=%3CFilter%20xmlns=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsGreaterThan%3E%3CPropertyName%3EAREA%3C/PropertyName%3E%3CLiteral%3E1067000000%3C/Literal%3E%3C/PropertyIsGreaterThan%3E%3C/Filter%3E

`link <http://localhost:8080/geoserver/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_water_bodies&maxFeatures=50&outputFormat=GML2&&FILTER=%3CFilter%20xmlns=%22http://www.opengis.net/ogc%22%3E%3CPropertyIsGreaterThan%3E%3CPropertyName%3EAREA%3C/PropertyName%3E%3CLiteral%3E1067000000%3C/Literal%3E%3C/PropertyIsGreaterThan%3E%3C/Filter%3E>`_

Page 48: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

Client - Server Demo• Open uDIG• Connect with geoserver:

http://localhost:8080/geoserver/topp/ows

Page 49: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

ReferencesOGC Standards

http://www.opengeospatial.org/standardsGML Application Profiles

http://www.ogcnetwork.net/gmlprofilesGeoServer

http://docs.geoserver.org/stable/en/user/data/vector/index.htmluDIG

http://udig.refractions.net

Page 50: WFS Tutorial   OGC Interoperability Day - Toluca mexico - May 30 2013

The EndVentajas de unirse al consorcio OGChttp://www.opengeospatial.org/ogc/join/levelsLuis Bermudez, [email protected]@berdez on Twitterhttp://www.linkedin.com/in/bermudez