GeoTools在边界框中没有CRS的getCapabilities

问题描述 投票:1回答:1

我正在尝试从MapServer检索功能:

    URL url = null;
    try {
      url = new URL( sourceUrl );
    } catch (MalformedURLException e) {
      //will not happen
    }

    WebMapServer wms = null;
    try {
      wms = new WebMapServer(url);

      WMSCapabilities capabilities = wms.getCapabilities();

      String serverName = capabilities.getService().getName();
      String serverTitle = capabilities.getService().getTitle();
      System.out.println("Capabilities retrieved from server: " + serverName + " (" + serverTitle + ")");         


    } catch (Exception e) {
        e.printStackTrace();
    }   

但是我收到了这个错误:

Caused by: org.xml.sax.SAXException: Bounding Box element contains no CRS/SRS attribute
    at org.geotools.ows.wms.xml.WMSComplexTypes$_BoundingBoxType.getValue(WMSComplexTypes.java:3241)
    at org.geotools.xml.handlers.ComplexElementHandler.endElement(ComplexElementHandler.java:140)
    at org.geotools.xml.XMLSAXHandler.endElement(XMLSAXHandler.java:252)
    ... 87 more

XML的功能就像这样(重要的部分):

enter image description here

正如我所看到的,边界框实际上没有CRS,但我对此无能为力,因为它不是我的服务器。

我该怎么办?

geotools mapserver
1个回答
0
投票

你需要提交bug report with the MapServer teamCRS是一个必修元素,你不能把它留空,并期望让边界框有意义。在一个理想的世界里,GeoTools可以回到Ex_GeographicBoundingBox,但这也没有帮助。

还值得联系服务器的所有者并要求他们修复该层的配置。

© www.soinside.com 2019 - 2024. All rights reserved.