<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>OWSLib</name>
<shortdesc>OGC Web Service utility library</shortdesc>
<description>OWSLib
======

Package for working with OGC map, feature, and coverage services.

OWSLib provides a common API for accessing service metadata and wrappers for
GetCapabilities, GetMap, and GetFeature requests.

The OWSLib version 0.3 API is incompatible with version 0.2.1.

Dependencies
------------

OWSLib requires elementtree (standard in 2.5 as xml.etree) or lxml.

Usage
-----

Find out what a WMS has to offer. Service metadata::

    &gt;&gt;&gt; from owslib.wms import WebMapService
    &gt;&gt;&gt; wms = WebMapService('http://wms.jpl.nasa.gov/wms.cgi', version='1.1.1')
    &gt;&gt;&gt; wms.identification.type
    'OGC:WMS'
    &gt;&gt;&gt; wms.identification.version
    '1.1.1'
    &gt;&gt;&gt; wms.identification.title
    'JPL Global Imagery Service'
    &gt;&gt;&gt; wms.identification.abstract
    'WMS Server maintained by JPL, worldwide satellite imagery.'

Available layers::

    &gt;&gt;&gt; list(wms.contents)
    ['us_landsat_wgs84', 'modis', 'global_mosaic_base', 'huemapped_srtm',
    'srtm_mag', 'daily_terra', 'us_ned', 'us_elevation', 'global_mosaic',
    'daily_terra_ndvi', 'daily_aqua_ndvi', 'daily_aqua_721', 'daily_planet',
    'BMNG', 'srtmplus', 'us_colordem', None, 'daily_aqua', 'worldwind_dem',
    'daily_terra_721']

Details of a layer::

    &gt;&gt;&gt; wms['global_mosaic'].title
    'WMS Global Mosaic, pan sharpened'
    &gt;&gt;&gt; wms['global_mosaic'].boundingBoxWGS84
    (-180.0, -60.0, 180.0, 84.0)
    &gt;&gt;&gt; wms['global_mosaic'].crsOptions
    ['EPSG:4326', 'AUTO:42003']
    &gt;&gt;&gt; wms['global_mosaic'].styles
    {'pseudo_bright': {'title': 'Pseudo-color image (Uses IR and Visual bands,
    542 mapping), gamma 1.5'}, 'pseudo': {'title': '(default) Pseudo-color
    image, pan sharpened (Uses IR and Visual bands, 542 mapping), gamma 1.5'},
    'visual': {'title': 'Real-color image, pan sharpened (Uses the visual
    bands, 321 mapping), gamma 1.5'}, 'pseudo_low': {'title': 'Pseudo-color
    image, pan sharpened (Uses IR and Visual bands, 542 mapping)'},
    'visual_low': {'title': 'Real-color image, pan sharpened (Uses the visual
    bands, 321 mapping)'}, 'visual_bright': {'title': 'Real-color image (Uses
    the visual bands, 321 mapping), gamma 1.5'}}

Available methods, their URLs, and available formats::

    &gt;&gt;&gt; [op.name for op in wms.operations]
    ['GetTileService', 'GetCapabilities', 'GetMap']
    &gt;&gt;&gt; wms.getOperationByName('GetMap').methods
    {'Get': {'url': 'http://wms.jpl.nasa.gov/wms.cgi?'}}
    &gt;&gt;&gt; wms.getOperationByName('GetMap').formatOptions
    ['image/jpeg', 'image/png', 'image/geotiff', 'image/tiff']

That's everything needed to make a request for imagery::

    &gt;&gt;&gt; img = wms.getmap(   layers=['global_mosaic'],
    ...                     styles=['visual_bright'],
    ...                     srs='EPSG:4326',
    ...                     bbox=(-112, 36, -106, 41),
    ...                     size=(300, 250),
    ...                     format='image/jpeg',
    ...                     transparent=True
    ...                     )
    &gt;&gt;&gt; out = open('jpl_mosaic_visb.jpg', 'wb')
    &gt;&gt;&gt; out.write(img.read())
    &gt;&gt;&gt; out.close()

A very similar API exists for WebFeatureService. See
tests/MapServerWFSCapabilities.txt for details.

Known Issues
------------

OWSLib works with WMS version 1.1.1 and WFS 1.0.0 Other versions are not
supported at this time.

Support
-------

OWSLib shares a wiki and email list with the Python Cartographic Library:

http://lists.gispython.org/mailman/listinfo/community

http://trac.gispython.org/projects/PCL/wiki

Updated project information can be found at

http://trac.gispython.org/projects/PCL/wiki/OwsLib</description>
<homepage rdf:resource="http://trac.gispython.org/projects/PCL/wiki/OwsLib" />
<maintainer><foaf:Person><foaf:name>Sean Gillies</foaf:name>
<foaf:mbox_sha1sum>6d4fc00ffb9c849f15b4c0b55833b29e33794116</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.3.1</revision></Version></release>
</Project></rdf:RDF>