Last active
December 7, 2015 14:53
-
-
Save ping13/d611515452281ac0c840 to your computer and use it in GitHub Desktop.
short script to check compliance of WFS,WMS,WMTS,CSW services with eCH-0056
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# short script to check compliance with eCH-0056 | |
# http://www.ech.ch/vechweb/page?p=dossier&documentNumber=eCH-0056&documentVersion=1.00 | |
# module ows_checker: https://github.com/gjn/mf-chsdi/tree/master/ows_checker | |
import ows_checker | |
esri_services = { | |
"CSW" : "http://gptogc.esri.com/geoportal/csw", | |
"WMS" : "http://example.com/arcgis/services/Beispiel/Infrastruktur/MapServer/WMSServer", | |
"WFS" : "http://example.com/arcgis/services/Beispiel/Infrastruktur/MapServer/WFSServer", | |
} | |
geoadmin_services = { | |
"WMS": "http://wms.geo.admin.ch" | |
} | |
def check_services(services): | |
for service_type, base_url in services.iteritems(): | |
checker = ows_checker.OWSCheck(base_url, cwd="ows_checker/settings", service=service_type) | |
results = checker.getResultsOverview(aggregate=True) | |
print "Test {}\n=========".format(service_type) | |
for msg in results[0]["msg"]: | |
print " {}".format(msg) | |
for services in [esri_services, geoadmin_services]: | |
check_services(services) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment