Closed jmacura closed 3 years ago
Parsing of GetCapabilities fails on WMS (WMTS, WFS, ArcGIS) layers, which do not have any CRS defined in metadata.
See cf. https://geoportal.cuzk.cz/WMS_ZM200_PUB/WMService.aspx
and its GetCapabilities response:
<?xml version="1.0" encoding="utf-8"?> <WMS_Capabilities xsi:schemaLocation="http://www.opengis.net/wms https://geoportal.cuzk.cz/WMS_ZM200_PUB/schemas/capabilities_1_3_0.xsd" version="1.3.0" xmlns="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Service> <Name>WMS</Name> <Title>Prohlížecí služba WMS - ZM 200</Title> <Abstract>Prohlížecí služba WMS-ZM200 je poskytována jako veřejná prohlížecí služba nad daty Základní mapy ČR 1:200 000.Služba splňuje technické pokyny pro INSPIRE prohlížecí služby v. 3.1 a zároveň splňuje standard OGC WMS 1.1.1. a 1.3.0.</Abstract> <KeywordList> <Keyword vocabulary="ISO">Služba zpřístupnění map</Keyword> <Keyword vocabulary="GEMET">Budovy</Keyword> <Keyword vocabulary="GEMET">Dopravní sítě</Keyword> <Keyword vocabulary="GEMET">Chráněná území</Keyword> <Keyword vocabulary="GEMET">Krajinný pokryv</Keyword> <Keyword vocabulary="GEMET">Správní jednotky</Keyword> <Keyword vocabulary="GEMET">Vodopis</Keyword> <Keyword vocabulary="GEMET">Zeměpisné názvy</Keyword> <Keyword vocabulary="GEMET">Nadmořská výška</Keyword> <Keyword>mapová služba</Keyword> <Keyword>prohlížecí služba</Keyword> <Keyword>WMS</Keyword> <Keyword>mapa</Keyword> <Keyword>základní mapa ČR</Keyword> <Keyword>podkladová mapa</Keyword> <Keyword>geoprostorová informace</Keyword> <Keyword>dopravní infrastruktura</Keyword> <Keyword>administrativní hranice</Keyword> <Keyword>Geonames</Keyword> <Keyword>vodstvo</Keyword> <Keyword>geografické názvosloví</Keyword> <Keyword>polohopis</Keyword> <Keyword>chráněná území</Keyword> <Keyword>budovy</Keyword> <Keyword>využití území</Keyword> <Keyword>státní mapové dílo</Keyword> <Keyword>JTSK</Keyword> <Keyword>základní mapa</Keyword> <Keyword>rastrová mapa</Keyword> <Keyword>mapa České republiky</Keyword> <Keyword>topomapa</Keyword> <Keyword>topografická mapa</Keyword> <Keyword>mapa středního měřítka</Keyword> <Keyword>výškopis</Keyword> <Keyword>měřítko 1:200 000</Keyword> <Keyword>200 000</Keyword> <Keyword>měřítko 1:200000</Keyword> <Keyword>200000</Keyword> <Keyword>popis</Keyword> </KeywordList> <OnlineResource xlink:href="https://geoportal.cuzk.cz"/> <ContactInformation> <ContactPersonPrimary> <ContactPerson>Srovnal Pavel, Mgr.</ContactPerson> <ContactOrganization>Zeměměřický úřad</ContactOrganization> </ContactPersonPrimary> <ContactPosition>custodian</ContactPosition> <ContactAddress> <AddressType>postal</AddressType> <Address>Pod Sídlištěm 9</Address> <City>Praha</City> <StateOrProvince>Praha</StateOrProvince> <PostCode>182 11</PostCode> <Country>Česká republika</Country> </ContactAddress> <ContactVoiceTelephone>+420 284 041 860</ContactVoiceTelephone> <ContactFacsimileTelephone></ContactFacsimileTelephone> <ContactElectronicMailAddress>pavel.srovnal@cuzk.cz</ContactElectronicMailAddress> </ContactInformation> <Fees>none</Fees> <AccessConstraints>https://geoportal.cuzk.cz/Dokumenty/Podminky.html</AccessConstraints> <MaxWidth>2560</MaxWidth> <MaxHeight>2048</MaxHeight> </Service> <Capability> <Request> <GetCapabilities> <Format>text/xml</Format> <DCPType> <HTTP> <Get> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/get?" xlink:type="simple"/> </Get> <Post> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/post" xlink:type="simple"/> </Post> </HTTP> </DCPType> </GetCapabilities> <GetMap> <Format>image/jpeg</Format> <Format>image/webp</Format> <Format>image/jpgpng</Format> <Format>image/png8</Format> <Format>image/png</Format> <DCPType> <HTTP> <Get> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/get?" xlink:type="simple"/> </Get> <Post> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/post" xlink:type="simple"/> </Post> </HTTP> </DCPType> </GetMap> <GetFeatureInfo> <Format>text/plain</Format> <Format>text/xml</Format> <DCPType> <HTTP> <Get> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/get?" xlink:type="simple"/> </Get> <Post> <OnlineResource xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/post" xlink:type="simple"/> </Post> </HTTP> </DCPType> </GetFeatureInfo> </Request> <Exception> <Format>XML</Format> <Format>BLANK</Format> </Exception> <ExtendedCapabilities xsi:schemaLocation="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0 https://geoportal.cuzk.cz/WMS_ZM200_PUB/Schemas/inspire/inspire_vs/1.0/inspire_vs.xsd" xmlns="http://inspire.ec.europa.eu/schemas/inspire_vs/1.0"> <ResourceLocator xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <URL>https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/get?service=WMS&request=GetCapabilities</URL> <MediaType>text/xml</MediaType> </ResourceLocator> <ResourceType xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">service</ResourceType> <TemporalReference xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <DateOfLastRevision>2001-02-01T00:00:00+01:00:00</DateOfLastRevision> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> <TemporalExtent> <IntervalOfDates> <StartingDate>2007-01-01T00:00:00+01:00:00</StartingDate> <EndDate>2020-01-01T00:00:00+01:00:00</EndDate> </IntervalOfDates> </TemporalExtent> </TemporalReference> <Conformity xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <Specification> <Title>COMMISSION REGULATION (EU) No 1089/2010 of 23 November 2010 implementing Directive 2007/2/EC of the European Parliament and of the Council as regards interoperability of spatial data sets and services</Title> <DateOfPublication>2010-12-08T00:00:00+01:00:00</DateOfPublication> <URI>oj:L:2010:323:0011:0102:EN:PDF</URI> <ResourceLocator> <URL>http://eur-lex.europa.eu/LexUriServ/LexUriServ.do?uri=OJ:L:2010:323:0011:0102:EN:PDF</URL> <MediaType>application/pdf</MediaType> </ResourceLocator> </Specification> <Degree>conformant</Degree> </Conformity> <MetadataPointOfContact xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OrganisationName>Zeměměřický úřad</OrganisationName> <EmailAddress>podpora.zums@cuzk.cz</EmailAddress> </MetadataPointOfContact> <MetadataDate xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">2001-09-09T00:00:00+02:00:00</MetadataDate> <SpatialDataServiceType xmlns="http://inspire.ec.europa.eu/schemas/common/1.0">view</SpatialDataServiceType> <MandatoryKeyword xsi:type="classificationOfSpatialDataService" xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <KeywordValue>infoMapAccessService</KeywordValue> </MandatoryKeyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Budovy</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Dopravní sítě</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Chráněná území</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Krajinný pokryv</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Správní jednotky</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Vodopis</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Zeměpisné názvy</KeywordValue> </Keyword> <Keyword xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <OriginatingControlledVocabulary> <Title>GEMET - INSPIRE themes</Title> <DateOfPublication>2008-01-06T00:00:00+02:00:00</DateOfPublication> </OriginatingControlledVocabulary> <KeywordValue>Nadmořská výška</KeywordValue> </Keyword> <SupportedLanguages xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <DefaultLanguage> <Language>cze</Language> </DefaultLanguage> </SupportedLanguages> <ResponseLanguage xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <Language>cze</Language> </ResponseLanguage> <MetadataUrl xmlns="http://inspire.ec.europa.eu/schemas/common/1.0"> <URL>https://geoportal.cuzk.cz/SDIProCSW/service.svc/get?REQUEST=GetRecordById&SERVICE=CSW&VERSION=2.0.2&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full&Id=CZ-CUZK-WMS-ZM200-P</URL> </MetadataUrl> </ExtendedCapabilities> <Layer> <Title>Základní mapa 1:200 000</Title> <Abstract>Prohlížení produktu Základní mapa 1:200 000</Abstract> <KeywordList> <Keyword>Základní mapa 1:200 000</Keyword> </KeywordList> <Attribution> <Title>© Český úřad zeměměřický a katastrální</Title> <OnlineResource xlink:href="http://www.cuzk.cz"/> <LogoURL width="20" height="20"> <Format>image/gif</Format> <OnlineResource xlink:href="https://geoportal.cuzk.cz/design/logo.gif"/> </LogoURL> </Attribution> <AuthorityURL name="CZ-CUZK"> <OnlineResource xlink:href="http://www.cuzk.cz"/> </AuthorityURL> <Identifier authority="CZ-CUZK">CZ-00025712-CUZK_WMS_ZM200</Identifier> <MetadataURL type="ISO19115:2003"> <Format>text/xml</Format> <OnlineResource xlink:href="https://geoportal.cuzk.cz/SDIProCSW/service.svc/get?REQUEST=GetRecordById&SERVICE=CSW&VERSION=2.0.2&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full&Id=CZ-CUZK-WMS-ZM200-P"/> </MetadataURL> <Layer queryable="0" cascaded="1"> <Name>GR_ZM200</Name> <Title>Základní mapa 1:200 000</Title> <Abstract>Vrstva Základní mapa 1:200 000</Abstract> <KeywordList> <Keyword>Základní mapa 1:200 000</Keyword> </KeywordList> <CRS>EPSG:900913</CRS> <CRS>EPSG:102066</CRS> <CRS>EPSG:32634</CRS> <CRS>EPSG:32633</CRS> <CRS>EPSG:5514</CRS> <CRS>EPSG:5221</CRS> <CRS>EPSG:4326</CRS> <CRS>EPSG:4258</CRS> <CRS>EPSG:3857</CRS> <CRS>EPSG:3836</CRS> <CRS>EPSG:3835</CRS> <CRS>EPSG:3046</CRS> <CRS>EPSG:3045</CRS> <CRS>EPSG:3035</CRS> <CRS>EPSG:3034</CRS> <EX_GeographicBoundingBox> <westBoundLongitude>11.21396441351639872152646</westBoundLongitude> <eastBoundLongitude>19.40758996766055233251791</eastBoundLongitude> <southBoundLatitude>47.96481778084901748115954</southBoundLatitude> <northBoundLatitude>51.69173635720039072793952</northBoundLatitude> </EX_GeographicBoundingBox> <BoundingBox CRS="EPSG:900913" minx="1248332.808286536252126098" miny="6101003.761736580170691013" maxx="2160443.032724617514759302" maxy="6744578.207133816555142403" resx="7.883389283907782818516807" resy="-7.885474836628404204930121"/> <BoundingBox CRS="EPSG:102066" minx="-950005.0000148359686136246" miny="-1250013.792939373524859548" maxx="-399996.6050534393871203065" maxy="-899988.3849178894888609648" resx="5.080251930108936164742772" resy="-5.081595912101035672492344"/> <BoundingBox CRS="EPSG:32634" minx="-185026.8975439229980111122" miny="5351269.417261623777449131" maxx="382493.2688040455686859787" maxy="5728552.52691962942481041" resx="5.088682880533348829033002" resy="-5.090029092935613341808221"/> <BoundingBox CRS="EPSG:32633" minx="234740.6629878983367234468" miny="5316598.64651054423302412" maxx="825209.3466487901750952005" maxy="5734522.388265765272080898" resx="5.078713888061606063217823" resy="-5.080057463164274977884816"/> <BoundingBox CRS="EPSG:5514" minx="-950005.0000148359686136246" miny="-1250013.792939373524859548" maxx="-399996.6050534393871203065" maxy="-899988.3849178894888609648" resx="5.080251930109699998183714" resy="-5.081595912101800394111706"/> <BoundingBox CRS="EPSG:5221" minx="-950005.0000148359686136246" miny="-1250013.792939373524859548" maxx="-399996.6050534393871203065" maxy="-899988.3849178894888609648" resx="5.080251930108936164742772" resy="-5.081595912101035672492344"/> <BoundingBox CRS="EPSG:4326" miny="11.21396441351639872152646" minx="47.96481778084901748115954" maxy="19.40758996766055233251791" maxx="51.69173635720039072793952" resy="5.644481665396899438668504E-05" resx="-5.645974914514737430949048E-05"/> <BoundingBox CRS="EPSG:4258" miny="11.21396441351639872152646" minx="47.96481778179021659980208" maxy="19.40758996766055233251791" maxx="51.69173635812075673356958" resy="5.64448166538407061646257E-05" resx="-5.645974914501904542984967E-05"/> <BoundingBox CRS="EPSG:3857" minx="1248332.808286536252126098" miny="6101003.761736580170691013" maxx="2160443.032724617514759302" maxy="6744578.207133816555142403" resx="7.883389283907782818516807" resy="-7.885474836628404204930121"/> <BoundingBox CRS="EPSG:3836" miny="3814820.814054231625050306" minx="5353541.017647546716034412" maxy="4382570.253003626130521297" maxx="5730976.645345287397503853" resy="5.090737846734339377974266" resx="-5.092084602778455426630444"/> <BoundingBox CRS="EPSG:3835" miny="3234759.691929360385984182" minx="5318865.851365947164595127" maxy="3825467.809303862508386374" maxx="5736959.266137122176587582" resy="5.080771778929838333738189" resx="-5.082115898448080315574771"/> <BoundingBox CRS="EPSG:3046" miny="-185026.8975370223633944988" minx="5351269.4172440180554986" maxy="382493.2688051310833543539" maxx="5728552.526897822506725788" resy="5.088682880499642458005383" resx="-5.090029092901898088996404"/> <BoundingBox CRS="EPSG:3045" miny="234740.6629905411973595619" minx="5316598.64649274293333292" maxy="825209.3466457787435501814" maxx="5734522.388243974186480045" resy="5.07871388803309464776703" resx="-5.080057463135755568828245"/> <BoundingBox CRS="EPSG:3035" miny="4406097.295516056939959526" minx="2763373.962308630347251892" maxy="5013598.001822341233491898" maxx="3214475.305478873662650585" resy="5.083542395304831096325415" resx="-5.084887247790367936772782"/> <BoundingBox CRS="EPSG:3034" miny="4082171.860883571673184633" minx="2368521.080280370078980923" maxy="4669328.745883774012327194" maxx="2803840.181700119748711586" resy="4.906703820302071861192417" resx="-4.908001890095809116587589"/> <Attribution> <Title>© Český úřad zeměměřický a katastrální</Title> <OnlineResource xlink:href="http://www.cuzk.cz"/> <LogoURL width="20" height="20"> <Format>image/gif</Format> <OnlineResource xlink:href="https://geoportal.cuzk.cz/design/logo.gif"/> </LogoURL> </Attribution> <AuthorityURL name="CZ-CUZK"> <OnlineResource xlink:href="http://www.cuzk.cz"/> </AuthorityURL> <Identifier authority="CZ-CUZK">CZ-00025712-CUZK_WMS-ZM200-P</Identifier> <MetadataURL type="ISO19115:2003"> <Format>text/xml</Format> <OnlineResource xlink:href="https://geoportal.cuzk.cz/SDIProCSW/service.svc/get?REQUEST=GetRecordById&SERVICE=CSW&VERSION=2.0.2&OUTPUTFORMAT=application/xml&OUTPUTSCHEMA=http://www.isotc211.org/2005/gmd&ELEMENTSETNAME=full&Id=CZ-CUZK-WMS-ZM200-P"/> </MetadataURL> <Style> <Name>default</Name> <Title/> <LegendURL width="100" height="100"> <Format>image/jpeg</Format> <OnlineResource xlink:type="simple" xlink:href="https://geoportal.cuzk.cz/WMS_ZM200_PUB/service.svc/static/f/?url=YRuWIkaO0ylAnzwjmxcpi%2ftdIOMjreJ%2filv6PQr7TLT49FADWO4JuJoBwRDZqADNJQrhizIA0oHCNsnwtGL9D1m%2bk0J5swmXWmQDiM2jiV8rQs8pVXsTSXMoAz1w8knvMATuBK5dnCGF%2bB2n%2bJrywsas47Bho9Z4vC2Xt2Ds9xQ%3d=lang=cze"/> </LegendURL> </Style> <MinScaleDenominator>17677.66952966368990018964</MinScaleDenominator> <MaxScaleDenominator>7576144.084141580387949944</MaxScaleDenominator> </Layer> </Layer> </Capability> </WMS_Capabilities>
Actually caused by nestning layers.
@jmacura Prepare unit test for this issue so multiple capabilities can be checked.
Parsing of GetCapabilities fails on WMS (WMTS, WFS, ArcGIS) layers, which do not have any CRS defined in metadata.
See cf. https://geoportal.cuzk.cz/WMS_ZM200_PUB/WMService.aspx
and its GetCapabilities response:
Actually caused by nestning layers.