LRIS Portal OGC CSW API

Introduction

The LRIS portal metadata can be searched by third party clients using the OGC CSW (Catalog Services for the Web) protocol supporting HTTP binding to invoke the operations. (If you are looking for web mapping services (WMS), services for certain data sets are available at http://maps.scinfo.org.nz .)

The portal supports OpenGIS® Catalogue Services Specification 2.0 - ISO19115/ISO19119 Application Profile for CSW 2.0 of OpenGIS® Catalogue Services Specification (Version 2.0.2, Corrigendum 2 Release, Date: 2007-02-23).

The protocol operations are described in the document OpenGIS® Catalogue Services Specification:

http://portal.opengeospatial.org/files/?artifact_id=20555


The OpenGIS® Catalogue Services Specification 2.0.2 -ISO Metadata Application Profile can be found at

http://portal.opengeospatial.org/files/?artifact_id=21460


The LRIS Portal supports the following CSW operations:

  • GetCapabilities
  • DescribeRecord
  • GetRecords
  • GetRecordById

Below we describe the different operations supported by the LRIS portal with some examples of usage using the HTTP GET method.  Refer to the OpenGIS® Catalogue Services Specification for a complete list of parameters of each CSW operation and also their use using the HTTP POST method.

CSW operations

The LRIS Portal catalogue CSW service can be accessed at:


http://lris.scinfo.org.nz/feeds/csw/


The CSW operations can be accessed using POST, GET methods and SOAP encoding. If you have access to a client that supports the CSW specificatione.g. GIgo, just point the client at the URL above.


GetCapabilities

The GetCapabilities operation allows clients supporting the CSW specification to request service metadata from the LRIS Portal. The response to a GetCapabilities request is an XML document containing service metadata about the server.

Example GetCapabilities GET KVP request:

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=GetCapabilities&acceptVersions=2.0.2&acceptFormats=application/xml

 

DescribeRecord

The DescribeRecord operation allows a client to discover elements of the information model supported by the LRIS Portal. The operation allows some or all of the information model to be described.

Example GET KVP request:

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=DescribeRecord&version=2.0.2&outputFormat=application/xml

 

GetRecords

A GetRecords request allows a client to query the LRIS Portal catalogue. A query is specified in OGC Filter or CQL languages (see the specification for more details about these languages).


The OGC Catalogue Service means of resource discovery comprises two operations: search and present. In the HTTP protocol binding these are combined in the GetRecords operation so that the operation performs a search and a piggybacked present.


The search portion of the GetRecords operation is encoded using the Query element. The Query element includes the parameters typeName and Constraint. The typeName parameter is used to specify which entities from the information model of the catalogue can be queried e.g. typeNames="csw:Record". The Constraint parameter is used to specify which query constraints shall be applied to identify the result set.

Example GET KVP requests

The example below queries the catalogue using a search for any occurrence of the string 'water' in any field. The service, version, and request parameters are standard for an OGC service. The parameters that make this a catalogue search are constraintlanguage, which says the query will be written in CQL and the constraint which is the query (expressed in CQL).

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=GetRecords&version=2.0.2&namespace=xmlns%28csw=http://www.opengis.net/cat/csw%29&resultType=results&outputSchema=http://www.opengis.net/cat/csw/2.0.2&outputFormat=application/xml&maxRecords=10&typeNames=csw:Record&elementSetName=summary&constraintLanguage=CQL_TEXT&&constraint_language_version=1.1.0&constraint=AnyText Like 'water'

In this case core metadata is returned as a request for the Common Element Set. The Common Element Set is a group of public metadata elements expressed using the nomenclature and syntax of Dublin Core Metadata, ISO 15836. The records returned can be brief, summary or full records; in this example summary records were requested. The maximum number of records to be returned to the client is also specified i.e. 10.

 

In the example below the TypeName is gmd:MD_Metadata and the outputSchema http://www.isotc211.org/2005/gmd which is the outputschema of the application profile for ISO 19115 metadata with support for XML encoding per ISO 19139.

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=GetRecords&version=2.0.2&namespace=xmlns%28csw=http://www.opengis.net/cat/csw%29&resultType=results&outputSchema=http://www.isotc211.org/2005/gmd&outputFormat=application/xml&maxRecords=10&typeNames=gmd:MD_Metadata&elementSetName=summary&constraintLanguage=CQL_TEXT&&constraint_language_version=1.1.0&constraint=AnyText Like 'water'

 

In the next example the search is for metadata records which contain the word ‘water in the title.

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=GetRecords&version=2.0.2&namespace=xmlns%28csw=http://www.opengis.net/cat/csw%29&resultType=results&outputSchema=http://www.opengis.net/cat/csw/2.0.2&outputFormat=application/xml&maxRecords=10&typeNames=csw:Record&elementSetName=summary&constraintLanguage=CQL_TEXT&&constraint_language_version=1.1.0&constraint=Title LIKE 'water'

 

Finally in this example the search is for metadata records for which the geographical bounding box coincides fully or partly with a certain area in this case the southernmost part of New Zealand. The ows:BoundingBox element is used to express the spatial extent of the metadata record.

http://lris.scinfo.org.nz/feeds/csw/?service=CSW&request=GetRecords&version=2.0.2&namespace=xmlns%28csw=http://www.opengis.net/cat/csw%29&resultType=results&outputSchema=http://www.opengis.net/cat/csw/2.0.2&outputFormat=application/xml&maxRecords=10&typeNames=csw:Record&elementSetName=summary&constraintLanguage=CQL_TEXT&&constraint_language_version=1.1.0&constraint= BBOX(ows:BoundingBox, 164.88,-47.46,169.45,-43.85)

 

GetRecordById

A GetRecordById request retrieves the default representation of the catalogue metadata records using their identifier. This operation presumes that a previous query has been performed to obtain the identifiers that are used with this operation.

Example GET KVP request

http://lris.scinfo.org.nz/feeds/csw?request=GetRecordById&service=CSW&version=2.0.2&resultType=results&typeNames=csw:Record&elementSetName=full&id=d7c97e89-4c18-1f65-ff95-510aaf000021


The outputSchema parameter can be  included in the GetRecordById operation to allow clients to request a representation of a catalogue record other than the default representation. Without the declaration of an Element Set or Output Schema, the server will respond with a default encoding of the results as summary records


8 June 2011