Balázs

Try changing the name value <name>gis:HMA2003_100329</name> so that it's 
not the same as the WMS layers value. You'd have to activate the line
<wmsLayers>gis:HMA2003_100329</wmsLayers> (<-- don't change the 
wmsLayers value) Then put the new GWC layer name in your GetMap request.

Other people have noted in the past, and I've learned from experience, 
that if you have the same layer name in a customized GeoWebCache.xml 
file as in Geoserver, that there can be confusion. By default, 
GeoWebCache automatically configures any layers in Geoserver. If you 
have an EPSG:23700 gis:HMA2003_100329 layer in Geoserver and also have 
one in your GWC config, and you make your GetMap request to GeoWebCache, 
it may return the one automatically setup from GeoServer and not the one 
from your config.

- Ryan

p.s. I included the geowebcache users group in this reply as well.

On 12/20/2010 7:02 AM, Balázs Bámer wrote:
> Hi All,
>
> I have Geoserver 2.0.2 with built-in GWC. I wrote simple GWC config
> file containing
>
> <?xml version="1.0" encoding="utf-8"?>
> <gwcConfiguration
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:noNamespaceSchemaLocation="http://geowebcache.org/schema/1.2.2/geowebcache.xsd";
> xmlns="http://geowebcache.org/schema/1.2.2";>
>      <version>1.2.2</version>
>      <cacheBypassAllowed>true</cacheBypassAllowed>
> <gridSets>
>      <gridSet>
>          <name>EPSG:23700</name>
>          <srs><number>23700</number></srs>
>          <extent>
>              <coords>
>                  <double>400000</double>
>                  <double>40000</double>
>                  <double>950000</double>
>                  <double>370000</double>
>              </coords>
>          </extent>
>          <alignTopLeft>true</alignTopLeft>
>          <scaleDenominators>
>              <double>100</double>
>              <double>200</double>
>              <double>400</double>
>              <double>600</double>
>              <double>1000</double>
>              <double>2000</double>
>              <double>4000</double>
>              <double>6000</double>
>              <double>10000</double>
>              <double>20000</double>
>              <double>40000</double>
>              <double>60000</double>
>              <double>100000</double>
>              <double>200000</double>
>              <double>400000</double>
>              <double>600000</double>
>              <double>1000000</double>
>              <double>2000000</double>
>              <double>4000000</double>
>          </scaleDenominators>
>          <pixelSize>0.000281547619</pixelSize>
>          <tileHeight>256</tileHeight>
>          <tileWidth>256</tileWidth>
>      </gridSet>
> </gridSets>
>    <layers>
>        <wmsLayer>
>          <name>gis:HMA2003_100329</name>
>          <metaInformation>
>            <title>gis:HMA2003_100329</title>
>            <description>Tokmindegy.</description>
>          </metaInformation>
>          <mimeFormats><string>image/png</string></mimeFormats>
>          <gridSubsets>
>            <gridSubset>
>              <gridSetName>EPSG:23700</gridSetName>
>            </gridSubset>
>          </gridSubsets>
>          <wmsUrl>
>            <string>http://att-it.homelinux.net:23880/geoserver/wms</string>
>          </wmsUrl>
>          <!--wmsLayers>gis:HMA2003_100329</wmsLayers-->
>          <transparent>true</transparent>
>        </wmsLayer>
>    </layers>
> </gwcConfiguration>
>
> The configuration is parsed because if I make a mistake in it, GWC
> fails to start.
>
> The request
>
> http://att-it.homelinux.net:23880/geoserver/gwc/service/wms?LAYERS=gis%3AHMA2003_100329&FORMAT=image%2Fpng&ENV=&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A23700&BBOX=500906.66230883,155321.89978152,515321.89978152,169737.13725421&WIDTH=256&HEIGHT=256
>
> fails with
> 400: Requested horizontal resolution: 56.30952137769532 , best match:
> 38.42664282226562 exceeds 10% threshold. Perhaps the client is
> configured with an incorrect set of scales (resolutions), or the DPI
> setting is off compared to the one in GWC ?
>
> while the underlying WMS is OK:
>
> http://att-it.homelinux.net:23880/geoserver/wms?LAYERS=gis%3AHMA2003_100329&FORMAT=image%2Fpng&ENV=&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A23700&BBOX=500906.66230883,155321.89978152,515321.89978152,169737.13725421&WIDTH=256&HEIGHT=256
>
> According to my calculations, the requested resolution 56.3095 divided
> by the pixel size 0.0002815 yields scale 1:200034 quite close to
> 1:200000 listed scale, but somehow this part of the config is not in
> effect. GWC still thinks in powers of 2 scales. During startup, the
> warning
>
> 20 Dec 14:43:31 WARN [grid.GridSetFactory] - GridSet
> EPSG:23700_gis:HMA2003_100329 was defined without metersPerUnit.
> Assuming 1m per SRS unit for WMTS scale output.
>
> is also interesting, since it is specified in the config. If I enable the line
>
> <!--wmsLayers>gis:HMA2003_100329</wmsLayers-->
>
> in the config, the situation is the same. What can be the problem?
>
> Thank you in advance,
> best regards: Balázs Bámer
>
>
> ps: other GWC startup output:
>
> 20 Dec 14:43:29 INFO [storage.DefaultStorageFinder] -
> ************************************************************************************************************************************
> 20 Dec 14:43:29 INFO [storage.DefaultStorageFinder] - *** Found System
> environment variable GEOWEBCACHE_CACHE_DIR set to
> /var/lib/geoserver-2.0.2/gwc, using it as the default prefix. ***
> 20 Dec 14:43:29 INFO [storage.DefaultStorageFinder] -
> ************************************************************************************************************************************
> 20 Dec 14:43:29 INFO [config.XMLConfiguration] - Found configuration
> file in /var/lib/geoserver-2.0.2/gwc
> 20 Dec 14:43:29 INFO [config.XMLConfiguration] - Configuration file
> validated fine.
> 20 Dec 14:43:29 ERROR [geotools.jdbc] - There's code using JDBC based
> datastore and not disposing them. This may lead to temporary loss of
> database connections. Please make sure all data access code calls
> DataStore.dispose() before freeing all references to it
> 20 Dec 14:43:29 ERROR [geotools.jdbc] - There's code using JDBC based
> datastore and not disposing them. This may lead to temporary loss of
> database connections. Please make sure all data access code calls
> DataStore.dispose() before freeing all references to it
> 20 Dec 14:43:29 INFO [config.XMLConfiguration] - Read GridSet EPSG:23700
> 20 Dec 14:43:29 INFO [jdbc.JDBCMBWrapper] - MetaStore database is version 120
> 20 Dec 14:43:29 INFO [layer.TileLayerDispatcher] - ConfigurationLoader
> acquired lock, sleeping 5 seconds
> 20 Dec 14:43:29 INFO [geowebcache.GeoWebCacheDispatcher] - Invoked
> setServletPrefix(gwc)
> 20 Dec 14:43:29 INFO [wms.WMSService] - Will NOT recombine tiles for
> non-tiling clients.
> 20 Dec 14:43:29 INFO [wms.WMSService] - Will proxy requests to backend
> that are not getmap or getcapabilities.
>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>    

-- 
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
Monticello, IL
www.paqinteractive.com


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to