<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/env python
###############################################################################
# $Id$
#
# Project:  GDAL/OGR Test Suite
# Purpose:  Test WMS client support.
# Author:   Frank Warmerdam &lt;warmerdam@pobox.com&gt;
# 
###############################################################################
# Copyright (c) 2003, Frank Warmerdam &lt;warmerdam@pobox.com&gt;
# 
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
###############################################################################

import os
import sys
import string
import array
import gdal
import shutil

sys.path.append( '../pymod' )

import gdaltest

###############################################################################
# Verify we have the driver.

def wms_1():

    try:
        gdaltest.wms_drv = gdal.GetDriverByName( 'WMS' )
    except:
        gdaltest.wms_drv = None

    if gdaltest.wms_drv is None:
        return 'skip'
    else:
        return 'success'

###############################################################################
# Open the WMS dataset

def wms_2():

    if gdaltest.wms_drv is None:
        return 'skip'
        
    # NOTE - mloskot:
    # This is a dirty hack checking if remote WMS service is online.
    # Nothing genuine but helps to keep the buildbot waterfall green.
    
    srv = 'http://sedac.ciesin.columbia.edu/mapserver/map/GPWv3?'
    gdaltest.wms_srv1_ok = gdaltest.gdalurlopen(srv) is not None
    gdaltest.wms_ds = None
    
    if not gdaltest.wms_srv1_ok:
        return 'skip'
    
    gdaltest.wms_ds = gdal.Open( 'data/pop_wms.xml' )

    if gdaltest.wms_ds is not None:
        return 'success'
    else:
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

###############################################################################
# Check various things about the configuration.

def wms_3():

    if gdaltest.wms_drv is None or gdaltest.wms_ds is None:
        return 'skip'

    if not gdaltest.wms_srv1_ok:
        return 'skip'

    if gdaltest.wms_ds.RasterXSize != 36000 \
       or gdaltest.wms_ds.RasterYSize != 14500 \
       or gdaltest.wms_ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        return 'fail'
    
    wkt = gdaltest.wms_ds.GetProjectionRef()
    if wkt[:14] != 'GEOGCS["WGS 84':
        gdaltest.post_reason( 'Got wrong SRS: ' + wkt )
        return 'fail'
        
    gt = gdaltest.wms_ds.GetGeoTransform()
    if abs(gt[0]- -180) &gt; 0.00001 \
       or abs(gt[3]- 85) &gt; 0.00001 \
       or abs(gt[1] - 0.01) &gt; 0.00001 \
       or abs(gt[2] - 0) &gt; 0.00001 \
       or abs(gt[5] - -0.01) &gt; 0.00001 \
       or abs(gt[4] - 0) &gt; 0.00001:
        gdaltest.post_reason( 'wrong geotransform' )
        print(gt)
        return 'fail'
    
    if gdaltest.wms_ds.GetRasterBand(1).GetOverviewCount() &lt; 1:
        gdaltest.post_reason( 'no overviews!' )
        return 'fail'

    if gdaltest.wms_ds.GetRasterBand(1).DataType &lt; gdal.GDT_Byte:
        gdaltest.post_reason( 'wrong band data type' )
        return 'fail'

    return 'success'

###############################################################################
# Check checksum for a small region.

def wms_4():

    if gdaltest.wms_drv is None or gdaltest.wms_ds is None:
        return 'skip'

    if not gdaltest.wms_srv1_ok:
        return 'skip'
        
    gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', 'ON')
    gdal.PushErrorHandler('CPLQuietErrorHandler')

    cs = gdaltest.wms_ds.GetRasterBand(1).Checksum( 0, 0, 100, 100 )

    gdal.PopErrorHandler()
    gdal.SetConfigOption('CPL_ACCUM_ERROR_MSG', 'OFF')
    msg = gdal.GetLastErrorMsg()
    gdal.ErrorReset()

    if msg is not None and msg.find('Service denied due to system overload') != -1:
        print(msg)
        return 'skip'

    if cs != 57182:
        gdaltest.post_reason( 'Wrong checksum: ' + str(cs) )
        return 'fail'

    return 'success'

###############################################################################
# Open the WMS service using XML as filename.

def wms_5():

    if gdaltest.wms_drv is None:
        return 'skip'

    # We don't need to check if the remote service is online as we
    # don't need a connection for this test
    
    fn = '&lt;GDAL_WMS&gt;&lt;Service name="WMS"&gt;&lt;Version&gt;1.1.1&lt;/Version&gt;&lt;ServerUrl&gt;http://onearth.jpl.nasa.gov/wms.cgi?&lt;/ServerUrl&gt;&lt;SRS&gt;EPSG:4326&lt;/SRS&gt;&lt;ImageFormat&gt;image/jpeg&lt;/ImageFormat&gt;&lt;Layers&gt;modis,global_mosaic&lt;/Layers&gt;&lt;Styles&gt;&lt;/Styles&gt;&lt;/Service&gt;&lt;DataWindow&gt;&lt;UpperLeftX&gt;-180.0&lt;/UpperLeftX&gt;&lt;UpperLeftY&gt;90.0&lt;/UpperLeftY&gt;&lt;LowerRightX&gt;180.0&lt;/LowerRightX&gt;&lt;LowerRightY&gt;-90.0&lt;/LowerRightY&gt;&lt;SizeX&gt;2666666&lt;/SizeX&gt;&lt;SizeY&gt;1333333&lt;/SizeY&gt;&lt;/DataWindow&gt;&lt;Projection&gt;EPSG:4326&lt;/Projection&gt;&lt;BandsCount&gt;3&lt;/BandsCount&gt;&lt;/GDAL_WMS&gt;'

    ds = gdal.Open( fn )

    if ds is None:
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

    if ds.RasterXSize != 2666666 \
       or ds.RasterYSize != 1333333 \
       or ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        return 'fail'

    ds = None

    return 'success'

###############################################################################
# Test TileService

def wms_6():

    if gdaltest.wms_drv is None:
        return 'skip'
    
    # We don't need to check if the remote service is online as we
    # don't need a connection for this test
    
    fn = '&lt;GDAL_WMS&gt;&lt;Service name="TileService"&gt;&lt;Version&gt;1&lt;/Version&gt;&lt;ServerUrl&gt;http://s0.tileservice.worldwindcentral.com/getTile?&lt;/ServerUrl&gt;&lt;Dataset&gt;za.johannesburg_2006_20cm&lt;/Dataset&gt;&lt;/Service&gt;&lt;DataWindow&gt;&lt;UpperLeftX&gt;-180.0&lt;/UpperLeftX&gt;&lt;UpperLeftY&gt;90.0&lt;/UpperLeftY&gt;&lt;LowerRightX&gt;180.0&lt;/LowerRightX&gt;&lt;LowerRightY&gt;-90.0&lt;/LowerRightY&gt;&lt;SizeX&gt;268435456&lt;/SizeX&gt;&lt;SizeY&gt;134217728&lt;/SizeY&gt;&lt;TileLevel&gt;19&lt;/TileLevel&gt;&lt;/DataWindow&gt;&lt;Projection&gt;EPSG:4326&lt;/Projection&gt;&lt;OverviewCount&gt;16&lt;/OverviewCount&gt;&lt;BlockSizeX&gt;512&lt;/BlockSizeX&gt;&lt;BlockSizeY&gt;512&lt;/BlockSizeY&gt;&lt;BandsCount&gt;3&lt;/BandsCount&gt;&lt;/GDAL_WMS&gt;'

    ds = gdal.Open( fn )

    if ds is None:
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

    if ds.RasterXSize != 268435456 \
       or ds.RasterYSize != 134217728 \
       or ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        return 'fail'

    ds = None

    return 'success'

###############################################################################
# Test TMS

def wms_7():

    if gdaltest.wms_drv is None:
        return 'skip'

    srv = 'http://labs.metacarta.com/wms-c/Basic.py'
    gdaltest.metacarta_tms = False
    if gdaltest.gdalurlopen(srv) is None:
        return 'skip'
    gdaltest.metacarta_tms = True

    tms = """&lt;GDAL_WMS&gt;
    &lt;Service name="TMS"&gt;
        &lt;ServerUrl&gt;http://labs.metacarta.com/wms-c/Basic.py&lt;/ServerUrl&gt;
        &lt;Layer&gt;basic&lt;/Layer&gt;
        &lt;Format&gt;png&lt;/Format&gt;
    &lt;/Service&gt;
    &lt;DataWindow&gt;
        &lt;UpperLeftX&gt;-180.0&lt;/UpperLeftX&gt;
        &lt;UpperLeftY&gt;90.0&lt;/UpperLeftY&gt;
        &lt;LowerRightX&gt;180.0&lt;/LowerRightX&gt;
        &lt;LowerRightY&gt;-90.0&lt;/LowerRightY&gt;
        &lt;TileLevel&gt;19&lt;/TileLevel&gt;
        &lt;TileCountX&gt;2&lt;/TileCountX&gt;
        &lt;TileCountY&gt;1&lt;/TileCountY&gt;
    &lt;/DataWindow&gt;
    &lt;Projection&gt;EPSG:4326&lt;/Projection&gt;
    &lt;BlockSizeX&gt;256&lt;/BlockSizeX&gt;
    &lt;BlockSizeY&gt;256&lt;/BlockSizeY&gt;
    &lt;BandsCount&gt;3&lt;/BandsCount&gt;
&lt;/GDAL_WMS&gt;"""

    ds = gdal.Open( tms )

    if ds is None:
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

    if ds.RasterXSize != 268435456 \
       or ds.RasterYSize != 134217728 \
       or ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        print(ds.RasterXSize)
        print(ds.RasterYSize)
        return 'fail'

    if ds.GetRasterBand(1).GetOverview(18).XSize != 512 \
       or ds.GetRasterBand(1).GetOverview(18).YSize != 256:
        print(ds.GetRasterBand(1).GetOverview(18).XSize)
        print(ds.GetRasterBand(1).GetOverview(18).YSize)
        return 'fail'

    ds.GetRasterBand(1).GetOverview(18).ReadRaster(0, 0, 512, 256)

    ds = None

    return 'success'


###############################################################################
# Test TMS with cache

def wms_8():

    if gdaltest.wms_drv is None:
        return 'skip'

    if gdaltest.metacarta_tms is not True:
        return 'skip'

    tms = """&lt;GDAL_WMS&gt;
    &lt;Service name="TMS"&gt;
        &lt;ServerUrl&gt;http://labs.metacarta.com/wms-c/Basic.py&lt;/ServerUrl&gt;
        &lt;Layer&gt;basic&lt;/Layer&gt;
        &lt;Format&gt;png&lt;/Format&gt;
    &lt;/Service&gt;
    &lt;DataWindow&gt;
        &lt;UpperLeftX&gt;-180.0&lt;/UpperLeftX&gt;
        &lt;UpperLeftY&gt;90.0&lt;/UpperLeftY&gt;
        &lt;LowerRightX&gt;180.0&lt;/LowerRightX&gt;
        &lt;LowerRightY&gt;-90.0&lt;/LowerRightY&gt;
        &lt;TileLevel&gt;19&lt;/TileLevel&gt;
        &lt;TileCountX&gt;2&lt;/TileCountX&gt;
        &lt;TileCountY&gt;1&lt;/TileCountY&gt;
    &lt;/DataWindow&gt;
    &lt;Projection&gt;EPSG:4326&lt;/Projection&gt;
    &lt;BlockSizeX&gt;256&lt;/BlockSizeX&gt;
    &lt;BlockSizeY&gt;256&lt;/BlockSizeY&gt;
    &lt;BandsCount&gt;3&lt;/BandsCount&gt;
    &lt;Cache&gt;&lt;Path&gt;./tmp/gdalwmscache&lt;/Path&gt;&lt;/Cache&gt;
&lt;/GDAL_WMS&gt;"""

    try:
        shutil.rmtree('tmp/gdalwmscache')
    except:
        pass

    ds = gdal.Open( tms )

    if ds is None:
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

    ds.GetRasterBand(1).GetOverview(18).ReadRaster(0, 0, 512, 256)

    ds = None

    try:
        os.stat('tmp/gdalwmscache')
    except:
        gdaltest.post_reason( 'tmp/gdalwmscache should exist')
        return 'fail'

    # Now, we should read from the cache
    ds = gdal.Open( tms )
    ds.GetRasterBand(1).GetOverview(18).ReadRaster(0, 0, 512, 256)
    ds = None

    return 'success'

###############################################################################
# Test OnEarth Tiled WMS minidriver

def wms_9():

    if gdaltest.wms_drv is None:
        return 'skip'

    tms = """&lt;GDAL_WMS&gt;
    &lt;Service name="TiledWMS"&gt;
	&lt;ServerUrl&gt;http://onearth.jpl.nasa.gov/wms.cgi?&lt;/ServerUrl&gt;
	&lt;TiledGroupName&gt;Global SRTM Elevation&lt;/TiledGroupName&gt;
    &lt;/Service&gt;
&lt;/GDAL_WMS&gt;
"""

    ds = gdal.Open( tms )

    if ds is None:
        srv = 'http://onearth.jpl.nasa.gov/wms.cgi?'
        if gdaltest.gdalurlopen(srv) is None:
            return 'skip'
        gdaltest.post_reason( 'open failed.' )
        return 'fail'

    expected_cs = 5478
    cs = ds.GetRasterBand(1).GetOverview(9).Checksum()

    if cs != expected_cs:
        gdaltest.post_reason( 'Did not get expected SRTM checksum.' )
        print(cs)
        return 'fail'

    ds = None

    return 'success'

###############################################################################
# Test getting subdatasets from GetCapabilities

def wms_10():

    if gdaltest.wms_drv is None:
        return 'skip'

    if not gdaltest.wms_srv1_ok:
        return 'skip'

    name = "WMS:http://sedac.ciesin.columbia.edu/mapserver/map/GPWv3?"
    ds = gdal.Open( name )
    if ds is None:
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    subdatasets = ds.GetMetadata("SUBDATASETS")
    if len(subdatasets) == 0:
        gdaltest.post_reason( 'did not get expected subdataset count' )
        print(subdatasets)
        return 'fail'

    ds = None

    name = subdatasets['SUBDATASET_1_NAME']
    ds = gdal.Open( name )
    if ds is None:
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    ds = None

    return 'success'

###############################################################################
# Test getting subdatasets from GetTileService

def wms_11():

    if gdaltest.wms_drv is None:
        return 'skip'

    name = "WMS:http://onearth.jpl.nasa.gov/wms.cgi?request=GetTileService"
    ds = gdal.Open( name )
    if ds is None:
        srv = 'http://onearth.jpl.nasa.gov/wms.cgi?request=GetTileService'
        if gdaltest.gdalurlopen(srv) is None:
            return 'skip'
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    subdatasets = ds.GetMetadata("SUBDATASETS")
    if len(subdatasets) == 0:
        gdaltest.post_reason( 'did not get expected subdataset count' )
        print(subdatasets)
        return 'fail'

    ds = None

    name = subdatasets['SUBDATASET_1_NAME']
    ds = gdal.Open( name )
    if ds is None:
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    ds = None

    return 'success'

###############################################################################
# Test getting subdatasets from a TMS server

def wms_12():

    if gdaltest.wms_drv is None:
        return 'skip'

    if gdaltest.metacarta_tms is not True:
        return 'skip'

    name = "http://tilecache.osgeo.org/wms-c/Basic.py/1.0.0/"
    ds = gdal.Open( name )
    if ds is None:
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    subdatasets = ds.GetMetadata("SUBDATASETS")
    if len(subdatasets) == 0:
        gdaltest.post_reason( 'did not get expected subdataset count' )
        print(subdatasets)
        return 'fail'

    ds = None

    for i in range(len(subdatasets) // 2):
        desc = subdatasets['SUBDATASET_%d_DESC' % (i+1)]
        if desc == 'basic':
            name = subdatasets['SUBDATASET_%d_NAME' % (i+1)]
            ds = gdal.Open( name )
            if ds is None:
                gdaltest.post_reason( 'open of %s failed.' % name)
                return 'fail'
            ds = None

    return 'success'

###############################################################################
# Test reading WMS through VRT (test effect of r21866)

def wms_13():

    if gdaltest.wms_drv is None:
        return 'skip'

    ds = gdal.Open( "data/DNEC_250K.vrt" )
    if ds.ReadRaster(0, 0, 1024, 682) is None:
        srv = 'http://wms.geobase.ca/wms-bin/cubeserv.cgi?SERVICE=WMS&amp;VERSION=1.1.1&amp;REQUEST=GeCapabilities'
        if gdaltest.gdalurlopen(srv) is None:
            return 'skip'
        return 'fail'
    ds = None

    return 'success'



###############################################################################
# Test reading Virtual Earth layer

def wms_14():

    if gdaltest.wms_drv is None:
        return 'skip'
    ds = gdal.Open( """&lt;GDAL_WMS&gt;
  &lt;Service name="VirtualEarth"&gt;
    &lt;ServerUrl&gt;http://a${server_num}.ortho.tiles.virtualearth.net/tiles/a${quadkey}.jpeg?g=90&lt;/ServerUrl&gt;
  &lt;/Service&gt;
&lt;/GDAL_WMS&gt;""")
    if ds is None:
        return' fail'

    if ds.RasterXSize != 134217728 \
       or ds.RasterYSize != 134217728 \
       or ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        return 'fail'

    wkt = ds.GetProjectionRef()
    if wkt.find('PROJCS["Google Maps Global Mercator"') != 0:
        gdaltest.post_reason( 'Got wrong SRS: ' + wkt )
        return 'fail'

    gt = ds.GetGeoTransform()
    if abs(gt[0]- -20037508.339999999850988) &gt; 0.00001 \
       or abs(gt[3]- 20037508.339999999850988) &gt; 0.00001 \
       or abs(gt[1] - 0.298582141697407) &gt; 0.00001 \
       or abs(gt[2] - 0) &gt; 0.00001 \
       or abs(gt[5] - -0.298582141697407) &gt; 0.00001 \
       or abs(gt[4] - 0) &gt; 0.00001:
        gdaltest.post_reason( 'wrong geotransform' )
        print(gt)
        return 'fail'

    if ds.GetRasterBand(1).GetOverviewCount() != 18:
        gdaltest.post_reason( 'bad overview count' )
        print(ds.GetRasterBand(1).GetOverviewCount())
        return 'fail'

    (block_xsize, block_ysize) = ds.GetRasterBand(1).GetBlockSize()
    if block_xsize != 256 or block_ysize != 256:
        gdaltest.post_reason( 'bad block size' )
        print("(%d, %d)" % (block_xsize, block_ysize))
        return 'fail'

    return 'success'

###############################################################################
# Test reading ArcGIS MapServer JSon definition and CreateCopy()

def wms_15():

    if gdaltest.wms_drv is None:
        return 'skip'
    src_ds = gdal.Open( "http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&amp;pretty=true")
    if src_ds is None:
        srv = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=json&amp;pretty=true'
        if gdaltest.gdalurlopen(srv) is None:
            return 'skip'
        return 'fail'
    ds = gdal.GetDriverByName("WMS").CreateCopy("/vsimem/wms.xml", src_ds)
    src_ds = None

    if ds is None:
        return' fail'

    if ds.RasterXSize != 134217728 \
       or ds.RasterYSize != 134217728 \
       or ds.RasterCount != 3:
        gdaltest.post_reason( 'wrong size or bands' )
        return 'fail'

    wkt = ds.GetProjectionRef()
    if wkt.find('PROJCS["WGS 84 / Pseudo-Mercator"') != 0:
        gdaltest.post_reason( 'Got wrong SRS: ' + wkt )
        return 'fail'

    gt = ds.GetGeoTransform()
    if abs(gt[0]- -20037508.342787001) &gt; 0.00001 \
       or abs(gt[3]- 20037508.342787001) &gt; 0.00001 \
       or abs(gt[1] - 0.298582141697407) &gt; 0.00001 \
       or abs(gt[2] - 0) &gt; 0.00001 \
       or abs(gt[5] - -0.298582141697407) &gt; 0.00001 \
       or abs(gt[4] - 0) &gt; 0.00001:
        gdaltest.post_reason( 'wrong geotransform' )
        print(gt)
        return 'fail'

    if ds.GetRasterBand(1).GetOverviewCount() != 19:
        gdaltest.post_reason( 'bad overview count' )
        print(ds.GetRasterBand(1).GetOverviewCount())
        return 'fail'

    (block_xsize, block_ysize) = ds.GetRasterBand(1).GetBlockSize()
    if block_xsize != 256 or block_ysize != 256:
        gdaltest.post_reason( 'bad block size' )
        print("(%d, %d)" % (block_xsize, block_ysize))
        return 'fail'

    ds = None
    gdal.Unlink("/vsimem/wms.xml")

    return 'success'

###############################################################################
# Test getting subdatasets from WMS-C Capabilities

def wms_16():

    if gdaltest.wms_drv is None:
        return 'skip'

    name = "WMS:http://demo.opengeo.org/geoserver/gwc/service/wms?tiled=TRUE"
    ds = gdal.Open( name )
    if ds is None:
        srv = 'http://demo.opengeo.org/geoserver/gwc/service/wms?'
        if gdaltest.gdalurlopen(srv) is None:
            return 'skip'
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    subdatasets = ds.GetMetadata("SUBDATASETS")
    if len(subdatasets) == 0:
        gdaltest.post_reason( 'did not get expected subdataset count' )
        print(subdatasets)
        return 'fail'

    ds = None

    name = subdatasets['SUBDATASET_1_NAME']
    ds = gdal.Open( name )
    if ds is None:
        gdaltest.post_reason( 'open of %s failed.' % name)
        return 'fail'

    ds = None

    return 'success'

###############################################################################
def wms_cleanup():

    gdaltest.wms_ds = None
    gdaltest.clean_tmp()
    
    return 'success'

gdaltest_list = [
    wms_1,
    wms_2,
    wms_3,
    wms_4,
    wms_5,
    wms_6,
    wms_7,
    wms_8,
    wms_9,
    wms_10,
    wms_11,
    wms_12,
    wms_13,
    wms_14,
    wms_15,
    wms_16,
    wms_cleanup ]

if __name__ == '__main__':

    gdaltest.setup_run( 'wms' )

    gdaltest.run_tests( gdaltest_list )

    gdaltest.summarize()

</pre></body></html>