{"id":72,"date":"2007-07-15T11:56:48","date_gmt":"2007-07-15T16:56:48","guid":{"rendered":"http:\/\/www.kralidis.ca\/blog\/2007\/07\/15\/owslib-and-mapscript\/"},"modified":"2007-07-15T11:56:48","modified_gmt":"2007-07-15T16:56:48","slug":"owslib-and-mapscript","status":"publish","type":"post","link":"https:\/\/www.kralidis.ca\/blog\/2007\/07\/15\/owslib-and-mapscript\/","title":{"rendered":"OWSlib and mapscript"},"content":{"rendered":"<p>My first major code contribution to MapServer was a server side implementation of <a href=\"http:\/\/www.opengeospatial.org\/standards\/common\" title=\"OWS Common\">OWS Common<\/a> <a href=\"http:\/\/portal.opengeospatial.org\/files\/?artifact_id=8798\" title=\"1.0.0\">1.0.0<\/a>.  For those who are not aware, OWS Common is a specification which unifies common XML constructs, etc. used by OGC specifications, such as Capabilities metadata, exception reports and bounding box encodings.  The benefit of OWS Common is that specifications, and subsequently server implementations, can focus on their core specific functionality while leveraging the common bits.<\/p>\n<p>A good example here is MapServer&#8217;s SOS server support, which leverages <a href=\"http:\/\/trac.osgeo.org\/mapserver\/browser\/trunk\/mapserver\/mapowscommon.c\" title=\"mapowscommon.c\">mapowscommon.c<\/a>, making <a href=\"http:\/\/trac.osgeo.org\/mapserver\/browser\/trunk\/mapserver\/mapogcsos.c\" title=\"mapogcsos.c\">mapogcsos.c<\/a> alot lighter as a result.  Client implementations can additionally write OWS Common parsers as reusable functionality which they can then use when writing their, say, WFS and SOS clients.  I really believe that this is a benefit for those developing SDI components (i.e. why should contact information be encoded differently for WMS and WFS, really?); just imagine the reduction in code as a result of OWS Common!<\/p>\n<p><a href=\"http:\/\/zcologia.com\/news\/\" title=\"Sean\">Sean<\/a> recently pointed me to <a href=\"http:\/\/trac.gispython.org\/projects\/PCL\/wiki\/OwsLib\" title=\"OWSlib\">OWSlib<\/a>, a python lib for working with OGC Web Services.  I initially thought it would be great to write an OWS Common client \/ parser for OWSlib, so that when WFS 1.1.0 and SOS 1.0.0 clients are developed, they can use an OWS Common class between them.<\/p>\n<p>But then I thought why not just implement this in MapServer, and have the functionality exposed via mapscript?<\/p>\n<link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.css\" \/>\n<!--[if lte IE 8]>\n  <link rel=\"stylesheet\" href=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.ie.css\" \/>\n<![endif]-->\n<script src=\"http:\/\/cdn.leafletjs.com\/leaflet-0.5\/leaflet.js\"><\/script>\n<style type=\"text\/css\">#map72 { width: 300px; height: 200px; }<\/style>\n\n<div id=\"map72\"><\/div>\n<script type=\"text\/javascript\">\n  var map72 = L.map('map72').setView([43.620495, -79.513198], 10);\n  L.tileLayer('http:\/\/{s}.tile.osm.org\/{z}\/{x}\/{y}.png', {\n      attribution: '&copy; <a href=\"http:\/\/osm.org\/copyright\">OpenStreetMap<\/a> contributors'\n  }).addTo(map72);\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>My first major code contribution to MapServer was a server side implementation of OWS Common 1.0.0. For those who are not aware, OWS Common is a specification which unifies common XML constructs, etc. used by OGC specifications, such as Capabilities metadata, exception reports and bounding box encodings. The benefit of OWS Common is that specifications, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7,3,11],"tags":[],"class_list":["post-72","post","type-post","status-publish","format-standard","hentry","category-geospatial","category-open-source","category-technology","category-web"],"_links":{"self":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts\/72","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/comments?post=72"}],"version-history":[{"count":0,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kralidis.ca\/blog\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}