<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498457#M12830</link>
    <description>&lt;P&gt;This error is thrown if the ows:Constraint is missing and looks like an issue with your service, and needs to be addressed server-side. According to the spec this is a required parameter:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;I&gt;All WMTS servers operating in a procedure oriented architecture style and using HTTP&lt;/I&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SHALL specify with an ows:Constraint parameter&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the encodings that MAY be sent using HTTP GET or HTTP POST.&lt;/I&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;WMTS spec:&amp;nbsp;&lt;A href="https://www.ogc.org/standard/wmts/" target="_blank" rel="noopener"&gt;https://www.ogc.org/standard/wmts/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 17:14:21 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2024-06-27T17:14:21Z</dc:date>
    <item>
      <title>Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498149#M12824</link>
      <description>&lt;P&gt;Hello Esri Community,&lt;/P&gt;&lt;P&gt;I'm working on integrating a third-party WMTS service in my .NET MAUI application using ArcGIS Runtime SDK for .NET. However, I encountered an issue where the WmtsLayer.LoadAsync() method fails because the capabilities XML from the WMTS service does not include the ows:Constraint element, which seems to be required by the SDK's parser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;private async Task&amp;lt;WmtsLayer&amp;gt; GetWMTSLayer(WMTS wMTS)&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;WmtsLayer myWmtsLayer = new WmtsLayer(new Uri(wMTS.url), wMTS.layername, wMTS.id);&lt;/P&gt;&lt;P&gt;await myWmtsLayer.LoadAsync();&lt;BR /&gt;return myWmtsLayer;&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;await Application.Current.MainPage.DisplayAlert(AppResources.title_error_message, ex.ToString(), AppResources.ok);&lt;BR /&gt;}&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;WMTS Service Details:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Service URL&lt;/STRONG&gt;: &lt;A href="https://owsproxy.lgl-bw.de/owsproxy/ows/WMTS_LGL-BW_ATKIS_DOP_20_C?service=WMTS&amp;amp;request=GetCapabilities&amp;amp;version=1.0.0" target="_self"&gt;https://owsproxy.lgl-bw.de/owsproxy/ows/WMTS_LGL-BW_ATKIS_DOP_20_C?service=WMTS&amp;amp;request=GetCapabilities&amp;amp;version=1.0.0&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Layer ID&lt;/STRONG&gt;: DOP_20_C&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;TileMatrixSet ID&lt;/STRONG&gt;: GoogleMapsCompatible&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Issue:&lt;/P&gt;&lt;P&gt;When attempting to load the WMTS layer using the provided URL, layer ID, and tile matrix set ID, I receive an error indicating that the parser could not move to ows:Constraints in the capabilities XML.&lt;/P&gt;&lt;P&gt;Additional Information:&lt;/P&gt;&lt;P&gt;According to the OGC WMTS standard, the ows:Constraint element is not mandatory for a valid WMTS capabilities document. However, it appears that the ArcGIS Runtime SDK for .NET expects this element to be present, which causes the loading process to fail when it is missing.&lt;/P&gt;&lt;P&gt;Request for Help:&lt;/P&gt;&lt;P&gt;I am looking for guidance on the following:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How can I handle the missing ows:Constraint element in the capabilities XML to successfully load the WMTS layer using the ArcGIS Runtime SDK for .NET?&lt;/LI&gt;&lt;LI&gt;Is there a way to programmatically add the required ows:Constraint element to the capabilities XML before creating the WmtsLayer?&lt;/LI&gt;&lt;LI&gt;Are there any best practices or recommended approaches to resolve this issue without modifying the third-party WMTS service?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Thank you for your assistance!&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 09:00:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498149#M12824</guid>
      <dc:creator>MaxPower</dc:creator>
      <dc:date>2024-06-27T09:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498457#M12830</link>
      <description>&lt;P&gt;This error is thrown if the ows:Constraint is missing and looks like an issue with your service, and needs to be addressed server-side. According to the spec this is a required parameter:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;&lt;I&gt;All WMTS servers operating in a procedure oriented architecture style and using HTTP&lt;/I&gt;&lt;STRONG&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SHALL specify with an ows:Constraint parameter&lt;/I&gt;&lt;/STRONG&gt;&lt;I&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;the encodings that MAY be sent using HTTP GET or HTTP POST.&lt;/I&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;WMTS spec:&amp;nbsp;&lt;A href="https://www.ogc.org/standard/wmts/" target="_blank" rel="noopener"&gt;https://www.ogc.org/standard/wmts/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 17:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498457#M12830</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2024-06-27T17:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498888#M12837</link>
      <description>&lt;P&gt;Runtime needs ows:Constraint to determine which message-encoding to use for the service (KVP or RESTful).&amp;nbsp; Looks like this service is powered by a very old version of OpenLayers, which used to omit this required piece of metadata from its capabilities.&amp;nbsp; The bug was fixed in OpenLayers v4.6.0 (2017): &lt;A href="https://github.com/openlayers/openlayers/issues/6835" target="_blank" rel="noopener"&gt;https://github.com/openlayers/openlayers/issues/6835&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you have any control or influence over this service, I recommend upgrading the server software!&lt;/P&gt;&lt;P&gt;The simplest workaround would be to download this server's capabilities document, edit it to be standards-compliant, and re-host the XML file yourself.&amp;nbsp; The capabilities document specifies absolute URLs for loading tiles, so it doesn't matter to Runtime where it was loaded from.&amp;nbsp; I edited the file and hosted it on the local network as a proof of concept -- it worked!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-06-28_001256.png" style="width: 876px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/108236i2274E223E738039C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-06-28_001256.png" alt="2024-06-28_001256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And here is the edited OperationsMetadata section that I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;ows:OperationsMetadata&amp;gt;
    &amp;lt;ows:Operation name="GetCapabilities"&amp;gt;
        &amp;lt;ows:DCP&amp;gt;
            &amp;lt;ows:HTTP&amp;gt;
                &amp;lt;ows:Get xlink:href="https://owsproxy.lgl-bw.de/owsproxy/ows/WMTS_LGL-BW_ATKIS_DOP_20_C?"&amp;gt;
                  &amp;lt;ows:Constraint name="GetEncoding"&amp;gt;
                    &amp;lt;ows:AllowedValues&amp;gt;
                      &amp;lt;ows:Value&amp;gt;KVP&amp;lt;/ows:Value&amp;gt;
                    &amp;lt;/ows:AllowedValues&amp;gt;
                  &amp;lt;/ows:Constraint&amp;gt;
                &amp;lt;/ows:Get&amp;gt;
            &amp;lt;/ows:HTTP&amp;gt;
        &amp;lt;/ows:DCP&amp;gt;
    &amp;lt;/ows:Operation&amp;gt;
    &amp;lt;ows:Operation name="GetTile"&amp;gt;
        &amp;lt;ows:DCP&amp;gt;
            &amp;lt;ows:HTTP&amp;gt;
                &amp;lt;ows:Get xlink:href="https://owsproxy.lgl-bw.de/owsproxy/ows/WMTS_LGL-BW_ATKIS_DOP_20_C?"&amp;gt;
                  &amp;lt;ows:Constraint name="GetEncoding"&amp;gt;
                    &amp;lt;ows:AllowedValues&amp;gt;
                      &amp;lt;ows:Value&amp;gt;KVP&amp;lt;/ows:Value&amp;gt;
                    &amp;lt;/ows:AllowedValues&amp;gt;
                  &amp;lt;/ows:Constraint&amp;gt;
                &amp;lt;/ows:Get&amp;gt;
            &amp;lt;/ows:HTTP&amp;gt;
        &amp;lt;/ows:DCP&amp;gt;
    &amp;lt;/ows:Operation&amp;gt;
&amp;lt;/ows:OperationsMetadata&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't really a general-purpose workaround, since you would have to re-edit and re-host the capabilities document any time the original service is updated.&amp;nbsp; But seeing that they are still running 7+ year old version of OpenLayers, I'm guessing they don't update very often.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 07:20:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1498888#M12837</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2024-06-28T07:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1499720#M12849</link>
      <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;Thank you for your response. Unfortunately, I don't have any access to the WMTS service because it is provided by a third party. This limits my ability to make any server-side modifications to include the ows:Constraint parameter.&amp;nbsp;I am considering writing an email to the provider of the WMTS to request that they include the ows:Constraint parameter as specified in the WMTS standard.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Jul 2024 11:06:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1499720#M12849</guid>
      <dc:creator>MaxPower</dc:creator>
      <dc:date>2024-07-01T11:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1499722#M12850</link>
      <description>&lt;P&gt;Thank you for the detailed explanation and workaround.&lt;/P&gt;&lt;P&gt;Unfortunately, I do not have any control or influence over this WMTS service, as it is provided by a third party. Upgrading the server software or making server-side changes is not an option for me.&lt;/P&gt;&lt;P&gt;Given this constraint, I am exploring client-side solutions to handle the missing ows:Constraint and successfully load the WMTS layer using the ArcGIS Runtime SDK for .NET. As you suggested, a possible workaround could involve downloading the capabilities document, editing it to be standards-compliant, and re-hosting the XML file myself.&lt;/P&gt;&lt;P&gt;I understand that this approach requires re-editing and re-hosting the capabilities document whenever the original service is updated, which might be manageable given that they are running a very old version of OpenLayers.&lt;/P&gt;&lt;P&gt;I am also considering writing an email to the provider of the WMTS to request that they include the ows:Constraint parameter as specified in the WMTS standard.&lt;/P&gt;&lt;P&gt;Thank you again for your assistance and the proof of concept.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 11:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1499722#M12850</guid>
      <dc:creator>MaxPower</dc:creator>
      <dc:date>2024-07-01T11:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1513765#M12916</link>
      <description>&lt;P&gt;Good news!&amp;nbsp; ArcGIS Maps SDK version 200.5.0 was just released today.&amp;nbsp; We added heuristics to guess the missing "encoding" constraint, so this service can now be opened without any workarounds.&lt;/P&gt;&lt;P&gt;Thank you for bringing this one to our attention!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2024 16:56:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1513765#M12916</guid>
      <dc:creator>MatveiStefarov</dc:creator>
      <dc:date>2024-08-01T16:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Missing ows:Constraint in WMTS Capabilities for ArcGIS Runtime .NET</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1522746#M12968</link>
      <description>&lt;P&gt;Thank you for the update! I appreciate the new features in ArcGIS Maps SDK version 200.5.0.&lt;/P&gt;&lt;P&gt;I had already informed the host of the WMTS about the issue, and they have updated the capabilities to include the necessary ows:Constraint elements. It's great to hear that the SDK now has heuristics to handle this as well, so the service can be accessed without workarounds.&lt;/P&gt;&lt;P&gt;Thanks again for your support!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 07:40:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/handling-missing-ows-constraint-in-wmts/m-p/1522746#M12968</guid>
      <dc:creator>MaxPower</dc:creator>
      <dc:date>2024-08-16T07:40:26Z</dc:date>
    </item>
  </channel>
</rss>

