Good job figuring out how to define your own grid and looking at the 
source of the OL client.

But the demo OpenLayers client is automatically generated from the 
configuration of the layer. They'll always match (or you've found a bug).

If you define a new grid set / layer in XML, a new demo is created to 
match that grid definition.


You're not saying what client you are trying to use, but you should look 
at how the working demo client is configured and copy those settings to 
your client.

-Arne

ps. Don't post to both geowebcache-users and geoserver-users. Pick one, 
if you don't get a reply in a few days you can post to the other. 
Otherwise you're likely to make someone answer a question that has 
already been answered.


On 2/3/11 12:27 PM, Héctor Hugo Pérez Alonso wrote:
> Dear all,
>
> I am having troubles to configure geowebcache integrated with geoserver 
> 2.0.2. Geoserver is deployed in a Tomcat 6.0.20 in Linux Opensuse 11.1.
>
> My first working wms request is this one: 
> http://druidtest.gmv.es:8084/geoserver/wms?LAYERS=topp%3APO_CC_2007-2008&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A4326&BBOX=-8.94,42,-8.428,42.512&WIDTH=256&HEIGHT=256
> The gwc demo works for this layer: 
> http://druidtest.gmv.es:8084/geoserver/gwc/demo/topp:PO_CC_2007-2008?gridSet=EPSG:4326&format=image/png.
>
> However, the following wms request (through gwc) fails: 
> http://druidtest.gmv.es:8084/geoserver/gwc/service/wms?LAYERS=topp%3APO_CC_2007-2008&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A4326&BBOX=-8.94,42,-8.428,42.512&WIDTH=256&HEIGHT=256&TILED=True
>
> The error obtained is:
> "400: Requested horizontal resolution: 0.001999999999999995 , best match: 
> 0.001373291015625 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 ?"
>
> I have checked the posts in the lists with similar problems, so I tried to 
> solve it defining my custom configuration file with the resolution values 
> that I got from the openlayers source code of the demo, assuming that these 
> should be ok. I changed the bounds in the request for them to match as well: 
> http://druidtest.gmv.es:8084/geoserver/gwc/service/wms?LAYERS=topp%3APO_CC_2007-2008&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fpng&SRS=EPSG%3A4326&BBOX=-8.793,42.031,-8.029,42.816&WIDTH=256&HEIGHT=256&TILED=True
> This time I obtained this error:
> * 400: X,Y values for the tile index were calculated to be 
> {243.49439999999998, 187.77742222222224} which had to be rounded to {243, 
> 188} and exceeds the threshold of 10%. Perhaps the client is using the wrong 
> origin ?
> The demo still works here with the new configured GridSubset: 
> http://druidtest.gmv.es:8084/geoserver/gwc/demo/topp:PO_CC_2007-2008?gridSet=The%20Entire%20World&format=image/png
>
> Could somebody point me in the right direction?.
> Why should it work in the demos (OpenLayers) and not with a simple WMS query? 
> I copy below the content of the geowebcache.xml config file.
> Thanks in advance.
>
> Regards,
>
> Héctor.
>
> <?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>
>    <gridSets>
>      <gridSet>
>        <name>The Entire World</name>
>        <srs><number>4326</number></srs>
>        <extent>
>          <coords>
>            <double>-180.0</double>
>            <double>-90.0</double>
>            <double>180.0</double>
>            <double>90.0</double>
>          </coords>
>        </extent>
>        <alignTopLeft>false</alignTopLeft>
>        <resolutions>
>             <double>0.703125</double>
>             <double>0.3515625</double>
>             <double>0.17578125</double>
>             <double>0.087890625</double>
>             <double>0.0439453125</double>
>             <double>0.02197265625</double>
>             <double>0.010986328125</double>
>             <double>0.0054931640625</double>
>             <double>0.00274658203125</double>
>             <double>0.001373291015625</double>
>             <double>6.866455078125E-4</double>
>             <double>3.4332275390625E-4</double>
>             <double>1.71661376953125E-4</double>
>             <double>8.58306884765625E-5</double>
>             <double>4.291534423828125E-5</double>
>             <double>2.1457672119140625E-5</double>
>             <double>1.0728836059570312E-5</double>
>             <double>5.364418029785156E-6</double>
>             <double>2.682209014892578E-6</double>
>             <double>1.341104507446289E-6</double>
>             <double>6.705522537231445E-7</double>
>             <double>3.3527612686157227E-7</double>
>             <double>1.6763806343078613E-7</double>
>             <double>8.381903171539307E-8</double>
>             <double>4.190951585769653E-8</double>
>             <double>2.0954757928848267E-8</double>
>        </resolutions>
>        <levels>20</levels>
>        <metersPerUnit>111226.31</metersPerUnit>
>        <tileHeight>256</tileHeight>
>        <tileWidth>256</tileWidth>
>      </gridSet>
>    </gridSets>
>    <!-- ============================== LAYERS 
> ============================================== -->
>    <layers>
>      <wmsLayer>
>        <name>topp:PO_CC_2007-2008</name>
>        
> <mimeFormats><string>image/png</string><string>image/jpeg</string></mimeFormats>
>        <gridSubsets>
>          <gridSubset>
>            <gridSetName>The Entire World</gridSetName>
>            <extent>
>              <coords>
>                <double>-8.793</double>
>                <double>42.031</double>
>                <double>-8.029</double>
>                <double>42.816</double>
>              </coords>
>            </extent>
>            <zoomStart>9</zoomStart>
>            <zoomStop>18</zoomStop>
>          </gridSubset>
>        </gridSubsets>
>        
> <wmsUrl><string>http://druidtest.gmv.es:8084/geoserver/wms</string></wmsUrl>
>        <wmsLayers>topp:PO_CC_2007-2008</wmsLayers>
>        <errorMime>application/vnd.ogc.se_xml</errorMime>
>        <wmsVersion>1.1.1</wmsVersion>
>        <transparent>true</transparent>
>        <queryable>true</queryable>
>      </wmsLayer>
>    </layers>
> </gwcConfiguration>
>
>


------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to