Skip to content

Commit

Permalink
Merge pull request #70 from tomkralidis/issue-68
Browse files Browse the repository at this point in the history
add support for OGC:WMTS (#68), looks good!
  • Loading branch information
justb4 committed Nov 18, 2016
2 parents b0b6403 + c33dd88 commit ddf00e3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions GeoHealthCheck/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
'versions': ['1.1.1'],
'capabilities': '?service=WMS&version=1.1.1&request=GetCapabilities'
},
'OGC:WMTS': {
'label': 'Web Map Tile Service (WMTS)',
'versions': ['1.0.0'],
'capabilities': '?service=WMTS&version=1.0.0&request=GetCapabilities'
},
'OGC:WFS': {
'label': 'Web Feature Service (WFS)',
'versions': ['1.1.0'],
Expand Down
3 changes: 3 additions & 0 deletions GeoHealthCheck/healthcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from urlparse import urlparse

from owslib.wms import WebMapService
from owslib.wmts import WebMapTileService
from owslib.wfs import WebFeatureService
from owslib.wcs import WebCoverageService
from owslib.wps import WebProcessingService
Expand Down Expand Up @@ -61,6 +62,8 @@ def run_test_resource(resource_type, url):
try:
if resource_type == 'OGC:WMS':
ows = WebMapService(url)
elif resource_type == 'OGC:WMTS':
ows = WebMapTileService(url)
elif resource_type == 'OGC:WFS':
ows = WebFeatureService(url)
elif resource_type == 'OGC:WCS':
Expand Down
3 changes: 3 additions & 0 deletions GeoHealthCheck/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def get_python_snippet(resource):
if resource.resource_type == 'OGC:WMS':
lines.append('from owslib.wms import WebMapService')
lines.append('myows = WebMapService(\'%s\')' % resource.url)
elif resource.resource_type == 'OGC:WMTS':
lines.append('from owslib.wmts import WebMapTileService')
lines.append('myows = WebMapTileService(\'%s\')' % resource.url)
elif resource.resource_type == 'OGC:CSW':
lines.append('from owslib.csw import CatalogueServiceWeb')
lines.append('myows = CatalogueServiceWeb(\'%s\')' % resource.url)
Expand Down
13 changes: 13 additions & 0 deletions tests/fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,19 @@
["2014-09-10T07:22:22Z", 1, 22.2, "OK"],
["2014-09-10T08:22:22Z", 0, 22.2, "Server error"],
["2014-09-10T10:22:22Z", 0, 22.2, "Server error"]
]}, {
"resource": {
"owner": "admin",
"resource_type": "OGC:WMTS",
"title": "NASA Global Imagery Browse Services for EOSDIS",
"url": "http://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi"
},
"runs": [
["2014-09-09T01:11:11Z", 1, 0.28, "OK"],
["2014-09-09T04:11:11Z", 1, 1.395, "OK"],
["2014-09-10T05:22:22Z", 1, 1.395, "OK"],
["2014-09-10T06:22:22Z", 0, 0.9, "Server error"],
["2014-09-10T07:22:22Z", 1, 22.2, "OK"]
]}
]
}

0 comments on commit ddf00e3

Please sign in to comment.