After reading Jeroen's latest post I have a better understanding of what he's
trying to accomplish. I too have a use case for representing OGC services in
feeds. I'm a critic of the OGC service architecture but can't deny that they
are being used and referenced in academic studies, and that there is therefore
a need to model and represent them in an ORE resource map feed. I'm going to
propose a way to do that and then work back toward Jeroen's use case.
Consider this feed, an ORE-like aggregation that Tom is using to
demonstrate how we can form a federation of digital classics projects using a
syndication architecture:
http://homepages.nyu.edu/%7Ete20/examples/nearby/cyrene.atom
How does one represent an OGC web map service (WMS) in this feed? As an entry:
<feed>
...
<entry>
<title>Cyrene WMS</title>
<id>urn:uuid:56b8421c-5150-458d-ac92-ee9e698593b5</id>
...
<link rel="alternate" href="???"/>
</entry>
</feed>
What's the link href to be? My interpretation of the alternate link
relation is that it should be the URI to the closest thing a WMS has to a "home
page". Ideally that would be its capabilities document. (Aside: making an OWS
capabilities document a plain old web resource instead of an RPC call would
greatly improve the OGC service discovery story. I'm not the first to make this
suggestion.)
The entry then becomes something like:
<entry>
<title>Cyrene WMS</title>
<id>urn:uuid:56b8421c-5150-458d-ac92-ee9e698593b5</id>
...
<link
rel="alternate"
href="http://example.com/?service=WMS&request=GetCapabilities..."
type="application/vnd.ogc.wms_xml"
/>
</entry>
It would also be very useful to aggregate into an ORE resource map specific
images from a WMS, particularly if they are used as illustrations in
publication:
<entry>
<title>Figure 8: Cyrene Overview</title>
<id>urn:uuid:408cdb6c-185d-4c45-862b-2809158e0c4f</id>
...
<link
rel="alternate"
href="http://example.com/?service=WMS&request=GetMap&format=image/png&bbox=..."
type="image/png"
/>
</entry>
There's less need for extra metadata in this case: specifying image/png says
it all. It's implicit that clients will address the link href with a GET
request, and that you can get a map image directly like this is one of the
redeeming features of WMS.
So, that's how I see OGC services represented in an ORE-like feed. Jeroen's use
case is different: he'd like to use a feed as a lite capabilities document. I'm
not sure this is a great idea. Bypassing the service capabilities seems a bit
dangerous. If it's only that capabilities documents are too big (and I've run
into some that are 4 megabytes, which is ridiculous), providers should be
encouraged to break these down into smaller collections of logically related
feature types, coverages, and layers. Still too big? Take advantage of HTTP's
built-in caching mechanisms. Provide ETags and Last-Modified times to help
clients limit fetches and parsing. Implement caching proxies.
If you still need to represent GetMap (or other functions) in a feed, there
are some possibilities, and some limitations. URI templates don't belong in atom:link. Instead, Joe Gregorio
has proposed a link_template element. It's not official by any means, but in
combination with a new relation (allowed by Atom), it could let you make an
entry like so:
<entry>
<title>GetMap Endpoint</title>
<id>urn:uuid:09e7a48a-428a-4418-aef4-ea157806d9db</id>
...
<t:link_template
rel="http://opengis.net/relations/getmap-endpoint"
href="http://example.com/?service=WMS&request=GetMap&format={format}&bbox={bbox}"
/>
</entry>
I think that a custom link relation could be the hint Jeroen is looking for. The
OGC's content type problem still needs to be fixed.
Comments
Re: OGC URN Internet-Draft
Author: Yves Moisan
Remove extra dot at the end of the url : draft-creed-ogc-urn-03.txt *.*Re: OGC URN Internet-Draft
Author: Sean
Thanks, Yves.Re: OGC URN Internet-Draft
Author: Kristian
Maybe I'm daft, but wouldn't EPSG:4326 just be replaced with urn:ogc:def:crs:EPSG:6.3:4326? What did you gain by doing that?Re: OGC URN Internet-Draft
Author: Allan Doyle
I've never understood why a URN like urn:ogc:def:crs:EPSG:6.3:26986 is better than a URL like http://urn.opengis.net/def/crs/EPSG/6.3/26986 which seems to be to be more amenable to being usable in a REST setting anyway. When I go to http://urn.opengis.net there's a web form that generates the URL http://urn.opengis.net/?urn=urn%3Aogc%3Adef%3Acrs%3AEPSG%3A6.3%3A26986&resource=url for that URN. But that results in an HTTP 400 "Bad request". So where does that leave me in knowing anything at all? Note that I'm not picking on OGC, I'm not sure I understand the reasoning behind having constructs in the web that require a resolver other than those already at play in URLs. I guess if the URN components are meant to be non-opaque, then that distinguishes them from URLs that (in REST, at least) should be treated as though they are. Also, in the case of the URN, you have to first find the authority's resolver, which means you're doing a double lookup. And, you're doing it via a mechanism that's not DNS and is thus most likely slower.Re: OGC URN Internet-Draft
Author: Sean
Allan, these URNs aren't intended to be resolved. Some of the rationale can be found on the SEE GRID wiki (a site that helps me understand the OGC architecture better than any other). A few of the listed URL weaknesses are bogus, but the case for URNs is made well.Re: OGC URN Internet-Draft
Author: Allan Doyle
Thanks for the reference, Sean. I think the authors of that Wiki page show a lack of understanding of REST, or at least are being a bit lazy about how they write things down. They also seem to fall into the trap of thinking that URLs must resolve, and that URLs reflect some physical structure on the server in their arguments for the utility of unresolvable identifiers. The bits about well-governed can apply to URLs just as much as to URIs. In the end, their argument comes down to the fact that a URI should be opaque, and that, in turn, brings us right back to Kristian's point. OGC is just replacing one string with another. But that's OGC's prerogative. In the meantime, will all those new OGC URNs get coded into PROJ and other widely used packages? The success or failure of the URN scheme will depend pretty heavily and correlate pretty directly with how quickly and cleanly it gets adopted into open source implementations.Re: OGC URN Internet-Draft
Author: Allan Doyle
Correction: "In the end, their argument comes down to the fact that a URI should be opaque" should have said URN instead of URI.Re: OGC URN Internet-Draft
Author: Sean
I agree that we're trading one name for another, but we can't leave behind the legacy of confusion (coordinate order, etc) around EPSG:4326 unless we do.Re: OGC URN Internet-Draft
Author: Allan Doyle
My unofficial mantra: "It's the packaging, stupid." I agree that the EPSG:4326 legacy is troubled.