1 / 24

OGC Web Services

OGC Web Services. Kai Lin San Diego Supercomputer Center klin@sdsc.edu. OGC Web Services. OGC Specifications Based on HTTP Protocol (GET/ POST) XML as standard encoding (W3C) Related to geospatial information Some of main OGC services: Web Map Service (WMS) Web Feature Service (WFS)

patia
Télécharger la présentation

OGC Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OGC Web Services Kai Lin San Diego Supercomputer Center klin@sdsc.edu

  2. OGC Web Services • OGC Specifications • Based on HTTP Protocol (GET/ POST) • XML as standard encoding (W3C) • Related to geospatial information • Some of main OGC services: • Web Map Service (WMS) • Web Feature Service (WFS) • Web Coverage Service (WCS) • Catalogue Service for the Web (CSW) • Not SOAP. REST?

  3. Web Map Service (WMS) • Requests for images of map data • Point based query functionality • Main operations: • GetCapabilities: • Metadata about the types/operations the WMS supports • GetMap • Map of the requested data • GetFeatureInfo • Feature information about a particular point within a map • Open source implementations • UMN Map Server • GeoServer

  4. Web Feature Service (WFS) • Requests for spatial features • Return vector data (in GML) • Rich query interface • Main operations: • GetCapabilities: • Metadata about the types/operations the WFS supports • DescribeFeatureType • A list of features and associated attributes • GetFeature • Features by spatial querying and filtering • Open source implementations • GeoServer • Deegree

  5. Web Coverage Service (WCS) • Requests for raw (typically gridded) data • Return in well known binary formats • Main operations: • GetCapabilities: • Metadata about the types/operations the WCS supports • DescribeCoverage • Structural information about one or more coverages • GetCoverage • Coverage data by spatial querying and filtering • Open source implementations • GeoServer • Deegree

  6. Catalogue Service for the Web (CSW) • Standard API for manipulating metadata records • creating, updating, deleting for resource providers • querying metadata records for resource users • Profiles (Information Model) • FGDC • ISO19119 / ISO19115 • OASIS eBussiness Registry Information Model (ebRIM, preferred) • Request formats: XML or name-value pairs • Query language • Filter Encoding Specification (used in WFS) • Common Query Language (CQL) • Others defined in profiles • Response in XML • Open source implementations: GeoNetwork, Deegree

  7. Catalog Service Catalog A Typical CSW Use Case Client Description (Metadata) Resource

  8. CSW Operations • GetCapabilities: • Metadata about the types/operations the CSW supports • DescribeRecord: • Schema description of the CSW Information Model • GetDomain: • Runtime value space for parameters used in API • GetRecords: • Metadata records with possibility of filtering (spatial, temporal, keywords conditions, etc.) • GetRecordByID • Metadata records with the specified ID • Transaction • Create, update and delete metadata records • Harvest • Retrieve metadata from other catalogue services • Supporting periodic retrieving

  9. What You Can Query • Core Queryables • Subject: the topic of the resource • Title: the name of the resource • Abstract: a summary of the resource • AnyText: for full text search • Format: physical manifestation • Identifier: unique reference to the resource • Modified: data the resource created or updated • Type: genre of the resource • BoundingBox: a bounding box for interested area • CRS: coordinate system • Association: relation with other resources

  10. What CSW Response for a Query • Response Returnables • Title: correspondent to the query attribute Title • Creator • Subject: correspondent to the query attribute Subject • Description : correspondent to the query attribute Abstract • Publisher • Contributor • Date : correspondent to the query attribute Modified • Type : correspondent to the query attribute Type • Format : correspondent to the query attribute Format • Identifier : correspondent to the query attribute Identifier • Language • Relation : correspondent to the query attribute Association • Coverage : correspondent to the query attribute BoundingBox • Rights

  11. CSW Response Levels Full Level Creator Publisher Contributor Language Rights Summary Level Subject Format Description Date Coverage Relation Brief Level Identifier Title Type

  12. Example Request of CSW GetRecords <?xml version="1.0" encoding="UTF-8"?> <GetRecords service="CSW" version="2.0.2" maxRecords="1000" outputSchema="http://www.opengis.net/cat/csw/2.0.2" outputFormat="application/xml"> <Query typeNames=”csw:Record”> <ElementSetName>brief</ElementSetName> <Constraint version="1.2.0”> <ogc:Filter> <ogc:And> <ogc:PropertyIsLike escape="" singleChar="_" wildCard="%"> <ogc:PropertyName>/Record/AnyText</ogc:PropertyName> <ogc:Literal>%Your-Search-Term%</ogc:Literal> </ogc:PropertyIsLike> <ogc:T_During> <ogc:PropertyName>/Record/dct:modified</ogc:PropertyName> <gml:TimePeriod> <gml:begin>2007-01-01</gml:begin> <gml:end>2007-12-31</gml:end> <gml:TimePeriod> </ogc:T_During> <ogc:Or> <ogc:PropertyIsEqualTo> <ogc:PropertyName>/Record/dc:type</ogc:PropertyName> <ogc:Literal>urn::csw-ObjectType:FeatureType</ogc:Literal> </ogc:PropertyIsEqualTo>

  13. Example Request of CSW GetRecords (cont.) <ogc:PropertyIsEqualTo> <ogc:PropertyName>/Record/dc:Type</ogc:PropertyName> <ogc:Literal>urn:csw-ObjectType:WMS_Layer</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Or> <ogc:classifiedAs scope="broad"> <ogc:TypeName>Record</ogc:TypeName> <ogc:Scheme>urn:gcmd</ogc:Scheme> <ogc:Node>urn:gcmd:oceans:seafloor:topography</ogc:Node> </ogc:classifiedAs> <ogc:Contains> <ogc:PropertyName>/Record/ows:BoundingBox</ogc:PropertyName> <gml:Envelope srsName="EPSG:4326"> <gml:lowerCorner>-80,30</gml:lowerCorner> <gml:upperCorner>-70,40</gml:upperCorner> </gml:Envelope> </ogc:Contains> </ogc:And> </ogc:Filter> </Constraint> </Query> </GetRecords>

  14. Response of CSW GetRecordById <?xml version="1.0" encoding="ISO-8859-1"?> <Record xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 ../../../csw/2.0.2/record.xsd"> <dc:identifier>00180e67-b7cf-40a3-861d-b3a09337b195</dc:identifier> <dc:title>Image2000 Product 1 (at1) Multispectral</dc:title> <dct:modified>2004-10-04 00:00:00</dct:modified> <dct:abstract>IMAGE2000 product 1 individual orthorectified scenes. IMAGE2000 was produced from ETM+ Landsat 7 satellite data and provides a consistent European coverage of individual orthorectified scenes in national map projection systems.</dct:abstract> (to be continued)

  15. Response of CSW GetRecordById (Cont.) <dc:type>dataset</dc:type> <dc:subject>imagery</dc:subject> <dc:subject>baseMaps</dc:subject> <dc:subject>earthCover</dc:subject> <dc:format>BIL</dc:format> <dc:creator>Vanda Lima</dc:creator> <dc:language>en</dc:language> <ows:WGS84BoundingBox> <ows:LowerCorner>14.05 46.46</ows:LowerCorner> <ows:UpperCorner>17.24 48.42</ows:UpperCorner> </ows:WGS84BoundingBox> </Record>

  16. ebRIM • Provides a metamodel for describing metadata • Expressed in XML • Manage associations among many aspects: • Dataset descriptions • Service interface descriptions • Coordinate reference systems • Units of Measure • Application schemas, feature types • Map styles and symbol libraries • Access control policies • Sensor description • Ontological descriptions • Digital rights • Organizations and Projects

  17. More Queryables by ebRIM • Queryables • Time period of data validity • Time period of collection • Phenomenon represented • Geographic Extent • Topic categories / ISO terms • Creator • Organization • Scale / resolution • Metalevel • Classification • Processed state • …………

  18. Question?

  19. WFS GetCapabilities <?xml version="1.0" ?> <GetCapabilities service="WFS” version="1.0.0" xmlns="http://www.opengis.net/wfs" /> <WFS_Capabilities xmlns="http://www.opengis.net/wfs" version="1.0.0" xmlns:ogc="http://www.opengis.net/ogc" xmlns:myns="http://www.example.com/myns"> <Service> <Name> Oracle WFS </Name> <Title> Oracle Web Feature Service </Title> <Abstract> Web Feature Service maintained by Oracle </Abstract> <OnlineResource>http://localhost:8888/wfsservlet</OnlineResource> </Service> <Capability> <Request> <GetCapabilities> ………. </GetCapabilities> ……….

  20. WFS GetCapabilities (Cont.) <FeatureTypeList> <Operations> <Insert/> <Update/> <Delete/> <Query/> <Lock/> </Operations> <FeatureType xmlns:myns="http://www.example.com/myns"> <Name> myns:COLA</Name> <Title> LIST OF COLA MARKETS </Title> <SRS> SDO:8307</SRS> </FeatureType> ………… </FeatureTypeList> ………… </WFS_Capabilities>

  21. WFS DescribeFeatureType <?xml version="1.0" ?> <wfs:DescribeFeatureType service="WFS” version="1.0.0" xmlns:wfs="http://www.opengis.net/wfs" xmlns:myns="http://www.example.com/myns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd"> <wfs:TypeName>myns:COLA</wfs:TypeName> </wfs:DescribeFeatureType> <xsd:schema targetNamespace="http://www.example.com/myns" xmlns:wfs="http://www.opengis.net/wfs" xmlns:myns="http://www.example.com/myns" xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" version="1.0.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://localhost:8888/examples/servlets/xsds/feature.xsd"/> <xsd:element name="COLA" type="myns:COLAType" substitutionGroup="gml:_Feature"/>

  22. WFS DescribeFeatureType (Cont.) <xsd:complexType name="COLAType"> <xsd:complexContent> <xsd:extension base="gml:AbstractFeatureType"> <xsd:sequence> <xsd:element name="MKT_ID" type="xsd:double"/> <xsd:element name="NAME" nillable="true"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="32"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="SHAPE" type="gml:PolygonMemberType" nillable="true"/> </xsd:sequence> <xsd:attribute name="fid" type="xsd:double"/> </xsd:extension> </xsd:complexContent> </xsd:complexType> </xsd:schema>

  23. WFS GetFeature Request <?xml version="1.0" ?> <wfs:GetFeature service="WFS version="1.0.0” xmlns:wfs="http://www.opengis.net/wfs xmlns:ogc=http://www.opengis.net/ogc xmlns:myns=http://www.example.com/myns xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation="http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd"> <wfs:Query typeName="myns:COLA"> <ogc:PropertyName>myns:MKT_ID</ogc:PropertyName> <ogc:PropertyName>myns:NAME</ogc:PropertyName> <ogc:PropertyName>myns:SHAPE</ogc:PropertyName> <ogc:Filter> <ogc:And> <ogc:And> <ogc:PropertyIsGreaterThan> <ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName><ogc:Literal> 2 </ogc:Literal> </ogc:PropertyIsGreaterThan> <ogc:PropertyIsEqualTo> <ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName><ogc:Literal>cola_c</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:And> <ogc:Or> <ogc:PropertyIsEqualTo> <ogc:PropertyName>myns:COLA/myns:MKT_ID</ogc:PropertyName><ogc:Literal>3</ogc:Literal> </ogc:PropertyIsEqualTo> <ogc:PropertyIsEqualTo> <ogc:PropertyName>myns:COLA/myns:NAME</ogc:PropertyName><ogc:Literal>cola_d</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Or> </ogc:And> </ogc:Filter> </wfs:Query> </wfs:GetFeature>

  24. WFS GetFeature Response <?xml version = '1.0' encoding = 'UTF-8'?> <wfs:FeatureCollection xsi:schemaLocation="http://www.example.com/myns http://localhost:8888/wfsservlet?featureTypeId=1 http://www.opengis.net/wfs ../wfs/1.0.0/WFS-basic.xsd" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <gml:boundedBy xmlns:gml="http://www.opengis.net/gml"> <gml:Box srsName="SDO:8307"> <gml:coordinates>3.0,3.0 6.0,5.0</gml:coordinates> </gml:Box> </gml:boundedBy> <gml:featureMember xmlns:gml="http://www.opengis.net/gml"> <myns:COLA fid="3" xmlns:myns="http://www.example.com/myns"> <myns:MKT_ID>3</myns:MKT_ID> <myns:NAME>cola_c</myns:NAME> <myns:SHAPE> <gml:Polygon srsName="SDO:8307" xmlns:gml="http://www.opengis.net/gml"> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates decimal="." cs="," ts=" ">3.0,3.0 6.0,3.0 6.0,5.0 4.0,5.0 3.0,3.0 </gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> </gml:Polygon> </myns:SHAPE> </myns:COLA> </gml:featureMember> </wfs:FeatureCollection>

More Related