GeoServer / GWC / WMTS返回(400)错误的地图要求

时间:2019-03-08 03:58:03

标签: openstreetmap geoserver

我正在尝试使用PostGIS + GeoServer设置开放街道地图(OSM)

地图已导入到PostGIS。

GeoServer已配置,并且可以与“预览层组”一起正常工作。

但是当我尝试使用“平铺图层”示例时,地图的某些图块无法呈现。

调用GeoServer的html代码由GeoServer本身生成。

所有缩放级别都可以,并选择了网格集。

WMTS GetCapabilities的开始:

<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>GeoServer Web Map Tile Service</ows:Title>
<ows:Abstract>A compliant implementation of WMTS service.</ows:Abstract>
<ows:Keywords/>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
<ows:Fees>NONE</ows:Fees>
<ows:AccessConstraints>NONE</ows:AccessConstraints>
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName>http://geoserver.org</ows:ProviderName>
<ows:ServiceContact>
<ows:IndividualName>Claudius Ptolomaeus</ows:IndividualName>
<ows:PositionName>Chief Geographer</ows:PositionName>
<ows:ContactInfo>
<ows:Address>
<ows:City>Alexandria</ows:City>
<ows:Country>Egypt</ows:Country>
<ows:ElectronicMailAddress>claudius.ptolomaeus@gmail.com</ows:ElectronicMailAddress>
</ows:Address>
</ows:ContactInfo>
</ows:ServiceContact>
</ows:ServiceProvider>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="http://xxxxxx/geoserver/gwc/service/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetTile">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="xxxxxx/geoserver/gwc/service/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetFeatureInfo">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="http://xxxxxx/geoserver/gwc/service/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<Contents>
<Layer>
<ows:Title>Pk50095</ows:Title>
<ows:Abstract>
Pk50095 is a raster file accompanied by a spatial data file.
</ows:Abstract>
<ows:WGS84BoundingBox>
<ows:LowerCorner>12.999446822650462 46.722110379286</ows:LowerCorner>
<ows:UpperCorner>13.308182612644663 46.91359611878293</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:Identifier>nurc:Pk50095</ows:Identifier>
<Style isDefault="true">
<ows:Identifier>raster</ows:Identifier>
<LegendURL format="image/png" xlink:href="http://xxxxxx/geoserver/ows?service=WMS&request=GetLegendGraphic&format=image%2Fpng&width=20&height=20&layer=nurc%3APk50095" width="20" height="20"/>
</Style>
<Format>image/png</Format>
<Format>image/jpeg</Format>
<InfoFormat>text/plain</InfoFormat>
<InfoFormat>application/vnd.ogc.gml</InfoFormat>
<InfoFormat>text/xml</InfoFormat>
<InfoFormat>application/vnd.ogc.gml/3.1.1</InfoFormat>
<InfoFormat>text/xml</InfoFormat>
<InfoFormat>text/html</InfoFormat>
<InfoFormat>application/json</InfoFormat>
<TileMatrixSetLink>
<TileMatrixSet>EPSG:4326</TileMatrixSet>
<TileMatrixSetLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:0</TileMatrix>
<MinTileRow>0</MinTileRow>
<MaxTileRow>0</MaxTileRow>
<MinTileCol>1</MinTileCol>
<MaxTileCol>1</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:1</TileMatrix>
<MinTileRow>0</MinTileRow>
<MaxTileRow>0</MaxTileRow>
<MinTileCol>2</MinTileCol>
<MaxTileCol>2</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:2</TileMatrix>
<MinTileRow>0</MinTileRow>
<MaxTileRow>0</MaxTileRow>
<MinTileCol>4</MinTileCol>
<MaxTileCol>4</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:3</TileMatrix>
<MinTileRow>1</MinTileRow>
<MaxTileRow>1</MaxTileRow>
<MinTileCol>8</MinTileCol>
<MaxTileCol>8</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:4</TileMatrix>
<MinTileRow>3</MinTileRow>
<MaxTileRow>3</MaxTileRow>
<MinTileCol>17</MinTileCol>
<MaxTileCol>17</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:5</TileMatrix>
<MinTileRow>7</MinTileRow>
<MaxTileRow>7</MaxTileRow>
<MinTileCol>34</MinTileCol>
<MaxTileCol>34</MaxTileCol>
</TileMatrixLimits>
<TileMatrixLimits>
<TileMatrix>EPSG:4326:6</TileMatrix>
<MinTileRow>15</MinTileRow>
<MaxTileRow>15</MaxTileRow>
<MinTileCol>68</MinTileCol>
<MaxTileCol>68</MaxTileCol>
</TileMatrixLimits>

拼贴请求:

http://xxxxxx/geoserver/gwc/service/wmts?layer=seedpro%3ASP%20-%20OSM%20Brasil&style=&tilematrixset=EPSG%3A4326&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A4326%3A2&TileCol=2&TileRow=3

WMTS错误:

<ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
<Exception exceptionCode="TileOutOfRange" locator="TILEROW">
<ExceptionText>Row 3 is out of range, min: 1 max:2</ExceptionText>
</Exception>
</ExceptionReport>

因此GetCapabilities表示Zoom 2具有介于0和4之间的图块 但是当我查询ROW 3时,它说它的最小值为:1 max:2。

1 个答案:

答案 0 :(得分:0)

从设置为隔离的工作区发布 tilelayers 时,我遇到了类似的问题。此选项阻止我为缓存的瓦片层播种瓦片,并且客户端无法与 gwc 端点通信。请求导致 400 httpcode 响应,表明与 GeoWebCache 的一般通信错误(与您的响应类似)。

不幸的是我没有时间进一步调查这个问题,但可以从这个文档中找到解释

https://docs.geoserver.org/stable/en/user/data/webadmin/workspaces.html#isolated-workspaces