openlayers / ol2

OpenLayers v2 - deprecated!
Other
1.47k stars 770 forks source link

WMTS Capabilities: REST encoding require Operation Metadata #579

Open whyvez opened 12 years ago

whyvez commented 12 years ago

WMTS Capabilities createLayer requires Operation metadata to be included in the capabilities document while the spec doesn't. In version 1.0.0 a WMTS server can implement REST and/or KVP. The Operations metadata section is only relevant in the procedural architectural style and not the resource (REST) style. The WMTSCapabilities.js file in line 117 requires GetTile and therefore Operation node present. There should logic here to verify the encoding of the layer.

whyvez commented 12 years ago

Looked into a fix but need to fix #578 first. Need to ability to set layer url as template since resource url in the capabilities is a template.

sbrunner commented 12 years ago

Than have you an example of WMTS capabilities to illustrate your issue ?

olt commented 11 years ago

@whyvez is right.

The comment in the WMTS parser on line 144 states that:

The OGC documentation is not clear if we should use REST or RESTful

But the WMTS 1.0.0 spec on page 15 is quite clear that neither value is right:

Resource oriented architecture style HTTP encodings SHALL not be described in the OperationsMetadata section. Instead, the service metadata document provided by servers operating in a resource oriented architectural style SHALL use ResourceURL and ServiceMetadataURL to indicate support for that architectural style, as is explained in clause 10.

sbrunner commented 11 years ago

@olt do you have a capability example ? Can you say how it's generated ? I think your right but it's easier to work with a specification file :-)

olt commented 11 years ago

Here is a RESTful WMTS capabilities document generated by MapProxy. https://gist.github.com/olt/4761748

My understanding of the spec is that the ResourceURL is enough to be a RESTful WMTS. Note that this doc does not contain any OperationsMetadata/DCP stuff.

sbrunner commented 11 years ago

Thanks I will have a look on it :-)