Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The WMTS test suite restricts the resourceType valid values, while the official schema does not #98

Open
aaime opened this issue Dec 31, 2024 · 4 comments · May be fixed by #100
Open
Assignees

Comments

@aaime
Copy link

aaime commented Dec 31, 2024

Describe the bug
The WMTS test suite complains when it finds a URLTemplate whose resourceType that is not "tile" or "FeatureInfo".
https://github.com/opengeospatial/ets-wmts10/blob/master/src/main/resources/xsd/ogc/wmts/1.0/wmtsGetCapabilities_response.xsd#L380

However, the published schema is not restricted to it, and reads differently:

https://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd

<complexType name="URLTemplateType">
	<attribute name="format" type="ows:MimeType" use="required">
		<annotation>
			<documentation>Format of the resource representation that can be retrieved one resolved the URL template.</documentation>
		</annotation>
	</attribute>
	<attribute name="resourceType" type="wmts:ResourceTypeCodeType" use="required"/>
	<attribute name="template" use="required">
		<annotation>
			<documentation>URL template. A template processor will be applied to substitute some variables between {} for their values and get a URL to a resource. We cound not use a anyURI type (that conforms the character restrictions specified in RFC2396 and excludes '{' '}' characters in some XML parsers) because this attribute must accept the '{' '}' caracters.</documentation>
		</annotation>
		<simpleType>
			<restriction base="string">
				<pattern value="([A-Za-z0-9\-_\.!~\*'\(\);/\?:@\+:$,#\{\}=&]|%[A-Fa-f0-9][A-Fa-f0-9])+"/>
			</restriction>
		</simpleType>
	</attribute>
</complexType>

Somehow, the ETS schema and the published one diverged.

Also, checking the specification, it mentions the two values as mandatory to support tile and featureinfo requests in the restful approach, but I don't see any mention of it being limited to those two values.

@dstenger
Copy link
Contributor

dstenger commented Jan 2, 2025

Thank you for reporting.
We will do further investigation.

@aaime
Copy link
Author

aaime commented Jan 2, 2025

As another bit of information, in the meantime I've found that the tests are using a schema with version=1.0.1, while schemas.opengis.net has version 1.0.2 instead.

@aaime
Copy link
Author

aaime commented Jan 3, 2025

I've also found that just updating the file with the one published online introduces other problems. For example, the specification in table 12 defines the tile matrix set limits as "positive integers" but the notes below it show that they can actually start from zero:

image

E.g., minTileRow goes From 0 to maxTileRow and maxTileRow goes From minTileRow to matrixWidth-1 of the tileMatrix section of this tileMatrixSet, so the max is not bound to be positive, can zero too.
The schema in the repository correctly identifies all of them as "nonNegativeInteger":

https://github.com/opengeospatial/ets-wmts10/blob/master/src/main/resources/xsd/ogc/wmts/1.0/wmtsGetCapabilities_response.xsd#L341

but the schema published online uses "positiveInteger" instead for maxTileRow and MaxTileCol

@aaime
Copy link
Author

aaime commented Jan 3, 2025

See #100 for a suggested fix
(cumulative for also the GetFeatureInfo issue, but I can split it into two parts, if you prefer to merge separately)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
3 participants