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 · 6 comments · May be fixed by #100
Open
Assignees
Labels

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)

@dstenger
Copy link
Contributor

dstenger commented Mar 5, 2025

Thanks for providing the pull request.

As far as I see, you edited the 1.0.2 schema to enable data type "nonNegativeInteger". Here my proposal is to contact the SWG pointing them to the divergence between spec and schema. For the test suite it is fine to use a modified schema. However, the SWG should be notified.

Secondly, you just exchanged one schema from version 1.0.1 to 1.0.2. Here, I would prefer to update all of them to version 1.0.2.

If you do not have the time working on this, the CITE team can help out in the next weeks. This issue is close to the top of our pipeline.
If you can help out, this is, of course, very much appreciated.

petersmythe pushed a commit to petersmythe/ets-wmts10 that referenced this issue Mar 6, 2025
@bpross-52n bpross-52n moved this from To do to In progress in CITE Mar 12, 2025
@dstenger
Copy link
Contributor

I just realized that https://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd is the only schema in version 1.0.2. All other schemas are still tagged with version 1.0.1.
Thus, there is no further work required.

@dstenger dstenger moved this from In progress to To verify in CITE Mar 13, 2025
@dstenger dstenger added the bug label Mar 13, 2025
@dstenger dstenger assigned dstenger and unassigned bpross-52n Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: To verify
3 participants