2014-12-17 10 views
0

MapCache를 설치하고 실행중인 MapCache가 있습니다. < MapCache는 WMS 액세스를 위해 구성되며 내 MapServer에서 제공하는 특정 레이어의 타일을 캐시하는 데 사용됩니다. 필자는 WMS 기능에 액세스하여 WMS trough MapCache에 액세스하여 브라우저를 통해 타일을 표시하고 캐시되고 있음을 확인했습니다.WorldWind <-> MapCache <-> MapServer

우수성, 내가 원하는 것.

다음으로 MapCache WMS에 액세스하기 위해 WorldWind 클라이언트를 설정했습니다. WorldWind는 루트 레이어 (MapCache가 모든 레이어를 래핑하기 위해 사용하는 것)가 지리적 인 경계 상자를 제공하지 않는다고 불평합니다. WorldWind는 이것을 심각한 것으로 기록하고 예외를 던지기 시작합니다. 문제가있는 곳을 파악하려고합니다. WMS OGC 표준은 바운딩 박스를 갖기 위해 최상위 레이어를 필요로합니까 아니면 WMS를 준수하지 않는 WorldWind 클라이언트입니까? 다음은 내가 보는 오류 메시지입니다. 아래는 getCapabilities 응답입니다. 아래는 MapCache xml 파일입니다. 아래는 MapServer 맵 파일입니다.

I have also posted this in the WorldWind forum, but not sure if I'll get a response there.

어떤 도움

크게 이해할 수있을 것이다.

예외 :

SEVERE: No geographic bounding box given in WMS capabilities for layer rootlayer 
SEVERE: No geographic bounding box given in WMS capabilities 
SEVERE: WMS capabilities document is missing values necessary for component construction 

UpdateSequence: none 
ServiceName: OGC:WMS 
ServiceTitle: map service 
ServiceAbstract: none 
Fees: none 
AccessConstraints: none 
Keywords: none 
OnlineResource: href: [url]http://localhost/mapcache/?[/url], type: null 
none 
Max width = 0 Max height = 0 

GetMap 
    Formats: image/jpeg,  image/png, 
    DCPTypes: 
     HTTP, Get, href: [url]http://localhost/mapcache/?[/url], type: null 
GetCapabilities 
    Formats: application/vnd.ogc.wms_xml, 
    DCPTypes: 
     HTTP, Get, href: [url]http://localhost/mapcache/?[/url], type: null 
GetFeatureInfo 
    Formats: text/plain,  application/vnd.ogc.gml, 
    DCPTypes: 
     HTTP, Get, href: [url]http://localhost/mapcache/?[/url], type: null 

LAYERS 
LAYER rootlayer: queryable = false 
LAYER bluemarbleJanuary: queryable = false 

gov.nasa.worldwind.exception.WWRuntimeException: No geographic bounding box given in WMS capabilities 
    at gov.nasa.worldwind.util.DataConfigurationUtils.getWMSLayerConfigParams(Unknown Source) 
    at gov.nasa.worldwind.wms.WMSTiledImageLayer.wmsGetParamsFromCapsDoc(Unknown Source) 
    at gov.nasa.worldwind.wms.WMSTiledImageLayer.<init>(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.doCreateFromCapabilities(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.doCreateFromCapabilities(Unknown Source) 
    at gov.nasa.worldwind.BasicFactory.createFromConfigSource(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.createFromConfigSource(Unknown Source) 

gov.nasa.worldwind.exception.WWRuntimeException: Creation from configuration file failed Version: 1.1.1 
    at gov.nasa.worldwind.BasicFactory.createFromConfigSource(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.createFromConfigSource(Unknown Source) 

Caused by: java.lang.IllegalArgumentException: WMS capabilities document is missing values necessary for component construction 
    at gov.nasa.worldwind.wms.WMSTiledImageLayer.wmsGetParamsFromCapsDoc(Unknown Source) 
    at gov.nasa.worldwind.wms.WMSTiledImageLayer.<init>(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.doCreateFromCapabilities(Unknown Source) 
    at gov.nasa.worldwind.layers.BasicLayerFactory.doCreateFromCapabilities(Unknown Source) 
    ... 14 more 

Caused by: gov.nasa.worldwind.exception.WWRuntimeException: No geographic bounding box given in WMS capabilities 
    at gov.nasa.worldwind.util.DataConfigurationUtils.getWMSLayerConfigParams(Unknown Source) 
    ... 18 more 

는 GetCapabilities

<WMT_MS_Capabilities version="1.1.1"> 
<Service> 
<Name>OGC:WMS</Name> 
<Title>map service</Title> 
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/mapcache?"/> 
</Service> 
<Capability> 
<Request> 
<GetCapabilities> 
<Format>application/vnd.ogc.wms_xml</Format> 
<DCPType> 
<HTTP> 
<Get> 
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/mapcache?"/> 
</Get> 
</HTTP> 
</DCPType> 
</GetCapabilities> 
<GetMap> 
<Format>image/png</Format> 
<Format>image/jpeg</Format> 
<DCPType> 
<HTTP> 
<Get> 
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/mapcache?"/> 
</Get> 
</HTTP> 
</DCPType> 
</GetMap> 
<GetFeatureInfo> 
<Format>text/plain</Format> 
<Format>application/vnd.ogc.gml</Format> 
<DCPType> 
<HTTP> 
<Get> 
<OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://localhost/mapcache?"/> 
</Get> 
</HTTP> 
</DCPType> 
</GetFeatureInfo> 
</Request> 
<Exceptions> 
<Format>text/plain</Format> 
</Exceptions> 
<VendorSpecificCapabilities> 
<TileSet> 
<SRS>EPSG:4326</SRS> 
<BoundingBox SRS="EPSG:4326" minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/> 
<Resolutions> 
0.70312500000000000000 0.35156250000000000000 0.17578125000000000000 0.08789062500000000000 0.04394531250000000000 0.02197265625000000000 0.01098632812500000000 0.00549316406250000000 0.00274658203125000000 0.00137329101562500000 0.00068664550781250000 0.00034332275390625000 0.00017166137695312500 0.00008583068847656250 0.00004291534423828120 0.00002145767211914060 0.00001072883605957030 0.00000536441802978516 
</Resolutions> 
<Width>256</Width> 
<Height>256</Height> 
<Format>image/png</Format> 
<Layers>bluemarbleJanuary</Layers> 
<Styles/> 
</TileSet> 
</VendorSpecificCapabilities> 
<Layer> 
<Name>rootlayer</Name> 
<Title>map service</Title> 
<SRS>EPSG:900913</SRS> 
<SRS>EPSG:4326</SRS> 
<SRS>EPSG:3857</SRS> 
<Layer cascaded="1" queryable="0"> 
<Name>bluemarbleJanuary</Name> 
<LatLonBoundingBox minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/> 
<BoundingBox SRS="EPSG:4326" minx="-180.000000" miny="-90.000000" maxx="180.000000" maxy="90.000000"/> 
<SRS>EPSG:4326</SRS> 
</Layer> 
</Layer> 
</Capability> 
</WMT_MS_Capabilities> 

mapcache.xml

<mapcache> 
    <metadata> 
    <title>map service</title> 
    <abstract>Contains various cached maps</abstract> 
    </metadata> 

    <cache name="disk" type="disk"> 
    <base>D:/mapserver/ms4w/tmp/ms_tmp/cache</base> 
    </cache> 

    <source name="bluemarbleJanuary" type="wms"> 
    <getmap> 
     <params> 
     <FORMAT>image/png</FORMAT> 
     <LAYERS>bluemarbleJanuary</LAYERS> 
     <MAP>D:/mapserver/data/nasaww.map</MAP> 
     </params> 
    </getmap> 
    <http> 
     <url>http://localhost/wms?</url> 
    </http> 
    </source> 

    <format name="PNGQ_FAST" type="PNG"> 
    <compression>fast</compression> 
    <colors>256</colors> 
    </format> 

    <tileset name="bluemarbleJanuary"> 
    <source>bluemarbleJanuary</source> 
    <cache>disk</cache> 
    <grid>WGS84</grid> 
    <format>PNGQ_FAST</format> 
    <metatile>5 5</metatile> 
    <metabuffer>20</metabuffer> 
    <expires>3600</expires> 
    </tileset> 

    <default_format>PNGQ_FAST</default_format> 

    <service type="wms" enabled="true"> 
    <full_wms>assemble</full_wms> 
    <resample_mode>bilinear</resample_mode> 
    <format>PNGQ_FAST</format> 
    <maxsize>4096</maxsize> 
    </service> 
    <service type="wmts" enabled="true"/> 
    <service type="tms" enabled="true"/> 
    <service type="kml" enabled="true"/> 
    <service type="gmaps" enabled="true"/> 
    <service type="ve" enabled="true"/> 
    <service type="demo" enabled="true"/> 

    <errors>report</errors> 
    <lock_dir>D:/mapserver/ms4w/tmp/ms_tmp</lock_dir> 
    <log_level>debug</log_level> 

</mapcache> 
,451,515,

맵 파일

MAP 
    NAME WMS_server 
    STATUS ON 
    EXTENT -180 -90 180 90 
    UNITS DD 
    CONFIG "MS_ERRORFILE" "ms_error.txt" 
    DEBUG 5 

    # 
    # Start of web interface definition 
    # 
    WEB 
     METADATA 
      "wms_title"     "WMS Demo Server" 
      "wms_onlineresource"   "http://localhost/wms?" 
      "wms_srs"     "EPSG:4326" 
      "wms_feature_info_mime_type" "text/html" 
      "wms_abstract"    "This demonstration server showcases MapServer (www.mapserver.org) and its OGC support" 
      "wms_enable_request"   "*" 
     END # Metadata 
    END # Web 

    PROJECTION 
     "init=epsg:4326" 
    END # Projection 

    # 
    # Start of layer definitions 
    # 

    ################## 
    # Blue Marble January 2004 
    ################## 
    LAYER 
     NAME "bluemarbleJanuary" 
     #GROUP "default" 
     TYPE RASTER 
     STATUS ON 

     METADATA 
      "wms_title"    "Blue Marble Raster (January 2004)" 
      "wms_attribution_title" "NASA Blue Marble (January 2004)" 
      "wms_srs"    "EPSG:4326" 
     END # Metadata 

     TILEINDEX "raster/bluemarble/jan/bluemarble-index.shp" 
     TILEITEM "LOCATION" 

     PROJECTION 
      "+init=EPSG:4326" 
     END # Projection 
    END # Layer 

END # Map 

답변

0

난 당신이 문제가 MapCache에 함께 언급 알아,하지만 당신은 그것이는 GetCapabilities 요청의 일부로 전달하는 맵 서버는 경우 MapCache에있는 정보를 제공하고 있는지를 찾고 확인해야합니다 .

mapcache의 개발자가 mapserver 사용자 또는 dev 메일 링리스트에이 질문을 게시 할 수도 있습니다.

가 wms_bbox_extended : 다음 맵 서버 문서에서

Description: (Optional) “true” or “false”. If true, bounding boxes are reported for all supported SRS/CRS in the capabilities document. If false, only the bounding box of the first SRS/CRS is reported. 
Introduced in 6.0. 

wms_extent

WMS TAG Name: BoundingBox (WMS1.1.1, sect. 6.5.6) 

Description: (Optional) Used for the layer’s BoundingBox tag for cases where it is impossible (or very inefficient) for MapServer to probe the data source to figure its extents. The value for this metadata is “minx miny maxx maxy” separated by spaces, with the values in the layer’s projection units. If wms_extent is provided then it has priority and MapServer will NOT try to read the source file’s extents. 

For Rasters served through WMS, MapServer can now use the wms_extent metadata parameter to register the image. If a .wld file cannot be found, MapServer will then look for the wms_extent metadata parameter and use the extents of the image and the size of the image for georegistration.